rbj@icst-cmr.arpa (Root Boy Jim) (04/27/88)
From: Curt Signorino <curt@cieunix.rpi.EDU> I'm revising the system we use to do backups via an automated shell, etc. One problem I've run into is that I would like to get a hardcopy listing of filenames of the files backed up. We do this on our VAX/VMS machine and it makes life SO much easier when someone needs a file they've deleted and you've got to search for it. I had thought I'd just give dump a "-v" option and redirect stdout to a file and then print the file. Unfortun- ately, dump on 4.3 BSD UNIX doesn't have the verbose option and doesn't output the filenames of files backed up (to stdout). I once looked for a place to put -v into dump as well. It's certainly not obvious. There must be a simple answer to this. I can't imagine sites with massive backups having to search through tape after tape every time they needed to restore a file or directory. Ideally, what you want to do is pipe the output to *both* restore tv *and* the raw tape. Since dump is optimized for running multiple tape subprocesses, it's probably easier to do the following. I am assuming your dump script looks something like: foreach x (/ /usr /foo /bar) dump ${level}uf $tape $x end The easiest thing to do is run another dump piped to restore in the background before the real dump, without the update option. The piped dump should complete before the real one. Add these lines before your dump: set y="$x:t" if ("$y" == "") set y=root set y="/somewhere/DUMP.$y.$level.`date`" dump ${level}f - | restore tvf - < /dev/null >& "$y" & That should produce what you want. Note, I didn't test this, so I may have mucked a detail or two somewhere. Good luck. Also, I'm going to use the Tower of Hanoi sequence given in the 4.3 BSD UNIX manuals. Anyone have any comments on if this is good, bad, sad? It would seem to take awhile to get thru all the levels. We do monthly level zero's, weekly level ones (all on the same tape), and a nightly script dumps selected partitions to a special backup partition. Do anything that seems reasonable. Thanks in advance for any help. Curtis S. Signorino Center for Integrated Electronics RPI (Root Boy) Jim Cottrell <rbj@icst-cmr.arpa> National Bureau of Standards Flamer's Hotline: (301) 975-5688 The opinions expressed are solely my own and do not reflect NBS policy or agreement I want you to MEMORIZE the collected poems of EDNA ST VINCENT MILLAY BACKWARDS!
mangler@cit-vax.Caltech.Edu (Don Speck) (05/08/88)
In article <13128@brl-adm.ARPA>, rbj@icst-cmr.arpa (Root Boy Jim) writes: > I once looked for a place to put -v into dump as well. It's certainly > not obvious. dump knows nothing about pathnames, it reads files in inode order. (Dump isn't verbose enough already? Why shouldn't "-v" mean "verify"?) > The easiest thing to do is run another dump piped to restore in the > background before the real dump, without the update option. "restore t" only reads the directories, which are the first thing on the first tape, so this would feed it a lot of needless data, and result in a messy SIGPIPE. Instead, you should re-mount the first tape, and let restore read that. This way at least you verify that some of the tape is actually readable! Tape drive problems can sneak up on you if you don't do this for at least some dumps (such as the ones that fit on one tape). Don Speck speck@vlsi.caltech.edu {amdahl,ames!elroy}!cit-vax!speck