5. Testing: Test Your Backups

If you really believe that your backups are sound, would you be comforable erasing everything on your hard drive right now, and restoring it from backups?

If not, why not?

No matter how sophisticated or comprehensive your backup system is, you will never know if it works unless you actually test it. Without testing, you can have no confidence at all. Here are just some things that can go wrong with backups through no direct fault of your own:

Failed backup software: The backup software simply fails and when you restore the data from the backup media, many files are missing or corrupted. It's not good enough to rely on the backup software to tell you that it has securely written a tape. In a real and recent case, involving one of the most popular backup products on the market, a tape could not be properly reloaded, even though it was written with the "verify" option turned on.

Incomplete data: You discover that someone in a hurry to do a backup one day configured the backup software to backup just their directory, and never got around to resetting the configuration. So your twenty-seven backup tapes all consist of a copy of just one directory.

The magnet: You store your backups in a safe-deposit box in a bank. However, someone has stored their very precious collection of rare magnets in the box next to yours.

Encryption: Back in the dark ages when the backup software was installed and configured, someone set it up to write encrypted backup tapes. Now nobody knows what the password is.

Old version: You find you can't reload an old backup tape because it can only be read by an earlier version of your backup software which you recently upgraded.

Poor quality media: You discover that the media you're using for your backups is of poor quality and you can't get the data off it after six months.

Compression: The new compression feature in the latest version of your backup software turns out to compress better than anyone thought...

Upgrade: Your backups appear to be working. You even tested one once and it worked. But you upgrade your operating system and a bug in the backup software manifests itself, causing the backup to fail.

Tape breakage: Your backup tape gets broken during the backup and you send it offsite without noticing.

Backup crash: You set a backup going one night. The next morning you come in and find the tape on your desk. A friendly work collegue has taken it out of the drive and left it for you. What they didn't tell you was that they found the machine rebooted. The machine crashed during the backup and the tape drive automatically rewound the tape.

These are just some of the things that can go wrong. The important thing is to realize that there is a huge number of things that can go wrong with a backup operation. Some of those things will be intermittent. Others will be systemic, meaning that all your backups will be useless.

The only way to tell if your backups are working is to actually load a backup tape and see if the data is correctly restored. This may be difficult or impossible for many users who have filled their hard disk to capacity. However, testing your backups is such an important activity that it really is worth either reducing your disk usage to less than half of your hard disk, or finding another hard disk, so that you can perform a test restore.

If you feel that such testing is unnecessary, ask yourself if you are ready to face the backup challenge: would you feel comfortable erasing your hard disk right now, and restoring it from your backups? If not, then think again.


The Ultimate Test

Once you've performed a test restore of a backup, and the restored data is sitting on disk, how can you tell if the restored data is sound? The answer is that you can't; not "manually" anyway. The best that you can do manually is poke around on the disk looking at particular favorite files and seeing if they look OK. There's no way that you can manually check that all of your files have been correctly restored. So how can you be SURE that your backups are working?

The solution is to perform an integrity check on the restored data using the Veracity data integrity tool from Rocksoft. Here's how it works:

1. Take a snapshot of the directory tree: Before making the backup, go to the top of the directory tree being backed up and give the command: veracity snapshot. Veracity will read all the files in the tree and generate a snapshot file called 0veracty.vsf in the root of the tree that contains cryptographic signatures of the files in the tree. Typically such snapshot files are about 1/200th of the size of the tree itself.

2. Backup the tree: Backup the tree onto your backup media (e.g. tape). The Veracity snapshot file gets backed up along with the other files in the tree.

3. Restore the tree: Restore the directory tree onto disk.

4. Check the tree: Go to the top of the restored directory tree and give the command veracity check. Veracity will read all the files in the restored directory tree, calculate their signatures and compare the signatures to those in the restored snapshot file. If any file has changed since it was backed up, Veracity will let you know.

This procudure can be used to check any tape, even if it's a few years old, because the snapshot file (of how the files are supposed to be in the backup) is carried on the tape itself. The snapshot file itself is loaded with checks so that if IT is corrupted, this will be detected too.

Thus, Veracity provides a way to be sure that your backups are working by explicitly certifying that every single bit in the original directory has been correctly restored by the backup system. Can you afford not to have the certainty that Veracity provides?

Veracity is a commercial software product that is available from Rocksoft for a wide range of platforms including Windows95, WindowsNT, Macintosh, MS-DOS, SunOS, Solaris, Digital Unix, OpenVMS VAX, OpenVMS Alpha, IRIX, MS-DOS, HP/UX, AIX, Linux, FreeBSD, NetBSD and BSD/OS.

Fully functional demonstration copies can be FTPed at any time. Just visit the install page in the Veracity web.

Back To The Tao

Sanctuary Webmaster
Copyright © Ross Williams 1997. All rights reserved.