Creating Automatic Backups Of Your Movable Type Database


Published on December 12, 2004 at 7:22 PM EST
In the Tutorials category.

Probably the most important element to maintaining a web site with Movable Type (or other CMS) is the database. If something happens to the database, you’re in trouble. If you keep backups (and you should!) you can go back to the last copy. But how old is that—a week? A month? Nightly, automatic backups of your database are the best way to handle such a problem.

http://www.eatdrinksleepmovabletype.com/upload/2005/10/mysqlbackup-thumb.gif

So, for a little while I was searching for a good way to make nightly, automatic backups. I’ve found a good, free tool for the MySQL databases I use: MySQL Database Backup. Setting up the script as a Cron job let’s me make nightly backups, and the script can be set to keep as many nightly, weekly, and monthly backups as I want. Everything gets compressed into a compressed archive. Restoring the database is as simple as extracting and uploading to my web server. A very cool little utility; highly recommended!

Installation is as simple as filling in a few blanks, uploading the files, and setting up a Cron job to automate the process—the instructions are very clear about how everything works. It’s worth noting that where the script asks for the hostname of the computer, “localhost” will probably work fine for any Unix-based server.

I’ve only looked a little, but I haven’t found similar utilities to automatically backup PostgreSQL or Berkeley DB databases.