backing up my wordpress SQL database
Along the lines of using this as a sort of lab journal for my
experiments and thoughts, I think it is important to keep these things
backed up. Crontab again comes to the rescue by executing a small
snippet of code that will backup the database in case something nutty
happens. The script for such an action looks something like
so:
#!/bin/bash
/usr/bin/mysqldump -u root -pPASSWORD wordpress | gzip > /home/bob/RAID5/Backups/MYSQL/wordpress_`date +%m-%d-%Y`.sql.gz
I set this to run in the crontab at 5am daily. This will create a new
file each time, but I may have it perform this task once a week and
have the daily backup overwrite the previous dump.