Dougal Campbell's geek ramblings

WordPress, web development, and world domination.

How I backup my database

I run several WordPress sites on my servers, including this blog, which has content going back over 10 years. While I’m not too worried about backing up all the files (I can always install a fresh copy of WordPress on a new server and be up and running quickly, sans old images and such), my content is quite precious to me.

For a long time, I ran a nightly perl script which dumped my databases into a file, compressed them, then emailed them to my GMail account. And this served me well for several years. Until the size of my database dump grew larger than the 10MB attachment size limit on GMail. So for a while there, while I had local database dumps, I didn’t have offsite backup.

I finally got around to doing something about it.

With a little bit of this: MySQL Backup

And a little bit of this: Install Text-based Dropbox on Linux

The MySQL Backup script is the same one I’ve used for years. I’ve just configured it to not send emails anymore, and instead it drops its local backup files in my Dropbox folder. For anyone who doesn’t know, Dropbox is a cloud storage service, which is to say it stores files on an internet connected server that you can access from anywhere. On your local computer, it looks like a regular folder on your hard drive. But you can also access your Dropbox files through a web browser, and you can set up Dropbox on multiple computers — there is even an iPhone app — all sharing the same files.

Obviously, this setup isn’t for everybody.  I use a VPS for my servers, so I have complete administrative control, and I’m comfortable managing my own Linux system administration. Most people are on shared hosting, which probably isn’t going to offer the level of access needed for running the Dropbox service on your web host. But for advanced users like myself, I thought I’d share my particular no-frills solution.

But for anyone who might like to try a more plug-and-play solution: 9 Dropbox Plugins for WordPress

And if you haven’t already signed up for Dropbox, and want to give it a try, use this Dropbox sign-up link, and we’ll each get an extra 250MB of storage, free. Your first 2GB are free, and you can purchase more storage space if you need it (or earn more free space by getting friends to sign up).

 

About Dougal Campbell

Dougal is a web developer, and a "Developer Emeritus" for the WordPress platform. When he's not coding PHP, Perl, CSS, JavaScript, or whatnot, he spends time with his wife, three children, a dog, and a cat in their Atlanta area home.
This entry was posted in WordPress and tagged , , , , , . Bookmark the permalink.

Leave a Reply