I have been backing up my mySQL databases manually through phpMyAdmin, and although it is an simple, straightforward way to backup, I really wanted to find a more reliable, automated backup system for my database data.
After a remind on an email list, I decided to learn a little more about Cron Jobs. First I googled “cron job backup database” and found an interesting script for backing up Wordpress.
From that page, I also found a more robust MySQL backup script:
AutoMySQLBackup from SourceForge.net
I read the basic instructions, then downloaded the .sh file. I thought the file was fairly easy to configure; make sure to scroll down the page for detailed instructions.
It looked like a simple enough process, but I did have a little trouble. My Notes:
BACKUPDIR="/home/username/backup"./directory/automysqlbackup.sh.2.5 - change directory to your specific name. Also, make sure to include the exact file name. If you are using a version of the script different than “2.5″ you must reference the specific file name, or rename the file to “automysqlbackup.sh”
This looks like a really useful script, and it will make my backups so much simpler and less time consuming!
Update: This morning, I received an email letting me know that the 3AM backup was successful; I checked the backup folder on my hosting account, and found a backup file for Thursday.
Very useful and simple. Thanks.
Comment by fiLi on September 24th, 2006thanks it helps…….. it saves my lot of manual time in backup..
Comment by subeesh on July 2nd, 2008