Ever since Geoff wrote the small script to backup a WordPress installation automatically, I have wanted to make his script email me with the backups once they are done. So I modified the original script to email a given address with the backup files (the backup files are deleted from the server once the email is sent)
I ran into some problems while running the script on my own server because of the sheer size of the backups. I rewrote it to FTP the backups to another server to prevent killing my mail server. However, smaller installations (anything less than 500 megs) would benefit from the email backup and I decided to release the code.
You can download the script from here, copy it to a location on your drive that would allow execution, give it execute permissions (chmod 755 backupwp.sh) and then write a small cron entry that runs this however often you wish.
Once the script is uploaded, you will also need to modify the server variables for your own blog. They are in the first half of the script and I have tried to make them as self explanatory as possible.
Some caveats include:
Has to be a Linux/UN*X box
Backups CAN get huge and can slow down your server, depending on load/size of the blog
You have to have ssh/command line access to your server, I guess just cron access would work as well
There are various cron tutorials on the web for your perusal. If you do not want to be emailed with the output from the script, just add a ” >/dev/null 2>&1″ at the end of the cron entry.
Please post bugs/suggestions. This has been sparingly tested and comes with no gaurantees or promises. Please use at your own risk and I am not be responsible for any damage caused by this script. Thanks goes to Geoff Morris for writing the original set.