Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site varian.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!houxm!vax135!cornell!uw-beaver!tektronix!hplabs!zehntel!varian!david From: david@varian.UUCP (David Brown) Newsgroups: net.unix-wizards Subject: Re: (dump) Hanoi algorithm Message-ID: <234@varian.UUCP> Date: Wed, 29-Aug-84 19:57:40 EDT Article-I.D.: varian.234 Posted: Wed Aug 29 19:57:40 1984 Date-Received: Tue, 4-Sep-84 07:37:36 EDT References: <12600@sri-arpa.UUCP> Organization: Varian, Walnut Creek, CA Lines: 61 We too were once bitten by not being able to read dump tapes that were written without any error messages appearing. Since then, we added to the end of all our scripts that write dump tape a call to dump.verify, a shell script that retrieves the last file on the dump tape - it seems to me that this is a pretty good test of the tape, as the whole dump tape is read. Here it is - it contains a few non-standard things. mt is a Berkeley program which uses mtioctl calls; if you don't have it, you can work around it. Restor (with a capital R) is a version of restor that doesn't prompt for volume #, so it can be run from a script (almost all of our dumps fit on one tape). We run 4.1BSD on a 11/780 and 2.8BSD/v7 hybrid on a pdp11/70. cut here ===================== : dump.verify.sh: : : script to verify that we can restore the last file on a dump tape. : : Restor is a version of restor that has been modified so that it always : assumes volume 1 and does not prompt for volume number. : : Note that this only checks the first virtual tape thoroughly. : : Get the name of the last file on the dump. mt rew : rewind the tape sleep 30 fn=`dumpdir f /dev/rmt8 | sort -n | tail -1 ` echo fn = $fn : Set to fail if $fn is not set [-u], and assign words in fn to $1, $2, etc. set -u $fn : Restore the last file on the dump. echo dump.verify: restoring file $2 if /bin/Restor xf /dev/rmt8 $2 then if rm -f $1 then echo echo 'dump.verify: verification succeeded' echo rm rst* exit fi fi echo echo 'dump.verify: ****** VERIFICATION FAILED ******' echo exit ========= end ============ -- David Brown (415) 945-2199 Varian Instruments 2700 Mitchell Dr. Walnut Creek, Ca. 94598 {zehntel,amd,fortune,resonex}!varian!david