June 30, 2010

503 words 3 mins read

WordPress: Smart backups BackWPup and Amazon S3

WordPress being as popular as it is, is a very common target for all sorts of evil and dastardly hacks. As such, you should make sure to back it up on a very regular basis. Sometimes we don’t backup because we’re lazy, cheap, or it simply takes too much work. Well, let me tell you about a way to backup your WordPress easily, cheaply, and completely automated: BackWPup. This is a plugin I found that does one thing, and does it well, it runs backups. You can very easily setup BackWPup to backup your all your WordPress files and database to a file on your server. This is a great start, but not the best idea.

Now, for those who aren’t in the “know” the best place to have your backups is “offsite” (or not on the same server or in the same physical location as your original data). This means that after the backup files are created, they need to be pushed somewhere else. BackWPup offers you the ability to FTP said files, but if you don’t have another server…this doesn’t help you much. What BackWPup offers, that is a fantastic feature, is the ability to push to Amazon Simple Storage Service (S3). The basic idea is: “Amazon S3 provides a simple web services interface that can be used to store and retrieve any amount of data, at any time, from anywhere on the web.” Most importantly, it is cheap! It is only 15 cents per Gigabyte/Month.

For those who might not know how much space they need, let me give you an example of what I’m using here at Snowulf. We have (as of writing) 800+ posts, 500+ comments, 23 downloaded plugins, 105 MB of media (pictures) and 15 downloaded themes. I have BackWPup scheduled for two different backups: Everyday it backs up the database (posts, comments, categories, tags) and once a week it backups all the files (WordPress, plugins, themes, and media). The daily backup (compressed) is 1.5 MB and the weekly backup is 120 MB. If I keep every single backup for an entire month, I’ll be using a bit over 500 MB. That will cost me approximately 8 cents to keep around. Even if the blog literally DOUBLED in space usage each month, after 6 months, I’m still only paying about $2.50 a month for backup.

For peace of mind, knowing that no matter what happens tomorrow, I will be able to recover my blog with very little (if any) lost data, that is a very small price to pay. Of course, If something were to happen (ex: spammers sneaking in), I could roll back several days of backups — and I’m still good to go. If you want to get on the bandwagon, sign up for Amazon Web Services (you only pay for what you use, otherwise there is no cost to you). After that, download & install S3Fox (You are using Firefox, right?). If you need help getting started with S3Fox, checkout this wonderful tutorial video.