Here at ProfHacker we’ve written previously about backing up your personal computer—using Backblaze, Cloudberry, or external drives, for example—and others have discussed ways storing files for easy retrieval by multiple computers (see “Stop Emailing Files To Yourself”). But this post is about a few simple ways to ensure your website content is retrievable even when your hosting provider’s servers go belly-up (and the server with the backups does too).
These options are not all of the options for maintaining site backups, and are meant primarily for those folks who maintain basic web sites with a hosting provider. (In other words, I’m not going into things like version control software or true mirroring.)
Keep a Copy of Static Files and Images on Your Hard Drive(s)
Here, I’m using “static” to mean any files with content in them that you manually manipulate and transfer to your server via an FTP-like protocol, which may or may not include dynamic elements—for instance, the index.html file that sits in your document root may be a file that you change manually, but contains some server-side scripting elements. For the purposes of this bullet point, consider it a static file.
I know many people who simply store all their web site files on the web server itself, only downloading one when they need to make a change. This is a recipe for disaster. If your site has a set of static pages, always keep them in sync on your machines.
Say you edit files both at home and at work. On both machines, create a directory called “web site” or “world domination” or whatever you want. In that directory, hold a complete copy of your site’s files—an initial FTP session in which you select all files and directories and pull them over to your machine(s) will take care of that. Then, from that point forward, whenever you want to edit a file, first download it from the server to ensure that you have the most current copy, make your edits, and send it back up. You will always have a core set of files on at least one of your machines, and might not be too far off on another machine (depends on how often you use both machines for this type of work).
Bonus: if you have automatic backup into the cloud (I have Mozy backup my files every two days) or onto an external drive, you will have three or four backups of your static site content.
Learn to Love Your Control Panel
In my Website Hosting 101 post, I mentioned one feature you should look for in a hosting provider is the ability to manage your site via a control panel. Control panels give you an overview of your system and server status, but their primary purpose is to provide you with simple ways to complete technical tasks (usually a few clicks and the completion of a form or two). One of those tasks is likely to be a system backup.
In this screenshot, you can get a sense for the functionality my hosting provider (Daily Razor) offers via the cPanel software (click to enlarge). I can schedule system backuups or I can generate and download current backups on demand.
It is very important to note that if you use your hosting provider to generate backups on a schedule, those backups are still sitting on your hosting provider’s server (or perhaps on a drive or other server away from the live server) which does not protect you from catastrophic failures or your hosting provider closing up shop. It is important to generate backups, but even more important to retrieve those backups and store them yourself (and then perhaps in the cloud or on an external drive) for even more protection and quick access.
Backing Up Installed Programs
Perhaps your website is actually a WordPress installation, meaning it is a set of files, perhaps customized (templates and plugins), with a database backend. The simple FTP process mentioned at the beginning of this post won’t take care of your content, as your content is stored in a database. But customizations can be stored in similar ways—for instance, I have directories on my machine for each of my WordPress custom templates so that I can quickly restore or move it if necessary. The same is true for customized plugins (ones I’ve written or customized, which can’t simply be downloaded again from the WordPress plugin directory). I don’t worry about the WordPress software itself (unless I’ve customized it), as it can be downloaded again without any fuss from WordPress.org.
But what about the database that holds all the WordPress content? In my control panel’s backup tool, I can generate and download a backup of just the database, or I can go to my hosting provider’s phpMyAdmin interface and export the contents of a database manually. At this point I’ll simply defer to the WordPress database backup instructions because they take into account several different management systems.
The key point to remember here is that if your site is WordPress-driven, simply downloading the files you can see is not backing up the content of your site.
The same will hold true for other content management systems you might have installed and use: there’s the presentation layer and then there’s the data that sits behind it. You need to remember to back up both, and do not rely entirely on your hosting provider to do it. Sure, it will add a few minutes to your work week, but isn’t that few minutes a lot better than potentially losing all of your content? The Wayback Machine and Google Cache can only do so much.
[The image in this post is of a lonely stack of floppy disks, taken by Flickr user twinleaves and Creative Commons licensed. Don’t back up your web site on a bunch of floppy disks. The picture is for entertainment/nostalgia only.]