Backup utilities for ix-386

John R. Levine johnl at esegue.segue.boston.ma.us
Fri Oct 20 02:48:03 AEST 1989


In article <6187 at tekgvs.LABS.TEK.COM> keithe at tekgvs.LABS.TEK.COM (Keith Ericson) writes:
>Finally, speed things up a bit with an output buffer:
>
>	find /partition -print | cpio -ocBv -C 1024000 -O /dev/tape &

In principle, this is a fine idea.  Actually, many versions of cpio including
all the ones on 386/ix have a bug that makes the buffer allocated by -C ten
times bigger than what you asked for, so in this case unless you have more
than 10 meg of RAM peculiar things will happen.

There is a program called "ddd" that has been kicking around the net, which
is a stripped down double buffered version of dd.  The driver for my Archive
tape drive internally allocates a 128K buffer, so my backup is roughly this,
to use two 128K buffers in ddd and another in the driver.

	find /partition -print | cpio -ocv | ddd bs=128k of=/dev/tape

There are two other things I've tried.  One is to put "compress"
between cpio and ddd.  This puts twice as much stuff on the tape, but has the
disadvantage of being much slower and if you get any error on the tape, you
can kiss everything after that point goodbye.  The other is to be more clever
about the find command -- rather than a simple find I do a:

for fn in `ls -a`
do
	case "$fn" in
		. | .. | lost+found | tmp | backuptime)
			;;	# skip
		u | usr)
			;;	# handle separately
		*)
			find $fn ! -name core ! -name "*~" -print
			;;
	esac
done | cpio -ocv | ddd bs=128K of=/dev/tape

so I can special case directories like /tmp which I don't back up, and /usr
which I want to back up last because it's a separate partition.
-- 
John R. Levine, Segue Software, POB 349, Cambridge MA 02238, +1 617 864 9650
johnl at esegue.segue.boston.ma.us, {ima|lotus|spdcc}!esegue!johnl
Massachusetts has over 100,000 unlicensed drivers.  -The Globe



More information about the Comp.unix.i386 mailing list