/******************************************************************************
*									      *
*	(C) 1993 by K. Ballueder					      *
*									      *
*		kballued@charon.physik.uni-osnabrueck.de		      *
*		kballued@jupiter.rz.uni-osnabrueck.de			      *
*									      *
*******************************************************************************
*
*	backup_scripts 1
*
*******************************************************************************
This is a collection of scripts that I wrote for handling compressed tape
backups. 

While using compressed tars on my tapes I encountered problems in restoring
all of the files. This was caused, because the tape driver (I use QIC02)
requires the output in blocks of 512 bytes. The tar as it comes with SLS
(or any other distribution?) can handle compressed tars, but it is not able
to block its output to 512 bytes AFTER compressinng it.
Another problem was to keep the tape streaming without too many interruptions
because this causes unnecassary use / delay to tapes and drive.

I wrote the scripts for my own personal purpose. They are not intended to
be the ultimate solution for backup problems. They do not check for correct
calling syntax but simply pass their arguments over to the single programs
(if they expect any arguments). Any flames on their useless will be redirected
to /def/null !

I also tried to make this simple guide to using them as foolproof as possible.
As Murphy told 	"If you make a program foolproof,
		 only a fool will want to use  it."

So if you know how to do better, please, do not tell me how useless my scripts
are, but tell me how to do better, AND -most important- tell others how to
do better. That is what I intended to do by making this public.


This distribution contains:
	- GNU tar 1.11.2	(please see GNU.COPYING for copyright policy)
	- GNU mt 2.2		(please	see GNU.COPYING for copyright policy)
	- edd			(no idea about its copyright, I think it's free)
	- my backup scripts	(take them, use them on your own risk)

GNU tar 1.11.2
	This tar supports gzip as well as compress and is able to block the
	output of the compress-program to the required 512 bytes block size.
	For a full list of its features call it with the --help option.
	Should be copied to /usr/local/bin or /usr/bin. Replace old tar with
	this one! The scripts don't work with the old tar (although they
	seem to work, until you run into difficulties later....)!
GNU mt 2.2
	This is a small program to control the tape operation. You should
	already be familiar with it. Some LinuX systems still have an older
	version, that is why I include it here. Copy mt to /usr/local/etc or
	/usr/etc and the manpage mt.1 to /usr/man/man1.
	The most interesting commands are:
		mt reset	to reset tape drive
		mt rewind	to rewind the tape
		mt fsf		to move forward to the next file on the tape
				(in our case: to the next tar on tape)
				
edd
	This is a replacement for the standard dd copying/buffering program.
	I think it is not really necessary and you should be able to use
	dd instead. But as I have been using edd in all my scripts with good
	experience I include it here. See the dd manpage for details. Copy
	it to /usr/local/bin or /usr/bin.

the scripts:

backup.*
	These are the main backup scripts that provide the possibility of
	full and incremental backup. They automatically compress and buffer
	their backups to ensure both maximal tape-capacity and as less 
	interruptions to the streaming tape as possible. They all write a
	log with all saved files to logs/*.log which starts with the
	current date, followed by a list of keywords indicating the type
	of backup. They also update the datestamp in dates/date.*.
	In exclude/*.exclude you can list filenames that should not
	be backed up to the tape (see the example files). All of the backup
	scripts do not backup mounted filesystems, i.e. they only back up
	one filesystem at the time. For backing up multiple filesystems
	you have to create more scripts, take backup.tmp.* as a basis.
	For example, backup.linux.full does backup the "/" tree but if
	you have a second partition mounted under "/tmp" it is not backed
	up by it (that is why I use backup.tmp.*).
	
	backup.linux.full:
		makes a full backup of the linux-partition "/"
		uses the files logs/DATE.linux.full.log and 
		exclude/linux.exclude
	backup.linux.inc:
		makes a backup of everything that was changed on the linux-
		partition since the last backup
		uses the files logs/DATE.linux.inc.log and 
		exclude/linux.exclude
		
	backup.tmp.full:
	backup.tmp.inc:
		make backups of "/tmp" which on my system is mounted on a
		second partition
		use the files logs/DATE.tmp.*.log and exclude/tmp.exclude

	backup.dos.full:
	backup.dos.inc:
		make backups of "/dos" which on my system is the mountpoint
		of my DOS-filesystem (still). If you have your DOS-partition
		in a different directory, you have to change the scripts.
		use the files logs/DATE.dos.*.log and exclude/dos.exclude

	backup.xxx.full:
		takes the directory to back up as an argument and runs a
		one-filesystem backup on this tree
		writes log to logs/DATE.xxx.log

	restore:
		takes a couple of filenames as arguments and tries to 
		restore them from tape
		make sure that the tape is at the beginning of the backup
		before!

	restorelist:
		takes a file as argument and reads the filenames to be
		restored from that file

	Both restore and restorelist work relative to the current 
	working directory. Before restoring to the original directories,
	you should move to "/" and call the scripts from there!

Before appending a new backup to a tape, make sure the tape is at the end
of recorded data, otherwise you will overwrite any old data!
Do this by calling "mt eom" which seeks to the end of recorded media.
It is also a good idea to clean up the logs-directory from time to time,
because the files tend to become quite big. I usually simply compress them
and uncompress them when I use them later.

If you have any constructive critics or comments, please contact me.

				Karsten Balluder
				kballued@charon.physik.uni-osnabrueck.de
					[a.k.a. 131.173.26.1]
