首页 > 代码库 > mysql 定时备份脚本

mysql 定时备份脚本

@echo off
chcp 936
net stop mysql
set Y=%date:~0,4%
set M=%date:~5,2%
set D=%date:~8,2%
set H=%time:~0,2%
set Min=%time:~3,2%
set Sec=%time:~6,2%
set Time=%Y%%M%%D%_%H%%Min%%Sec%
set Log=%Time%
xcopy "C:\ProgramData\MySQL\MySQL Server 5.5\Data\gs_0126\*.*" g:\db_bak\gs_0126\%Log%\
net start mysql

mysql 定时备份脚本