Home >Database >Mysql Tutorial >msyql定时按日期备份批处理_MySQL

msyql定时按日期备份批处理_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 13:28:491020browse

bitsCN.com

msyql定时按日期备份批处理

 

bat 内容

 

@echo start backup program

@rem  时间格式会有变化,这里可能出问题

@set dateString=%date:~0,4%%date:~5,2%%date:~8,2%

@echo %date%

@echo %dateString%

@set runTime=1

if exist e:/mysqlBakup/web%dateString%.sql (echo file exists) else mysqldump -uroot -p123456 --default-character-set=utf8 web > e:/mysqlBakup/web%dateString%.sql 

 

定时功能使用windows 自带的“任务计划”就不错。

 

“开始”>>“设置”>>“控制面板”>>“任务计划”>>“添加任务计划”

bitsCN.com
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn