Backing up filesystems

Maintaining backup archives and records

After creating your scheduled backups, store them in a secure, fireproof place so that you can use them to restore your data in the event of a hardware failure or other system problem that causes data loss. Maintaining backup archives involves:

Labeling backups

Label your backup media with meaningful and accurate information so you will be able to locate your data easily at a later date.

Sample media label

Computer: pdxbox Backup Level: 0 (Complete) Date: 30 Dec 1994
Filesystem: /usr
Save Until: 30 Dec 1995
Performed by: elvis Volume 1 of 3

The date on the label, and the date from which you calculate the ``Save Until'' date, should be the date of the business day last covered by the backup. This is to avoid confusion if it becomes necessary to restore information from this tape.

Color-coding labels can help you easily locate a backup by backup level.

Sample backup label color scheme

Backup level Volume size Save for how long Vitality (importance) Label marker
0 (Complete) - 1 year critical red sticker
1 - 4 months necessary yellow sticker
2 - 3 weeks useful blue sticker

If there is more than one tape for a single backup, mark the date label on each volume to indicate the volume number and number of volumes, such as ``1 of 2'' and ``2 of 2'' for a two-volume backup. Finally, place a label on the side of the box or enclosure marked with the name of the computer, the filesystem, and the backup level completed.

See also:

Keeping a backup log book

We recommend that you maintain a written log book for each computer at your site. Record all the information about the hardware and software configuration for each computer, as well as all maintenance information (such as when a breakdown occurs and what was done to correct the problem).

In addition, use this log book to keep track of the backup history for each computer. If your system is damaged such that the online backup history information is unavailable, you can use this information to construct a backup set from which to restore your system.

For each backup of the system:

Last day included in the backup.

Name of the filesystem backed up (such as ``/usr'').

Backup level
Level of the current backup (such as ``Level 2'').

# Volumes
Number of tape volumes in the backup.

Start/Finish Time (optional)
Time from the start of a backup of a filesystem until the last error check is completed.
If there are problems with the backup, record these in the log book as well, including any error messages that occur.

See also:

Rotating and archiving backup media

You should retain backups so that you have between 6 and 12 months of media on file. The typical media rotation times are:

Backup level Save for
2 3 weeks
1 4 months
0 (Complete) 1 year
This means that if you follow this schedule, you can safely reuse your Level 2 backup media after 3 weeks.

You should periodically archive your filesystem backups offsite. In the event of a fire or other catastrophe, you can use these offsite backups to restore your data.

See also:

Removing file lists from the backup history

If you specified that the backup contents lists be saved, the Backup Manager automatically saves the names of the files and directories that were backed up each time you perform a scheduled backup.

You should retain these file lists online for the backup media that you archive. When you rotate your media, you should also remove the file lists from your hard disk.

To remove these file lists automatically, add an entry in the root crontab file to specify that cron(C) run the bshrink(ADM) utility at the desired times. The bshrink utility removes the stored file lists from the backup history after they have aged a specified number of days; bshrink does not remove any other backup history records.

The syntax for bshrink is:

bshrink [ -h hostname ] "filesystem backup_level days" [...]

the host to manage (optional). Unless specified, bshrink removes files from the local host.

the filesystem device name (for example, /dev/u).

the backup level:

Level 0 backup

Incremental Level 1 backup

Incremental Level 2 backup

an integer defining the number of days to save the backup file lists for the given filesystem and level.
To exclude a filesystem name or backup level, precede it with the keyword NOT. To include all filesystems or backup levels, replace the option with the keyword ANY.

If you use the media rotation schedule in ``Rotating and archiving backup media'', use this schedule to remove the backup lists from your hard disk:

Backup level Remove after bshrink options
2 3 weeks "ANY INCR2 21"
1 4 months "ANY INCR1 120"
0 (Complete) 1 year "ANY COMPLETE 365"
Once you decide on a backup list removal schedule, add a line to the /usr/spool/cron/crontabs/root file to run bshrink according to your schedule.

For example, to run bshrink at 2:00am every morning on the local host, add this bshrink line:

   0 2 * * * /usr/bin/bshrink "ANY COMPLETE 365" "ANY INCR1 120" "ANY INCR2 21"
In this case, bshrink removes file lists from the local host for: To run bshrink at 5:00 pm every Sunday morning on the host pdxbox, add this bshrink line:
0 17 * * 7 /usr/bin/bshrink -h pdxbox "ANY COMPLETE 365" "ANY INCR1 120" "ANY INCR2 21"

NOTE: For each host from which you want to remove file lists, you must specify a separate cron entry.

See also:

Next topic: Verifying backups
Previous topic: Running scheduled backups

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003