@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 �Cpxxxx 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
del
c:\ftpdemo.txt
del
c:\ demo %date:~0,10%.sql
|
本文出自 “yahoon的小屋” 博客,转载请与作者联系!