------------------------ backuplib  version 0.2 ----------------------------
--------------------- INSTALLATION AND USER GUIDE --------------------------

Author:		Robert Snell rob@xania.demon.co.uk

Date:		6/7/1998

Summary:	A perl module and pair of scripts designed to simplify 
		backing up your system. backuplib is fairly simple at 
		the moment. It supports use of setmarks on SCSI tapes.

Manifest:	backuplib.pm (perl module)
		full-backup.pl (perl script for doing a full system backup)
		incremental-backup.pl (ditto, but for new files)
		volumes-to-archive (a list of directories or files to archive)
		README (this file)

Requirements:	perl-5
		a SCSI tape drive (although it should work with non-SCSI
				using suitable amendments to the scripts)

License:	GNU General Public License (see www.gnu.org)

Warranty:	None		

HOW IT WORKS

You run a perl script periodically to perform a backup. This utilises
the functions within the backuplib perl module.

backuplib simply invokes the 'mt' command to manipulate your tape
drive. It then calls 'tar' to perform volume backups. Every time
backuplib performs a backup, it marks the tape with a 'setmark' and
stores the position of this setmark in a temporary file on disk. This
allows backuplib to recover if you happen to reboot your machine
or eject the tape - it can always tell where the end of the last file on 
the tape is!  (note - this 'setmark' feature is only available on SCSI
tapes, apparently).

This perl module has been tested on an Intel Redhat 5.0 system, running
perl-5.004_01 and using an Archive Python DDS-2 SCSI DAT drive.


INSTALLATION

1) Untar the backuplib archive. The fact that you are reading this
   suggests you already have done...

	> tar zxvf backuplib-0.1.tar.gz
	> cd backuplib

2) Edit the perl module 'backuplib.pm' with your favourite editor.

3) Make changes to the following lines as necessary:

	$PREFIX = "/etc/backup"	      <-- set this to your install path
	$BUDEVICE = "/dev/nst0";      <-- set this to your own tape drive
	$MTCMD = "mt -f $BUDEVICE";   <-- amend this if you are likely
					  to use a different version of
					  mt to the BSD version.
	$SCSIDRIVER = 1;	      <-- set this to 0 if you don't have
					  a SCSI tape drive. You may need
					  to play around with the module
					  if that is the case.

	
4) Add a 'v' flag to the tar command $TARC if you want verbose output
   when these scripts run.

5) The default location for installation of these files is /etc/backup.
   If you wish to install this somewhere else then:

	i)	amend the $PREFIX variable to point to your 
		preferred installation directory.
	ii)	edit full-backup.pl and incremental-backup.pl and
		change the use lib "/etc/backup"; line to point
		to your preferred installation directory.

6) Edit the file 'volumes-to-archive' and enter any directories or
   individual files you would like to backup. 

7) Become root and run:

	> mkdir /etc/backup      (or where ever you wish to install to)
	> cp *.p* /etc/backup

8) If you have cron installed, you may want to configure it so that
   it runs full-backup.pl weekly, and incremental-backup.pl daily.
   On a Redhat-5.0 system, you could do this by entering:

	> cd /etc/cron.daily
	> ln -s /etc/backup/incremental-backup.pl
	> cd ../cron.weekly
	> ln -s /etc/backup/full-backup.pl

9) Execute a full system backup:
	
	> ./full-backup.pl

9) If you know some perl, add to the backuplib.pm module. You may even 
   want to write a fully blown tape driver in perl (rather than having
   to invoke 'mt' from within perl). I'm sure that this could be done
   using the right ioctl()'s. mt is a kewltewl<tm> which is why I
   haven't bothered trying to emulate it.

Enjoy! Please contact me if you have any queries, problems or ideas.

	Rob.
