You can set the Cron job to generate the database backup for your database.
Here's For Dumping MySQL DB To File In Your Server
1) Cron job syntax to take database backup in simple .sql format is as follows
Quote:
|
* * * * * /usr/bin/mysqldump -u databaseusername databasename -ppassword > /path of the database store file.sql
|
2) To compress the database backup file in the gz format.
Quote:
|
* * * * * /usr/bin/mysqldump -u databaseusername databasename -ppassword|gzip > /path of the database store file.gz
|
3) To compress the database backup in the bz2 format
Quote:
|
* * * * * /usr/bin/mysqldump -u datbaseusername databasename -pdatbasepassword|bzip2 -c > /path of the database store file .bz2
|