Environment:
	These scripts depend on the following:
		The TAPE environment variable names the tape drive
			(default /dev/nrrt0).
		File /etc/cputype contains a code for the type of machine/OS;
			a /usr/local/bin.`cat /etc/cputype` is assumed.
		A "setuid" (modified from Maarten Litmaath's)
			is assumed to be in /usr/local/bin.  It's needed to
			make secure set-user-id shell &c scripts.
		An "rsh" is assumed in /usr/local/bin.`cat /etc/cputype`.
			It supports -I -O -E options to directly attach
			the rsh data & error sockets to subprocesses --
			faster than pipes.
		A "buffer" program which does reblocking of data many times
			faster than "dd obs=nnnn" and reports the amount of
			data transferred is assumed somewhere -- in either
			/usr/local/bin.* or /u/dump/bin.


dodump: (no arguments)
	Interactive script to write a dump script -- knows about local file
	systems and dump schedules.  Script written to ./script & has the form
		gettoc -a
		{error checking to ensure the same tape is loaded now as when
		 dodump was run}
		remotedump, localtar, etc. one per file system
		output saved in script.log and mailed to 'dump' if errors occur

gettoc: [-a] [-r]
	Reads table-of-contents record from beginning of tape, looks it up in
	./tocdir/* (presumed current contents of that tape), then
	links that file to ./toc for later reference.
	Then positions the tape:
	   -r => rewinds or
	   -a => skips past last file indicated by toc, mt bsf's, mt weof's
		  (the recommended sequence when about to write new data) or
	   (default) skips past last file but w/o writing.

inittoc: [-i|-r] [tapename]
	-i: writes initial table-of-contents record on a tape or
	-r: (on systems with suitable tape drivers) rewrites modified toc @BOT.

localdump:  [-n]  {0-9}[u]  /filesystem-or-device
	Dump local filesystem to tape.  Updates ./toc.
	Appends updated toc after the dump unless -n.
	This is a setuid-root script, using /usr/local/bin/setuid for security.

remotedump:  remotehost  [-n]  {0-9}[u]  /filesystem-or-device
	Dump remote filesystem to tape via modified /usr/local/bin.$CPU/rsh.
	Calls (privileged) "slavedump" script on remote machine.

slavedump: {0-9}[u] /filesystem-or-device
	Setuid-root script, using /usr/local/bin/setuid.
	Dumps the filesystem to stdout for retrieval by remotedump.

localtar: [-n] [-G] [-N yy.mm.dd[.hh.mm]]  /filesys ...
	Setuid-root script, using /usr/local/bin/setuid.
	Uses gnutar to dump the specified filesystem(s).
	-C option(s) allowed among the /filesys's to do in-line chdir's.
	-G write gnutar-style dumps with volume headers and directory images;
	   required for using gnutar incremental feature;
	   but the archives written may be unreadable by other versions of tar.
	-N {date} -- only write files with mod time or inode-change time
	   later than that date.

	All arguments are dumped with gnutar 'l' (stay in same filesystem)
	option, so tarring "/" means just root filesystem not all those
	mounted on.

	The first /filesys argument is translated to Gnu options
	``-C /filesys .''  Thus all paths are relative to that point.
	Later filesystems (if any) are not so translated.
	However since gnutar automatically strips a leading "/" from 
	paths it writes to tarchives, they never contain an absolute path.

	./toc is updated.  It is written to tape following the tar image unless
	-n: don't append a copy of ./toc.

remotetar:  remotehost  {localtar options}
	Write a tar image to tape via rsh remotehost -l dump, calling slavetar.

slavetar:  {localtar options except -n}
	Setuid-root script.  Writes tar image to stdout for use by remotetar.

maketoc: (perl script)
---------
	Produces one line summaries of dumps,  and outputs timing
	info.  Usage:  maketoc dir [hostname] [input_file] >> tocfile
	The dir and hostname fields should coincide with the mount
	point path name of the file system being dumped and the host on
	which the dump is being done, respectively.  For parsing local
	dumps from stdin, the hostname can be omitted.  Stdin is echoed
	faithfully on stderr.

rlabel.c
--------
	gets drive name from envariable TAPE.
	Parses dump header records.  Used only by gettoc for detecting
	old-format tapes and looking up their toc files.
	It works so long as the tape blocking is kept below 63k.

dump/:
--------
	4.3 BSD dump(8)  with Purdue "live dump" patches,
	NFS style include file locations (#ifdef sun),
	Bug workaround in dsrch() for SUNOS 3.4 where
	dircetories are not always multiples of DEV_BSIZE long,
	Plus new flag "q",  useful for unattended dumps,  makes
	dump quit on error.
	RCS/*  the 1.1 versions are just Berkeley + Purdue,
	       the C_1 versions are SUNfixes + qflag.

setuid/:
	Derived from Maarten Litmaath's comp.sources.unix "setuid".
	Used for writing spoof-resistant set-user-id shell etc. scripts.
	Two added features:
	   setuid -r => set real uid & gid to effective uid & gid.
	   creates SETUID_REALUSER envariable with name of real user
	   (so these scripts can allow being run only by "dump" account).

buffer.c:  nbytes
	Buffers stdin to stdout, blocking like dd obs=nbytes
	but much faster (dd appears to do several memory-to-memory copies).
	Reports byte and block counts to stderr; the above scripts use
	this msg for table-of-contents construction.
