views:

121

answers:

4

does anyone know of a good way to automatically backup databases used for wordpress blogs? Preferably a way of getting the backup emailed as a .zip file to the admin user so they can be stored remotely?

+6  A: 

http://codex.wordpress.org/Backing_Up_Your_Database

or use this plugin http://wordpress.org/extend/plugins/wp-db-backup/ I believe the plugin even has the email feature you are looking for.

gidmanma
+1  A: 

Depending on your hosting provider, you can run a cron job to connect to your MySQL instance, dump it with mysqldump, and mail (or more likely, scp) the result to you. That will cover your entire database server (at least, assuming that you have one allocated to you and not just a single database). That is what I did when I was hosted at NearlyFreeSpeech to back up all the blogs I had there for various people. I do the same thing today for backing up blogs on my own server.

Michael Trausch
A: 

on this theme, the answers above have pointed me towards the following plugin:

http://www.genealogy-computer-tips.com/wp-database-backup/

This seems to be everything I needed! Cheers,

DanC
+3  A: 

If you are looking for a manual method, you can do something like this:

mysqldump --opt -h'localhost' -u'YOURUSER' -p'YOURPASS' -PYOURPORT wordpress > backup.sql | tar -czf backup.tar.gz backup.sql
echo "Here's your backup" | mail [email protected] -a backup.tar.gz -s 'Wordpress backup'

This will tar.gz your backup and email it to you.

Artem Russakovskii