[Previous] [Contents] [Index] [Next]

Suggested Use

Choose the frequency of your backup procedure. This is done by asking yourself how many days' work you can afford to lose. For the example about to follow, say it is a week. At the beginning of the week use the scdir program to create a directory report of the entire hard disk. Save this as the first file on a tape. Next backup all the files on the hard disk, especially ones that you never change, like the operating system files. Run SecondCopy's verify command with a '*' as the pattern. If any files fail to pass the verification tests, consider the tape suspect and save them again. Put the tape away, perhaps taking it to another building.

Initialize a fresh tape, giving it a name that indicates it is a partial backup. Each night, use the files program to find the files whose modify bits have been turned on. Pipe this list into the SecondCopy program using the "save incremental" option. Keep this tape handy. If you lose any data during the week, restore it from this tape.

When the next week begins, do one last incremental backup. Then initialize a third tape. Do a complete backup and verify on the third tape. Take the third tape to the vault in the far away building and exchange it for the first tape. Bring the first tape to your site and leave it alone until the next scheduled complete backup. You may re-initialize the daily backup tape the next day.

Don't ever try to get by with one backup tape. As soon as you initialize the tape all of the files on it will be lost. It will be as if you had no backup at all. You won't have any means of restoring files until the current save and verify actions finish. A lot can go wrong during that time.

If you lose a hard disk and must restore an entire tape, prepare the disk as you would a new one. Use "fdisk", "mkfs", and "fsck". Restore the first file on the backup tape, which should be the "dir.report" file. Run "scdir recreate < dir.report" to create a new directory tree and then restore the remaining files. If the disk was bootable, use the "boot" program to complete the restoration of the disk.

Incremental and Full Backups

We suggest you create a shell script called backup.daily with the following commands to perform incremental backups.

    find / \( \( -type f -o -type l \) -newer last_backup \) \
           | secondcopy /dev/st0 verbose continue "errors /tmp/slog" \
           "save incremental" 

touch -am last_backup

Then create a shell script called backup.weekly with following commands to perform an unattended backup of your entire hard disk.

    echo "/tmp/dir.report" >/tmp/list

    find / \( -type d ! -pname '/proc/*' \) \
         | scdir report >/tmp/dir.report

    secondcopy /dev/st0 verbose continue "errors /tmp/slog1" \
         "init Your_volume_name" save

Next add an entry to your cron file using crontab.

    0 18 * * 1-5     backup.daily

    0 18 * * 5       backup.weekly

Before you leave on Friday, make an incremental backup of your hard disk. Do it manually so you can see that everything is working. Then put a new tape in the drive and take the old tape to a different location. Cron will perform an unattended backup of your changed files during the business week and a full backup at the end of the week.


[Previous] [Contents] [Index] [Next]