How to set the mysql database backup cronjob ?
CRON
Cron is a linux utility that schedules a command (or commands) to be executed periodically at certain times. They can perform user-defined tasks such as backing up databases, scheduling mailing lists, clearing old records, etc etc.
To set up a CRON Job, you need to know two things.
1. The command that is to be executed (often a user written script or a UNIX command)
2. How often the command is to be executed (what days, months, dates, hours etc etc)
There are following different format to get the backup of mysql database using cron job
1) Simple cron job syntax to take database backup
* * * * * /usr/bin/mysqldump -u databaseusername databasename -ppassword > /path of database store.sql
2) Compress the database backup in gz format
* * * * * /usr/bin/mysqldump -u databaseusername databasename -ppassword|gzip > /path of database store.gz
3) Compress the database backup in bz2 format
* * * * * /usr/bin/mysqldump -u datbaseusername databasename -pdatbasepassword|bzip2 -c > /path of database store.bz2

















September 24th, 2008 at 2:32 pm
[...] Issues such as, if you want to setup special permissions on your PHP Scripts or you need to setup MySQL database for you hosting and if you feel that you do not have the sufficient expertise the support [...]