@echo off
:: this batch is to backup the db files on windows to linux server
:: created by yahoon
:: 2008.4.9
::backup the mysql db
mysqldump -uroot –pxxxx demo>c:\demo %date:~0,10%.sql
::pause
:: wait press any key to continue
:: ready to delete
::form the ftp command file
echo open
服務器
ip>c:\ftpdemo.txt
echo ftp
用戶名
>>c:\ftpdemo.txt
echo ftp
密碼
>>c:\ftpdemo.txt
echo put c:\ demo %date:~0,10%.sql >>c:\ftpdemo.txt
echo bye>>c:\ftpdemo.txt
::transfer the file to server via ftp
ftp -i -s:c:\ftpdemo.txt
::pause
::clean the tmp files
|