Inevitably, something will go wrong: A plan for backup

A while ago, I wrote a piece about the need to backup your home computers.  After tweaking the full-backup script on my desktop today, I thought it would be useful to update the information. 

Before we get into it, I hear you say, “But Steve, I’m not technical.  I don’t understand about scripts and I have a PC.”  For you, I recommend either Mozy or Carbonite.  Both are “set it and forget it” systems that, for about $55 a year, will backup your computer into the cloud and keep that backup current whenever it is connected to the internet. Installation is trivial and both have excellent technical support.

I’m backing up 4 computers with four backup methods:

  • Fedora Linux Desktop
    • backup of my home folder to a Linux server
    • backup of entire file system to external USB drive
  • Apple MacBookPro
    • backup of entire file system to external USB drive using Time Machine
  • Sony Vaio notebook (MS Vista)
    • image backup of hard drive to external USB drive
  • Fedora Linux Server
    • backup of entire file system to external USB Drive

The Sony Vaio image backup uses CloneZilla.  CloneZilla is a free product that works like Symantec Ghost or other commercial image backup programs. I boot the computer from the CloneZilla CD, plug in the external USB drive, and create an image of the hard drive.  I use image backup because I’m protecting this system from a failing hard drive. The most likely restore scenario is a “bare metal restore”, not a file restore.

The Linux systems use a simple rsync script for full file system backups. It’s attached below. The main file, “do-backup”, does the backup.  The companion file, “do-backup-excludes”, excludes certain virtual parts of the file system from the backup. Restores are easy because the file system is duplicated (through 5 iterations) on the backup media.  Files can be restored by a simple copy or by using rsync.

I backup my desktop home directory to the server using a script based on rdiff-backup.  Unlike my do-backup script, rdiff-backup uses a combination of rsync and diff files to produce a backup with multiple increments. Restores from increments other than the most recent backup must use the restore functions of rdiff.

The Apple MacBookPro uses Time Machine for backup and like most things Apple, it just works.

Data in the Clouds

Not those clouds, not Mr. DataI’ve been using cloud data storage for a long time, and you may be using it, too.  At a previous employer, we used LiveVault for near real-time offsite backups.  I have several hundred megabytes of mail stored at Google.  You are probably storing mail with your provider.  We’re already in the cloud, with only a password between us and the public.  If you use Mozy or Carbonite, both of which I recommend for personal use, your PC has been duplicated somewhere “out there” or “up there”.

I just signed up to use ADrive. They offer 50 GB of free storage.  For a few extra bucks, you can get automated backup tools.  I’m not exactly sure what I’m going to do with ADrive, but I thought I’d check it out.  In the process, I’ve begun defining my ideal personal or small business cloud storage solution.  It would offer

  • PKI encryption using the openGPG standards
    The process of sending to the site would encrypt with my GPG public key. Thus, only I could decrpypt data when downloading it.
  • Two factor authentication
    Access requires both a password and a single use code sent via SMS.
  • Crossplatform support
    Windows, Mac, Linux, with command line tools and, in the Linux world, support for rsync

What do you want from an inexpensive, comsumer cloud storage solution?

Do you have a backup?

At the office, your IT guys probably back up your computer for you or force you to store critical files on a file server that they back up. I'll write later about how the Institute does backup at a corporate level. The concern of this posting is backing up personal computers. What are you going to do if your hard disk starts making a funny clicking sound, then stops spinning? Or when your notebook drops out of your hands and tumbles down a flight of stairs? Or when a nearby lightning strike fries your 5 year old surge protector and everything attached to it?A number of friends tell me that they copy critical files onto CDs or flash drives. But how often? How much data are they willing to lose, assuming they've ever made that calculation. I know that backing up my 24GB of music, years of financial data, plus all the email I've ever sent or received since 1992 is a daunting task. The simplest form of backup is the one you don't think about.. Here's how I backup my computers:

  • Sony Vaio notebook running Windows Vista Because this system is not in use all the time, I back it up before taking it on a trip or before major software installations. I use Acronis True Image (version 11) and create a fresh image backup each time. With compression, the image comes out to about 20GB, so I back it up to my home server. If you don't have your own home server, an inexpensive USB 2.0 external hard drive would be an excellent choice.
  • Dell Dimension running Fedora 8 12 Linux On this Linux system, the critical files are located in well defined locations: my home directory contains all of my personal files and the /etc directory contains system configuration files. Both get backed up to my home server. I use slightly tweaked versions of the scripts posted here. The backup is kicked off automatically each morning right after I leave for the office.

Once you have your backups, you need a restore strategy and you need to test it. My linux backup strategy works well. When I upgraded this system from Fedora 7 to Fedora 8, I did a clean install. That meant reformatting the disk, installing a new version of the operating system, then using rsync to restore my home directory and copies of some system configuration files. From inserting the installation DVD to having a working system (with a few non-critical exceptions) was a matter of four hours. My Vista backup strategy uses image backups. This means that Acronis creates a clone of my hard disk at the backup site. It's got all of my files — everything — and allows me to either restore a single file for the "oops" deletion event or, by booting from the Acronis CD, restore the system to its state at the time of the backup, whether or not I have a working operating system on the laptop. It's not important that you use these tools. It is important that you think through how you'll deal with restoring lost data now, before its gone.