@echo off
echo 在线兑奖系统自动备份脚本(请勿关闭) 联系人: 电话:
:loop
set /a "FDate=%date:~,4%%date:~5,2%%date:~8,2%"-5
if %time:~0,8%==17:06:00 (
if exist "D:\mysql_db_backup\lottery_online_ticket_%FDate%.sql" ( Del /q /a "D:\mysql_db_backup\lottery_online_ticket_%FDate%.sql" )
C:\"Program Files (x86)"\"MySQL\MySQL Server 5.5"\bin\mysqldump.exe --opt -u root --password=admin lottery_online_ticket > D:\mysql_db_backup\lottery_online_ticket_%date:~,4%%date:~5,2%%date:~8,2%.sql
echo 备份完毕 ...
Echo open [ip]>ftp.up
Echo [username]>>ftp.up
Echo [password]>>ftp.up
Echo cd .\ >>ftp.up
Echo binary>>ftp.up
Echo put "D:\mysql_db_backup\lottery_online_ticket_%date:~,4%%date:~5,2%%date:~8,2%.sql">>ftp.up
Echo bye>>ftp.up
FTP -s:ftp.up
del ftp.up /q
echo =============备份等待=============
echo 在线兑奖系统自动备份脚本(请勿关闭) 联系人: 电话:
)
goto loop
@echo on