3. Preparation

NoteWARNING
 

Do your normal backups on their regular schedule. This HOWTO is useless if you don't do that.

Build yourself a restoration Linux disk. For this I now use Finnix. I have used Knoppix in the past. See the notes on Knoppix below. However, everything here is command line. We don't need a GUI. A GUI-less distribution (such as Finnix) will boot faster and can load itself into memory (so you can use the CD drive) even on a minimal machine.

In the past, I have used tomsrtbt. It is well documented and packs a lot of useful tools onto one floppy diskette. Unfortunately, the changes I've had to make in the scripts to handle more recent Linux systems cause problems for tomsrtbt. The tomsrtbt 2.0.103 tar is based on busybox, so remarks about it may apply to other Linux disties which use busybox. And tomsrtbt has other problems.

NoteWARNING
 

The version of tar included in tomsrtbt does not preserve ownership when it restores. This may cause problems for applications like Amanda. A backup and restoration tool, Amanda has several directories owned by its own user. The solution is:

  • Note which directories and files are not owned by root.

  • Note their owners.

  • Arrange to set the ownership correctly as part of the restoration process. E.g:

    bash# chown -R amanda:disk /var/lib/amanda

    You can also add that line to your scripts for second state restoration, such as restore.

NoteWARNING
 

tomsrtbt does not support restoring owners by UID/GID. To make backups suitable for restoring with tomsrtbt, remove the tar command line option "--numeric-owner" from the command line options for tar in the function crunch in the script save.metadata.

Next, figure out how to do the operating system backup you will need so that you can restore your normal backup. I used to follow Preston's advice and use an Iomega parallel port ZIP drive. The drives get approximately 90 MB of useful storage to a disk. I need about 85 MB to back up my desktop, so a 100MB ZIP drive may be pushing your luck. These days I use CD-RWs, NFS or USB sticks. For more on those, see the sections on using CD-ROMs and NFS.

3.1. Installing the ZIP Drive

Installing the ZIP drive is covered in the ZIP Drive HOWTO, available at the Linux Documentation Project and at its home page, http://www.njtcom.com/dansie/zip-drive.html.

3.2. Backup Server

You can set up a backup server for this process. Scripts on the backup server interact with the target machines (including itself) via SSH. They assume that your backup server user (root here, for simplicity) can log in with no password to the targets. This is necessary for unattended backups.

First, create a suitable directory to keep all the backups in. We'll call it backs. In backs, create a directory for each target computer. The first field in the directory should be the host name. Subsequent fields can be other useful information. For example, to preserve the last backup of a target before an installation of a new version of the distribution, I use an abbreviation for the distribution, e.g. "fc5". Fields are separated with periods ("."). So, for example, tester.f7. The host name is required because the scripts use that to determine which host to back up.

Copy the scripts get and restore into each target's directory. Then customize them for each host as needed.

Also create in backs a directory called scripts and put in it the script get.target. This is a library for the backup and restore scripts. It performs actions common to all backups and restorations.