banner
May 10, 2013
28 Views
0 0

Mysql Day wise Backup

Written by
banner

I am using Windows 7 System. My Mysql is installed into D: . It is done simple using a Batch file. Batch file will call automatically using scheduler etc. In my batch file d:\DB_Backup is the Backup Directory. We are creating current dated folder Into DB_Backup folder and create .sql file into current dated folder.

cd\
D:
for /f "tokens=1-4 delims=/ " %%a in ('Date /t') do (
set Month=%%b
set Day=%%c
set Year=%%d
)
set DATES=%Day%-%Month%-%Year%
cd\
cd d:\DB_Backup
mkdir %DATES%
cd\

cd D:\wamp\bin\mysql\mysql5.5.24\bin
mysqldump -uroot -proot1234 database1 > d:\DB_Backup\%DATES%\database1.sql 
exit

We can fallow the same way for linux or other system.

Share this:
Article Tags:
· · ·
Article Categories:
MySQL
banner

Hi guys, This is the place where developers are sharing there thoughts....

Leave a Comment

Your email address will not be published. Required fields are marked *

Result of *

Social Widgets powered by AB-WebLog.com.