From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,1c56af0ab69a40e0 X-Google-Attributes: gidf678f,public X-Google-Thread: 1020c6,1c56af0ab69a40e0 X-Google-Attributes: gid1020c6,public X-Google-Thread: fee84,1c56af0ab69a40e0 X-Google-Attributes: gidfee84,public From: Thomas Leitner Subject: Re: testing dump validity Date: 1998/09/10 Message-ID: <6t97jc$4hv@fstgal00.tu-graz.ac.at>#1/1 X-Deja-AN: 389834412 Sender: Thomas Leitner References: <35F6584A.5D442313@uea.ac.uk> Organization: Graz University of Technology, Austria User-Agent: tin/pre-1.4-980618 (UNIX) (OSF1/V4.0 (alpha)) Newsgroups: comp.unix.admin,comp.unix.osf.misc,comp.unix.osf.osf1 In comp.unix.osf.osf1 Bob FIndlay wrote: > Hello, > Does anyone have any recommendations on how to test the validity of a > dump file? On VMS I would have performed a restore to the NUL device > and then checked for any errors, but I can't see how to do that with DEC > unix's restore. I do it like this: mt -f /dev/nrmt0h rewind checksum0=`vdump 0ubf 60 - / | btee 60 /dev/nrmt0h | cksum` checksum1=`vdump 0ubf 60 - /usr | btee 60 /dev/nrmt0h | cksum` mt -f /dev/nrmt0h rewind verify0=`dd if=/dev/nrmth0 ibs=60k obs=60k | cksum` if [ "$checksum0" != "$verify0" ]; then echo ERROR: vdump / checksum failed. $checksum0 != $verify0 fi verify1=`dd if=/dev/nrmth0 ibs=60k obs=60k | cksum` if [ "$checksum1" != "$verify1" ]; then echo ERROR: vdump /usr checksum failed. $checksum0 != $verify0 fi The trick is the "btee" program which is a "tee" program with fixed 60k blocking input and output. I have written it just for this purpose. Of course the whole story works with "dump" as well and not only with "vdump" and you can even use it over the network for remote backups and verifications where the verify pass does *not* consume any network bandwidth: checksum0=`vdump 0ubf 60 - / | rsh remote "btee 60 /dev/nrmt0h" | cksum"` ... verify0=`rsh remote "dd if=/dev/nrmt0h ibs=60k obs=60k | cksum"` .... Tom BTW: "btee.c" can be had from my FTP server: ftp://finwds01.tu-graz.ac.at/pub/unix_utils/btee.c -- -------------------------------------------------------------------------- T o m L e i t n e r Dept. of Communications Graz University of Technology, e-mail : tom@finwds01.tu-graz.ac.at Inffeldgasse 12 Phone : +43-316-873-7455 A-8010 Graz / Austria / Europe Fax : +43-316-463-697 Home page : http://wiis.tu-graz.ac.at/people/tom.html PGP public key on : ftp://wiis.tu-graz.ac.at/pgp-keys/tom.asc or send mail with subject "get Thomas Leitner" to pgp-public-keys@keys.pgp.net -------------------------------------------------------------------------- Before we have the paperless office, we have the paperless toilet!