Wednesday, March 12, 2014

Backup Success

The new WD "My Book" 2TB drive is installed and working. My life is backed up. My toilet isn't. Life is good!

Prior to the demise of the pocket-sized WD Passport that I used for backup until it quit last week (see post before last, below) after six or seven years of very satisfactory performance under not infrequently adverse conditions, I used GNOME's "Déjà Dup" backup utility provided with Ubuntu 12.04 LTS. Déjà Dup had several IMHO significant shortcomings, and I was looking to replace it: Déjà Dup produced specially formatted files that gave no access to individual backed‑up files except through... you guessed it... Déjà Dup. There was considerable debate in reviews of Déjà Dup, and even on the comment thread in the Ubuntu free s/w archive, about whether restoring individual files even worked right: some people claimed it restored an entire directory, possibly with disastrous collateral damage to files other than the one intended for restoration. Most annoying of all, there was no facility of any sort for browsing the contents of a Déjà Dup backup... the backup was just a humongous gigantic file. Not good!

Installing the WD "My Book" involved learning more than I ever intended to know about how Linux tracks filesystems. Why? Because WD provides tools for purchasers using a PC or a Mac. There's no problem seeing the drive or its contents in recent versions of Ubuntu Linux... the familiar Windows NTFS format works like a champ... but if you want the out-of-the-box main partition to auto-mount, you have to give some minor cryptic instructions in some files Linux knows to look for. Mother Web will tell you how to tweak those files, but I regret to generalize by saying that not all Linux adepts are the best writers of English in the computer biz, and comprehending exactly what to do takes a fair amount of browsing and trying. In any case, the one-and-only partition on this drive (as shipped) auto-mounts on bootup just fine now, and can be used just like any other. The thing is pretty fast, too.

So I moved on to the backup conundrum. The problem has two extremes: one is faced by sysadmin's with dozens or hundreds of machines networked in an assortment of ways and probably mixed on the network with PCs and/or Macs. There are expensive commercial solutions for that extreme. On the other extreme is the home user with one or a couple of PCs or Macs to back up. Apparently, WD supplies decent tools for that purpose which you can install from the drive. Unfortunately, there doesn't seem to be a WD backup utility for Linux.

After a bit of browsing and reading, I decided what I needed was not so much a formal backup tool as a snapshotting-synchronizing tool, something that copies all files in specified folders of your internal HD to the backup device the first time, then refreshes/synchronizes that backup each time you run it again, copying only the files required to accomplish that. That gives you the effect of a series of full snapshot backups, without the overwhelming disk space requirements that such a backup would impose. And folders and files look just like the originals... you can browse them with the most ordinary of apps, or, of course, navigate them with the snapshotter... it is its own browser.

In short, my choice was "Back in Time" ... a tool apparently originally developed for the Mac, then redeveloped for Linux by using several common system utilities wrapped in a convenient graphical interface. Serious Linux virtuosos might view it with contempt for all I know; people who can tap complicated scripts exactly suited to their own needs probably don't need Back in Time. But I am no script virtuoso, and on my worst days, I'm kinda lazy... so Back in Time will do the job for me. Tonight I tried it out for the first actual backup, backing up everything under /home/myusername. Even with two versions of all my photos and a bunch of other junk, it took well under 30 minutes for the initial (full) backup. Subsequent ones should be much quicker.

(Sorry; no pic of the drive. It's butt-ugly.)


  1. Good enough. I use rsync, ZFS on Linux, and a port of FreeBSD's Periodical Snapshot scripts to simulate Apple's Time Machine on my external hard drive, but it's all good.

    Rant of the evening: Why isn't there anything like Time Machine for Linux or Windows? Apple did it right -- it Just Works, and it allows you to restore your system to as of the last backup without any special wizardry, the last thing the OS installer asks is "do you want to restore your system from your Time Machine backup?" and if you answer "yes", there ya go -- in an hour or two you'll have your computer back *exactly* the way it was before the hard drive crashed. I know this is so because I had a cat knock my Macbook off the desk and crash the hard drive, and had to replace it. It Just Worked.

    But that doesn't seem to be a priority with the Linux geeks. Thus my ZFS hack. Which really IS a hack, I'm using ports of software from two non-Linux systems (Solaris and FreeBSD) to do it, and restoring my system to the way it was when the hard drive crashed will decidedly *not* be a case of "It Just Worked". Sigh.

    1. "I use rsync, ZFS on Linux,"

      rsync is one of the several utilities Back in Time uses. Back in Time gives the impression of being well thought out and well-constructed. (Déjà Dup was originally the product of a software class. 'Nuff said.)

      "Why isn't there anything like Time Machine for Linux or Windows?"

      I don't know. There used to be something in Windows XP among Microsoft's "toys" called SyncToy; it was much like Back in Time, and I happily used it for quick backups... for as long as I was using XP. It vanished from the M$ canon in later Windows versions; I was sure sorry to see it go.

      I googled ZFS and found there is a ZFS for Linux, apparently developed at LLNL. Ubuntu is one of the listed distros on its main web page, with a link to launchpad for a stable version. Don't know if that suits your purposes or not.

    2. Yes indeed, that is what I am using (but on Centos, not Ubuntu). But to script together rsync, ZoL, and periodic, I had to write a couple of shell scripts (plus port periodic from FreeBSD). The end result is that I have something that is somewhat similar to Time Machine if I just want to retrieve a single file that I accidentally deleted yesterday -- I just go to the snapshot from two days back and fetch it -- but in the event of a catastrophic failure (my SSD in my laptop deciding to die again, for example), rebuilding my laptop is a big production. Been there, done that, got my data back from ZoL but it was a PITA.

    3. Oops. You said right there that you use ZFS on Linux. I find that when I read tech material, skimming is a bad idea! :-)

    4. The two occasions in the past 10 years in which I had to recover most or all of the contents of my HD on my main machine were indeed a PITA. I had backups of most things, but if I want my photos from 2010, I'm going to have to cart my laptop over to Micro Center and say "please remove the virus." (Ironically, it was NOD32 that failed to stop it in the first place... fully updated, but it failed to stop it anyway.) Maybe the photos will be intact; maybe not... but for all my preparations over the years, there was a span of about 6 months in which I was very irregular about backing up, and I got hammered during that time.

    5. For clarity: it's a laptop I no longer have any other use for.



• Click here to view existing comments.
• Or enter your new rhyme or reason
in the new comment box here.
• Or click the first Reply link below an existing
comment or reply and type in the
new reply box provided.
• Scrolling manually up and down the page
is also OK.

Static Pages (About, Quotes, etc.)

No Police Like H•lmes