Problem
I want to schedule unattended backups for my system. The Backup Manager does not seem to offer options to set up unattended backups. How do I set up unattended backups?
Cause
The Backup Manager is used for backing up filesystems on the spot,
that is, at the time the Backup Manager is invoked. To set up your
system for unattended backups, you must add an entry in the root
crontab file to specify that cron(C) run the cbackup(ADM) shell
script at the desired times. Solution
Follow the steps below to set up the root crontab file to fit your backup needs.
1. Change directories to /usr/spool/cron/crontabs:# cd /usr/spool/cron/crontabs2. Make a backup copy of the file "root":
# cp root root.save3. Use your favorite editor to edit the file "root":
# vi root4. Add a cbackup line for the filesystem you want backed up. For example, if you want to run a complete backup of the root filesystem on a 200MB cartridge tape at 2:00 AM every morning, you would add this line:
0 2 * * * /usr/lib/sysadmin/cbackup 0 200000 /dev/rct0 /dev/root
The first five values are integer values specifying minute, hour, day-of-month, day-of-year, and day-of-week, respectively. To specify every day of the week, month, and year, an "*" should appear in the last three fields (as in the above example).
The cbackup script takes four arguments. The first is increment
level (0, 1, or 2). In this example, we chose 0 for a complete
backup. The second is the capacity in kilobytes of the media to
be used in the backup. Note that only one volume can be used since
this is an unattended backup. The third is the name of the raw
device on which to make the backup. The forth is the filesystem
to be backed up. Since cbackup uses cpio(C), the filesystem must
be mounted when it is backed up.5. If you wanted to perform a level 1 (incremental) backup of the root filesystem every weekday morning at 2:00 A.M., and a complete (level 0) every Saturday morning at 2:00 A.M., you would add the following cbackup lines to the crontab file:
0 2 * * 1-5 /usr/lib/sysadmin/cbackup 1 200000 /dev/rct0 /dev/root
0 2 * * 6 /usr.lib/sysadmin/cbackup 0 200000 /dev/rct0 /dev/rootNote: With this set up, you will need to change the backup media between backups.
6. To back up more than one filesystem during an unattended backup, the cbackup script can be run sequentially. All filesystems must fit on the media being used. The best way to do this is to create a shell script in the /usr/lib/sysadmin directory that makes the sequential calls to cbackup. Then add an entry to root's crontab file that runs that script. For example, we could create a script called /usr/lib/sysadmin/bkup_script that will back up the root filesystem, the /u1 filesystem, and the /u2 filesystem. The bkup_script file would contain the following lines:
/usr/lib/sysadmin/cbackup 0 200000 /dev/nrct0 /dev/root
/usr/lib/sysadmin/cbackup 0 100000 /dev/nrct0 /dev/u1
/usr/lib/sysadmin/cbackup 0 50000 /dev/nrct0 /dev/u2
tape rewind /dev/xct0The length argument to the first cbackup command is 200000 because
the total capacity of the media at that time is 200MB. Length is
100000 for the second call because the root filesystem has been
backed up, reducing the capacity of the device to 100MB. You must
know how much space each filesystem requires when you write this
script. The device /dev/nrct0 is the no-rewind device so the tape
does not automatically rewind after backing up each filesystem.
The tape rewind command rewinds the tape after all filesystems
have been backed up.7. Now add an entry to /usr/spool/cron/crontabs/root that runs bkup_script every weekday morning at 2:00 A.M. The line would be:
0 2 * * 1-5 /usr/lib/sysadmin/bkup_scriptNOTES: The SCO ARCserve/Open products provide comprehensive backup
facilities which make scheduling unattended backups much easier.SCO ARCserve/Open Lite features include:Intuitive graphical user interface, offering point and click file selection and icons for most operations.
Single server backup and restore (local filesystems only).
Integrated database tracks backed up files and sessions for easy file restoration.
User-defined scripts allow you to configure backups once and schedule or re-use them when needed.
Supports a wide variety of SCSI 4mm, 8mm, DLT and QIC tape drives.
Logs give a complete history of operations performed.
NOTE: For information on purchasing this product, contact SCO Sales at
1-800-SCO-UNIX. See also
manual page for crontab(C)manual page for cbackup(ADM)