[Next] [Up] [Previous] [Contents] [Index]
Next: A.2.7 How can I Up: A.2 How can I...? Previous: A.2.5 How can I

A.2.6 How can I do automatic backups?

Using the  -auto-backup Configoption, it is easy to perform automatic backups or use KBACKUPfrom a shell script. Just create a configuration, e.g. ``myAUTO'' and call KBACKUP like this:

kbackup --auto-backup myAUTO

Then it will perform a backup without asking you for anything. It is simple to create a short shell script to check for the right tape, e.g.

#!/bin/sh
mt rewind
tape_number=`cat /dev/tape`
required_tape_number=`cat /var/adm/tape_number`
if [ "$tape_number" != "$required_tape_number" ]
then
   exit 1;
fi
echo `expr $required_tape_number + 1` >/var/adm/tape_number
kbackup --auto-backup myAUTO

If you prepare a couple of tapes with one file on each of them, containing a serial number, this script can check whether the tape in the drive has the right serial number for the next backup. Of course, you need to prepare the tapes in advance and initialise the file for the serial number properly. With such a mechanism it is guaranteed, that you won't accidentally overwrite yesterday's backup.


[Next] [Up] [Previous] [Contents] [Index]
Next: A.2.7 How can I Up: A.2 How can I...? Previous: A.2.5 How can I

KBackup development
Sun Oct 6 19:36:33 MET DST 1996