MySql 備份bat
@echo off
For /f "tokens=1-4 delims=/ " %%a in ('date /t') do (set dt=%%a%%b%%c)
For /f "tokens=1-4 delims=:." %%a in ('echo %time%') do (set tm=%%a%%b)
set bkupfilename=%dt%-%tm%.sql
cd C:\Program Files\MySQL\MySQL Server 5.1\bin
mysqldump -u indicatordb -p -pmysqldb --database lsdb > D:\MySqlBackup\"%bkupfilename%"
沒有留言:
張貼留言