Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!udel!haven!purdue!bu-cs!mirror!ima!esegue!johnl From: johnl@esegue.segue.boston.ma.us (John R. Levine) Newsgroups: comp.unix.i386 Subject: Re: Backup utilities for ix-386 Keywords: backup ix-386 Message-ID: <1989Oct19.164803.232@esegue.segue.boston.ma.us> Date: 19 Oct 89 16:48:03 GMT References: <185@softest.UUCP> <[253554b6:333.1]comp.unix.i386;1@vpnet.UUCP> <11954@watcgl.waterloo.edu> <107@gizzmo.UUCP> <6187@tekgvs.LABS.TEK.COM> Reply-To: johnl@esegue.segue.boston.ma.us (John R. Levine) Distribution: na Organization: Segue Software, Cambridge MA Lines: 42 In article <6187@tekgvs.LABS.TEK.COM> keithe@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@esegue.segue.boston.ma.us, {ima|lotus|spdcc}!esegue!johnl Massachusetts has over 100,000 unlicensed drivers. -The Globe