首頁 >資料庫 >mysql教程 >mysql自动备份跟压缩

mysql自动备份跟压缩

WBOY
WBOY原創
2016-06-07 16:25:301300瀏覽

mysql自动备份和压缩 set Today=%date:~0,4%%date:~5,2%%date:~8,2% set filename=mzo-%Today% set source=D:\thwl\bak-sql\%filename%.sql forfiles /p "D:\thwl\bak-sql"? /m *.7z /d -15 /c "cmd /c del @path" mysqldump -uroot -pszk^^^^* -R MZO %sourc

mysql自动备份和压缩

set Today=%date:~0,4%%date:~5,2%%date:~8,2%
set filename=mzo-%Today%
set source=D:\thwl\bak-sql\%filename%.sql

forfiles /p "D:\thwl\bak-sql"? /m *.7z /d -15 /c "cmd /c del @path"
mysqldump -uroot -pszk^^^&^* -R MZO > %source%
HaoZipC a -t7z %filename%.7z %filename%.sql
del %filename%.sql

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn