How to automate database backup using phpmyadmin

Viewed 54526

I am currently taking database backup manually using phpmyadmin export as a sql dump,the resulted file name will be spbkYYMMDD(Y;year m:month D:day).Is there any way to automate db backup so that i get sql dump for regular intervals and the file name should automatically generated correspondingly .can you explain me the logic.

5 Answers

Create .bat file in a folder when you have admin rights. down here is a simple .bat file

cd "C:\XAMPP\mysql\bin"
mysqldump -hlocalhost -uroot ca > "D:\cash\bkcash\ca\db_%date:~-4,4%%date:~-10,2%%date:~7,2%_%time:~0,2%%time:~3,2%%time:~6,2%.sql"
Related