Developing a Blog Backup Strategy – How?
Most bloggers put a lot of time and effort into their blogs. Now, wouldn’t it suck if something happened to it and you couldn’t recover? Oh yes, it would. The answer to this blogger’s doomsday scenario is a solid backup strategy.
Unfortunately, it seems as if most bloggers don’t really pay as much attention to this as they should. It is common for bloggers not to even think about it and they thus rely on their web host to do it for them. This is NOT dependable. Many web hosts don’t back up every day. Plus, the horrific data loss over at Magnolia shows that there is no guarantee even with that.
Another option is to manually back up your Wordpress database using PHPMyAdmin. Many web hosts have this already installed and you can access it using your account control panel with your web host. Even if your host doesn’t provide it, however, you can install it to your own server yourself. Using the Export function of PHPMyAdmin, you can create backups of your database and save it as a file.
Another common option is to use the WP-DB-Backup plug-in for Wordpress. This is certainly a LOT better than depending on your web host. You can also set it up to run on automatic using Wordpress’s own internal CRON.
Here’s How I Do It
I do not want to depend on my web host for backups. They do do it for me, but I’m not willing to trust my business to them blindly. And I don’t want to depend on a plug-in to back up Wordpress. What if something happens and Wordpress isn’t functioning properly? What if PHP stops executing on the server? In other words, a backup system that depends on Wordpress itself to back up Wordpress is just not a fail-safe solution.
So, I do a few things:
- I keep a copy of all my blog files locally on my computer. I have a directory on my hard drive for each site I have.
- I run a series of independent PHP scripts to back up each of my databases. These scripts were written by me and are run each night in the early morning hours via CRON. The scripts are designed to create an SQL backup of the database, timestamp it, and archive it in a server directory which is not accessible to the public. I keep 7 days of SQL backups on file for each database at all times, and then I archive weekly backups into another folder on the server so that I always have 2 weeks of backups there. Each SQL file is G-zipped to conserve space.
- Using CRON on my Mac, and an Automator script which works with my FTP client (Transmit), my Mac logs into the server each and every night while I’m in bed. It will then download all backups to my Mac such that I always have ALL database backups on the server mirrored locally to my hard drive.
- And, of course, being that I am running a Mac, everything is backed up to an external hard drive by Time Machine.
So, as you can see, I’m not dependent on Wordpress at all. And I have multiple levels of redundancy. The database backups are stored on my web server (which is backed up by most host as well), as well as on my Mac on TWO separate disk drives.
For me, geographic redundancy is important, too. If, God forbid, anything huge ever happened in the city where my web server is located and it took out my server, I’d still be able to put my sites back together with another hosting company because I have most everything stored locally.
How Can You Do It?
This is already a more technical post than I would usually write for this particular site, but I want to leave you with something actionable so that you can set up your own blog data backup plan.
Below is a link to a text file. This is the PHP script which I use to backup my databases. Save the text file and reset the file extension to .php. Edit the variables at the top of the script with your database access information, backup locations, and the prefix. Upload this script, then, to your server and set up a CRON job to execute it automatically every night.
Click here for the database backup script.
I will leave it to you and your web host to set up a CRON job. Most hosts have some web-based way to do this.
To get the local backups on your computer, you will need to look into the scripting capabilities of your FTP client. Most good FTP clients have some way of executing FTP commands via the command line.
Under Windows, you would probably need to use some VB Script and execute it via scheduled tasks. However, I’ll be blunt: Windows sucks when it comes to dependably executing anything on a schedule. I know – I used to try.
My automated scripts perform flawlessly on the Mac, however. I recommend Transmit as an FTP client because it has hooks which are built into Automator and it makes it very easy to set up a script to execute FTP commands. I then use Cronnix to set up a CRON job on my Mac to execute the Automator script.
However you ultimately go about it, be sure to take the time to put a blog backup strategy into place. Some day in the life of your blog, you will be glad that you did it.
If you enjoyed this article, you might also like...
- Terrorism – How Internet Businesses Should Plan
- My Blog Was Hacked (I Think) – The Story
- 6 Tips to Secure Your Website
- Wordpress and Curing High Server Load
- Twitter – I Finally Found a Use
Get your copy of the Six Figure Blogger Blueprint.
You'll Discover...
- 3 vital questions to pick the right niche.
- The layout for funneling traffic into your blog.
- How this blog generates thousands of dollars monthly - without a single banner ad.
-
Josh H
-
Marko
-
Pack Searching
-
Wesley Craig Green
-
Janice
-
Matty Byloos
-
Junius Fullard
-
MLDina
-
Tony Lawrence
-
Hesham

I'm David Risley. I've been making my living as a blogger for over a decade. Blogging is my business and how I support my family. With this blog, I'm just gettin' REAL and telling you how this business works.









