Continued from Page 3
As for the user file system, it’s only fair that incremental
backups are done daily, and a full backup every week. The high frequency is again to
restore the latest state of the file system ASAP. So you would do an incremental backup of
the system areas as soon as you had your system ready after installation and do so each
time a change is made. Your user areas would be backed up fully at start, incrementally on
a daily basis, and a full backup every weekend. To have guard against tape errors,
it’s a good practice to retain the previous week’s set of backups—one full
backup and that week’s incremental backups. This way you’d be set back in time
when you extract the file system, but not too much.
In case of a crash, you would first install the bare system after
perhaps replacing the disk and then begin to extract the file system states, in the same
sequence as they were backed up so that the latest backup is extracted last. In case of
the system backup, you’d need just one extract, if you did an incremental backup each
time from the date of install. In case of the user file systems, you would extract the
full backup first and then the incremental backups for that week.
Extracting all files from an archive is simple. Assuming you have
archived the information with leading pathnames (using -P), here’s what to do:
# tar zxvf /dev/st0
If only a particular directory is to be extracted, specify that
particular directory as the last argument to tar.
There are other options in tar. -M allow an archive to be split
across tapes, -L allows you to specify the length of the tape after which to ask for a
fresh tape.
Typically, data cartridges used are DDS-I, 90 meter tapes that have
a capacity of 2 GB. Depending on the tape drive, compression can be enabled by using the
"mt" command in Linux. Try "mt -f /dev/st0 densities" to get a listing
of the densities of various drives and formats. DDS-II tapes give higher densities and
hence more capacity.
There’s another driver in Linux that uses the floppy drive
interrupt (IRQ 6). That device is /dev/ftape. It’s not commonly used as of now.
A commercial package available to do backups with a GUI front-end is
BRU (Backup and Restore Utility) (www.estnic.com/). One interesting option that BRU
provides is to estimate the backup size, number of tapes required, etc. An option for data
consistency check is also available. The big difference with BRU is its capability to
archive raw disk partitions. For example, one could use "bru -options -r
/dev/sda1" to back up the root partition of your SCSI disk. BRU is an interesting
utility to use given that it bunches together the capabilities of tar, dd and dump (a
command available to archive file systems on Solaris—tm).
Before I sign off a few tips for those of you who handle sensitive
data and require low downtime. Here’s my experience—downtimes are largely due to
disk crashes or power supply failures. Disk crashes occur when you don’t want them
to: December 31 is my favorite; happened three times so far! Build backing up into your
routine; automate them when possible. Do not automate full backups if you can avoid it.
Have someone around when they are going on. After backing up, ensure that data is backed
up properly by actually extracting a file from that backup. This is still not foolproof.
You might want to add a file to the archive and then extract that file. In the process,
the entire tape is scanned since the added file is at the end of the archive. Finally, as
a thumb rule, I discard tapes that I use for full backups after about 60 writes; at a
frequency of once a week, they last me for a good year.
Page(s) 1 2 3 4 5 |
|