[net.unix-wizards] Thoughts on system backups

shp (04/06/83)

An article appeared recently about doing system backups under UNIX using
dump and/or tar.  I shall assume the author was speaking of a 4.xbsd system
since he mentioned an 11/750.  He talked about several problems, which 
included:

- end of tape recognition
	There have been published fixes to the mag tape device driver to
	solve the end of tape problem.  Make sure your tape drive is up to
	the proper ECO rev level, particularly TU77's.  There are several
	hardware revs to TU77's that are somewhat related to the end of
	tape problem.  I've never experienced multiple volume tape problems
	using dump.  On our TU77 we had to use 5 2400' tapes per file
	system.  The TU78 requires 2 2400' tapes.  Not once has dump messed
	up and gone off the end of tape.

- restoration of entire directories
	It's true you cannot use /etc/restor to restore an entire directory
	like you can with tar, however, it's trivial to get /etc/restor to
	restore directories.  First you use dumpdir to get a list of all
	the files in the directory to be restored; make a second copy of
	this list.  Edit the first copy so that it contains only file
	names (dumpdir also lists inodes).  Edit the second copy so that
	it is a shell script containing mv(1) instructions to rename the
	inodes to their proper file names.

	/etc/restor x `cat first_copy`     .... does the actual restore ....

	second_copy			   .... renames the files ....



	- sam praul
	  ...decvax!ittvax!shp

essick (04/08/83)

#R:ittvax:-67000:uiucdcs:13700027:000:529
uiucdcs!essick    Apr  7 08:41:00 1983

	Rob Kolstad (parsec!kolstad) has a modified version of /etc/restor
which he calls "retrieve".  Retrieve allows you to read 
dump tapes the way you would with a tar; it creates intermediate
directories, recursively extracts directories and in general does all
the things that you wish /etc/restor did.
	I'm sure he would be more than willing to send copies of the
code to interested persons.  Rob can be reached at:

	USENET: decvax!pur-ee!uiucdcs!parsec!kolstad
	MaBellNet: (214)-669-3700

-- Ray Essick, University of Illinois

kolstad (04/08/83)

#R:ittvax:-67000:parsec:44200004:000:1433
parsec!kolstad    Apr  7 11:08:00 1983

Restoring directory trees is an awful experience whether it is
labeled 'trivial' or not.  We recently had a disk drive failure and
wished to restore two dozen users from /mnt to a file system on our
remaining disk.  The construction of the restor/mv files was awful
(mkdir's have to be included also; our shell accepted only 10000 chars
for single commands).

I disagree that using the tool called 'restor' is the correct solution.  I have
modified (a much nicer word than hacked) restor.c to create retrieve.c:
it (a) allows a trailing * on file/directory names and (b) creates
directories automatically in the context of (a).  This allows trivial
restores of tree structures (with only a single pass across the multiple
tapes).

The program is currently distributed to four sites.  It has a performance
problem during restore since it has to check the inode number from the tape
against EVERY possible retrieved inode number -- currently by using a
linear search.  The program has NOT been thoroughly tested with bizarre
conditions.  In a week or two, I'll submit it to net.sources and prepare
to suffer through the incredible amount of comments about lousy user
interface and poor implementation strategy (that are ALREADY a part of
restor.c).  

It is unfortunate but true that the new retrieve.c program uses a large
list that can be supported only on virtual unix systems.

				Rob Kolstad
				PARSEC Scientific Computer Corp.