Archive for the ‘Storage’ Category.

Backups

Being a good computer user, I make backups. Even so, I’ve been kind of unhappy with my backup process, so I decided to try something a little different.

I’ve been using rsnapshot to backup personal files and settings that I think are important. But I’ve always had this uneasy feeling that something wasn’t quite right with my backups.

There are two important rules regarding backups:

  1. Have one.
  2. Be able to restore it.

That second one is where my concern was. The things I would backup include which Arch Linux packages I use. In theory, it shouldn’t be too hard to setup Arch Linux from a backup to the way I have it now. But I also host a website that uses mysql, and I think I’m backing it up correctly, but, you know, I’ve never tried restoring it, so I’m not really sure. Also, rsnapshot takes way longer to run that I thought it would.

So, I started using dd. My system is a good candidate for it because my primary hard drive and my backup are the exact same model. I was also excited to use it because I got to download and boot into the Arch Linux live CD again, which I haven’t seen in years. Good memories.

So, here’s how I do my new backups:

  1. Boot into the Arch Linux live CD.
  2. Take my external backup drive out of the fireproof box and plug it in.
  3. Confirm the names of the two hard drives.
  4. Use dd.
  5. Wait.
  6. Unplug the drive and put it away.
  7. Relax.

My dd command:

dd if=/dev/INTERNALDRIVEsda of=/dev/EXTERNALDRIVEsdb bs=1M conv=noerror

The benefits of using dd to make an exact copy of my entire hard drive are:

  • I can’t accidentally forget to backup something that I need to setup my computer. My data, my settings, my operating system, and my website all get backed up. Even my Haiku installation gets backed up!
  • If my hard drive fails, I can swap it with my backup drive and be up and running again in a matter of minutes.
  • I’ll have a copy of the lastest Arch Linux installation media lying around, just in case.

Possible drawbacks include:

  • I only have one “copy” of my files, as opposed to one from from last week, one from the week before, and so on. I only ever had one copy, even when I used rsnapshot. I keep a backup mainly in case of a hardware failure, so one copy is all I need.
  • I can’t automate it. That’s ok, because I don’t keep my backup hard drive connected to my computer anyway. Maybe someday when I’m rich and famous I’ll be able to afford an external hard drive and an internal backup hard drive.
  • It’s easier to destroy my computer setup by making a mistake with dd than it is by making a mistake using rsnapshot. Well, be careful!

This has also been my first experience using the dd command. Such power. But, as with any power, it’s important to remember the old saying:

With great power comes great awesomeness.