-
… assuming you want to backup a mysql database and you have the rights to setup cronjobs on your webserver:
- download and install mysqldumper
- take a look at the config section in mysqldumper to secure access to the script, auto split backup files bigger than x MB and to auto delete backups after exceeding a certain number of backups (if you don’t have unlimited webspace)
- msd_cron/crondump.pl – edit this file and set the absolute path to the crondump.pl file itself (pwd is your friend)
- crontab -e - open your cronjob list
- 20 * * * * perl /path/to/your/mysqldumper/msd_cron/crondump.pl > /dev/null - add a new line to run the perl script daily (e.g. 20 = at 20.00 every day), test the script manually by running the perl /path/to… command in your shell first.
by using the mighty mysqldumper you could also setup a automatic ftp transfer of your database or sending the backups as e-mail attachments to get your backups off-site. otherwise they are just stored in the /work directory of your mysqldumper.