I have mysql installed on my web server, which I am accessing using PHPMyAdmin. My client asked me following:
- Install PhpBB
- Setup MYSQL Scheduled backup
I have installed PhpBB successfully but hwo to do the 2nd one. I am using PhpMyAdmin to access mysql database, and I don't see any scheduling type of facility in phpmyadmin as well as in phpbb.
What should I do here? Please help me, Thanks!
Best Answer
Automation can be done by creating CRON jobs on your server. The following link has complete example code to backup the database automatically
http://atoztechnical.blogspot.com/2010/08/how-to-automate-database-backups.html
or
First write a script that uses mysqldump command to backup your database and store in specific directory.Now we are going to automate the process by executing this script at a particular time everyday.
Execute the following command as root user
This allows you to edit the crontab file for a user. It has six fields they are
1.Minute
2.Hour
3.Day of Month
4.Month
5.Day of Week
6.Command to be executed
Add the following line to the crontab file and close it.
Now your backup.sh script will be executed 39 minutes, 19th hour everyday. If u want to see the list of cronjobs for a user, then execute
backup.sh :