Backups

Last night, I completed an important computer project for myself, and I want to share what I figured out in the process. The objective is easy, reliable and recoverable backups.

Basic Principles

  1. If it's quick and easy, you will back up every time you shut down; otherwise it won't happen.
  2. Having to change media mid-backup makes it more painful and less likely to become a habit.
  3. It's a waste of time and storage backing up huge programs for which you have installation disks.
  4. Capturing all the data that matters to you is too difficult if it's scattered all over your disk.
  5. Fancy compression and encryption make it harder to find what you want to restore.
  6. Alternating backup media means that when one backup tape/disk/cartridge fails, all is not lost.
  7. Periodic archival snapshots can help rebuild corrupted databases. They can be stored compressed.

Task Outline

For different computers, I have used different media. For my palmtop, I have used floppies (1- or so Megabyte). For my laptop, I have used a Zip drive (100-Megabyte). For my desktop, I use a Jaz drive (1-Gigabyte). For friends, I have set up Ditto tape drives. The general issues are the same.

  1. Gather all your data in one place. In recent versions of Windows, the conventional place is a folder (directory) called My Documents. The challenge is that some programs, often in the Program Files folder, keep data in their own directory. If you can tell the program where to store data, have it do so in a folder under My Documents. If the program doesn't ask where to store the data, move the entire program under My Documents. The DOS directory name for the My Documents folder is \mydocu~1, and I had to move my entire email program, Eudora, as well as my financial program into this directory.
  2. Find a convenient way to copy your data onto your backup device. In Win 95 and 98, you can simply drag the My Documents folder onto the backup device's icon in My Computer. I have taken that approach a step further by writing a DOS batch file (using xcopy), which allows me to maintain an older backup on the same device. I've created a desktop shortcut to that batch file, so I can run it easily just before I shut the machine down.
  3. After I do the backup, I swap the cartridge with the alternate cartridge, so the most recent backup is not in the machine (vulnerable to errant erasure), and the older backup is ready to be replaced. If I need to restore a file, I can switch them back and locate the desired file from the most recent backup. Since I'm using the operating system to do simple directory (folder) copies, their hierarchy is preserved on the backups.

Batch File

Rem backup Doug Hirsch PS1810 c:My Documents to e:\backdir

e:
cd \
deltree /y backdir.old
ren backdir backdir.old
md backdir
xcopy c:\mydocu~1 e:\backdir /s/e

Open Issues

Most of my databases are on my palmtop. I am working on a system of maintaining periodic archival backups for it. The general approach is to keep successively less frequent copies of older backups. I expect to maintain six backups from the past fortnight, one per week for the past month, one per month for the past quarter, one per quarter for the past year, and one per year for the past decade. I have not yet figured out a convenient structure or mechanism for this.


$Date: 1998/10/29 03:21:42 $ (UTC) by Doug Hirsch