From: Thomas Leitner <tom@finwds01.tu-graz.ac.at>
Subject: Re: testing dump validity
Date: 1998/09/10 [thread overview]
Message-ID: <6t97jc$4hv@fstgal00.tu-graz.ac.at> (raw)
In-Reply-To: 35F6584A.5D442313@uea.ac.uk
In comp.unix.osf.osf1 Bob FIndlay <bob.findlay@uea.ac.uk> 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!
next prev parent reply other threads:[~1998-09-10 4:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-09-09 4:00 testing dump validity Bob FIndlay
1998-09-10 4:00 ` Thomas Leitner [this message]
1998-09-10 4:00 ` Rev. Don Kool
1998-09-10 4:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
1998-09-10 4:00 ` Emil Visdal
1998-09-10 4:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox