Backing Up Isn't Hard To Do

Dr. Dobb's Journal March, 2005

By Jerry Pournelle

Jerry is a science-fiction writer and senior contributing editor to BYTE.com. You can contact him at jerryp@jerrypournelle.com.

The Chaos Manor computer system consists of more than a dozen workstations networked into an Active Directory Domain through three Windows 2000 Server systems—one the "master" and the other two online at all times, ready to take over if Imperator fails. It sounds needlessly complex, and really it is: I could do everything we do here with considerably less computing power. But one reason I have a complex system is to help me understand the needs of readers. Many do have small businesses that require a bit more computing power than I typically need. Next month, I'm converting to Windows 2003 Server for the same reason: What I have is more than enough for me, but for many readers it's conversion time and I need to understand their problems.

Most of the actual work here is done on three machines: Lance, which is Roberta's system on which she does e-mail and takes care of sales of her reading software (http://www.readingtlc.com/) and other such matters; Anastasia, my main communications system, which runs Outlook, FrontPage, and does web crawling; and my "Main" machine on which I write all my books, play games, surf the web for web stuff that's likely to be cut-and-pasted into Word documents, and generally do everything else. That machine used to be a D850 RAMBUS system called "Sable"; as we'll see it has been replaced with a new Prescott named "Wendy."

With only three major workstations to worry about, backup ought to be simple: two OUTLOOK.PST files (mine and Roberta's) and all the new Word documents. Provided that OUTLOOK isn't running (you can't copy the OUTLOOK.PST file when OUTLOOK is running; you can extract its information, but that's painful) a couple of batch files will do the job.

Assume that my backup machine in the server room has an F:\ drive, and contains folders for the three machines: Lance, Anastasia, and Wendy. Then all that's required to back up files that aren't open is to open a command window (nee "DOS window"). Assume that Wendy is mapped to the backup machine as W:\; then the command from the backup machine is XCOPY W:\*.doc F:\WENDY\ /e/s/d/y, which goes out and grabs every .doc file and puts it into the proper folder under F:\WENDY\, creating folders if they don't already exist, and copying only files newer than ones it already sees. Another command seeks out *.pst, again with the /e/s/d/y switches (open a command window and do xcopy /? if you don't understand the switches). Run a batch file with both those commands and all Wendy's documents and pst files are backed up. Do the same for Anastasia, and again for Lance, and the job is done. All critical work saved, even assuming I didn't make multiple copies of new creative work at the time it was written.

In practice, it is a little more complex than that. I do have some other critical work, like invoices and accounting records, but that all resides in one folder which is the subject of yet one more xcopy command. Still, that's the principle of the thing, and it has been the system I have used for years. All of this could and should live in a single batch file.

The Main Machine Dies

The heading for this ought to refer to the death of a machine named Sable, but I can't quite bring myself to write that; superstition, I suppose. Sable is our two-year old Husky, the dog my kids call "the empty nest pet," meaning she is spoiled rotten. For some unaccountable reason I named the big D850 RAMBUS computer I have used Sable as the main writing machine. I ought to have known better because nothing lasts forever.

I had just installed Everquest II, a very large program, from 10—count them, 10!—CD-ROMs on the D850. The program went out online to get patches and revisions, and up popped a message: It couldn't update some files because the system saw them as read only.

That should have raised some suspicions. I had already had a few flakey moments with that machine; nothing it didn't recover from by turning it off and letting it rest, but there had been reports of voltages out of tolerance (Intel's System Monitor program that comes with Intel motherboards is very good about that), and a couple of times the system didn't boot up properly. I knew it wasn't in 100-percent reliable condition, and I should have taken this read-only thing as a warning to back up everything I possibly could before going any further.

Instead, I used a command line to mark all the files in that folder as R/W. I thought I was being very clever. Wrong. Instead, the machine simply crashed. Attempts to reboot would get part way, sometimes to the Windows XP splash screen, but it never got me to the point that I could copy files. Booting in Safe Mode with or without networking (the system has a ZIP drive and USB ports, so if I could get it running at all, I had ways to sneakernet files out of it) didn't work either. That machine just wasn't going to boot.

The first moral of this story should be obvious. If a system does something entirely unexpected, like telling you that files are read-only when there is no reason for them to be read only, it's a clue. Back that system up, pronto, there's no time to waste.

I didn't do that, and now it wouldn't boot. Well, I thought, what have I lost? It can't be much, because I did copy all my work to other machines, and the last time Larry Niven was over, we copied everything we did to his ZIP disk as well as to Silver, the machine he works on here (Niven likes the Microsoft Natural "hump-back" keyboard, so I keep a machine set up with one of those just for him). I did use Sable as the backup machine for accounting, but the primary accounting machine (which runs Windows 98; I wrote that program in CBASIC in 1982 and I see no reason not to use it, but Windows XP doesn't much care for it) was still operational. I quickly went to that one and made backup copies of the accounting files to three other places; no point in tempting fate. But I surely hadn't lost anything else.

Still, it would have been good to be sure, so we put the failed Maxtor DiamondMax disk into another machine as a secondary drive. Alas, Windows sees the disk fine: But it doesn't see any files on it. None whatever, and it wants to format it. We tried several things including Partition Magic, but nothing worked; all the files on that drive seem to have vanished.

So I replaced Sable with Wendy, and began work.

What Was Lost

I soon found what I had lost—a bunch of utilities I use every day. Most, like Spybot Search and Destroy and Adaware were installed on other machines and it didn't take long to bring them over to Wendy. Others, like Notepad Pro, had been on the machine that preceded Anastasia, and on Sable, but I hadn't made other copies, and now were just gone. Of course, I can download that again, and will, but I can't just transfer it, and some of the data files are gone.

Diskmapper is gone. Once again it's not that hard to find it and reinstall it, but I had never backed it up. Some notes I had started in the latest version of Info-Select (nee Tornado Notes) were gone: They use a different format from previous versions. I don't use Info-Select a lot because they keep changing their rules, and now you can't have two copies of the program on the same network and move data between them: That's a deliberate decision on their part, as it was a deliberate decision on mine to stop using the program, although at one time it was a very useful freeform database. One day I'll find something to replace it; indeed, Notepad Pro was the replacement, and while I can restore Notepad Pro, the files of passwords and random data I kept in that format are probably gone.

The Thumbs Plus database of photograph files is missing. This is again no big problem because I keep multiple copies of all photographs, as well as periodically writing them off to a DVD, but it's still annoying. I'll have to reinstall Thumbs Plus and let it spend a couple of hours spidering my photo files.

While I was writing this I found another trivial loss—the Toolbar configuration for Word. Word has gotten complicated enough that getting everything set just right takes a while, and losing that requires you to do it again. The Special Dictionary, built up over the years, was gone. I have a separate .dic file for every novel (after all, I make up words and have alien names in my stories, none of which I need in my nonfiction dictionary), and there's a pretty good special dictionary over on Anastasia; for that matter I can consolidate dictionaries from years ago. Still, it takes doing, and that too is something I should have backed up and didn't.

I could continue the list but surely the point is made? In addition to all the things I thought of, there were many other files I ought to have been backing up and didn't.

The New Backup System

Clearly, what I should have been doing was backing up files from a central point using the network. There's a problem with that: You can't copy open files, and there's never a time when I'm certain to be away from my desk. When I can't sleep, rather than practice lying in bed staying awake, I just get up and do some work or read a book, or even play FreeCell.

Anastasia already has a backup system. The primary drive is a RAID 1, which is a pair of disks in a mirrored array. Both would have to fail before I lose all the data. The next step is to do that for my main writing machine, and I will. Even so, this only protects me from hard drive failures. It does nothing for operator error.

On the other hand, we've had a great backup system for a single machine going on for weeks: The CMS external USB 2.0 backup system that was installed on Silver, the machine that Niven and other visitors use. It was put there because it was a convenient place for it; but it has worked so well I am tempted to take it from Silver, reformat the disk, and install it on Wendy. When I mentioned that to CMS they made me a better offer: They're sending a couple more units, and I'll put one on Roberta's machine, and one on Wendy, and that way both our main machines will be backed up automatically and without our having to worry about it.

The CMS backup software nags you if you forget to make a backup; but it does it politely, and it works in the background so that on fast machines—in our case, Prescotts—you don't notice that it's working at all. The more I use this, the more enthusiastic I have become, and I only wish now I had installed the first CMS unit on Sable before her drive went west.

Live and learn. No one gets the backup religion until there's a disaster. In our case it was a lot short of disaster, but I'm not waiting for a more serious warning. We're doing a lot of backup now, but I won't be happy until it's automatic.

I still wish that Seagate, which bought Palindrome, would get that wonderful backup management program out again. It really worked, doing everything you ever wanted a backup management system to do.

Winding Down

The game of the month is Everquest II, which I've had fun with. The book of the month is David McCullough's John Adams, a very readable account of one of the most intellectual of the Founding Fathers. Without Washington's charisma and leadership we would never have been able to form the Union, but without Adams and his legal sense it is not likely to have held together long. Washington, Hamilton, and Adams were all pretty essential in the making of the New Order of ordered liberty. Incidentally, although Adams supported the Sedition Act, which allowed punishment and suppression of "seditious libel." He would have been the first to denounce the new Treasury regulations requiring publishers in the United States to obtain a federal license before publishing dissenting works condemned by their home countries—regulations that would have required, for instance, a license to publish Dr. Zhivago, or dissenting works out of Cuba. Punishing sedition after publication upon proof that it is seditious libel is nowhere near the same thing as requiring a license before publication: Whatever else the First Amendment was intended to protect, it most certainly abolished the very notion of prior restraint, and Adams would have been among the most vigorous opponents of anything like federal licensing for publications.

Another book of the month is Neal Stephenson's three-volume series ending with The System of the World. This giant exposition into the 17th and early 18th Centuries is a tour de force. Parts of it are hard to read and some of it is needless, but it's certainly a worthwhile experience.

The first computer book of the month is James C. Foster and Steven C. Foster, Programmer's Ultimate Security DeskRef (Syngress, 2004; ISBN 1932266720). Encyclopedic in form, it is precisely what the title says it is.

The second computer book of the month is a pair of O'Reilly books in their "Hacks" series: Sid Steward's PDF Hacks (O'Reilly & Associate, 2004; ISBN 0596006551), and Shannon Sofield's Paypal Hacks (O'Reilly & Associate, 2004; ISBN 0596007515). I've mentioned before that Amazon and Lightning Press have a system through which you can sell documents through the Amazon store. Basically, you buy ISBNs from Bowker, put your documents in PDF, Microsoft Reader, and other formats as you choose, set a price, and upload to Lightning, after which you're a publisher, and your works are listed in the Amazon index. Francis Hamit has been doing this with his magazine articles and other publications, and while sales build slowly, they do build. The PDF Hacks book is useful in getting material into the right format; anyone who works with PDF needs this book. The Paypal books told me a lot about using Paypal, and I'll be incorporating some of that into my web site.

DDJ