Subject: Backup: 'tar' or 'dump'?
To: None <netbsd-help@NetBSD.ORG>
From: Jon Ribbens <jon@oaktree.co.uk>
List: netbsd-help
Date: 03/21/1997 13:36:30
The latest installment in my tape-backup saga ;-).

The DAT drive works brilliantly, and I can have lots of fun making
the drive swap the tapes about in the magazine and making whirry
noises using 'chio'. I can also access the drive fine, after I worked
especially after I worked out that you can't use 'cat' and must use 'dd'.
(I presume that it is a variable block size device?)

(Why do mt and tar use /dev/rst0 as a default? Especially for 'mt',
this seems ludicrous - 'mt fsf 1' will dutifully fast-forward the
tape one file, then when mt finishes the drive will dutifully rewind
the tape back to the beginning again. Cunning.)

Anyway, my main question is whether I should use 'dump' or 'tar'
to backup my data (at least 2GB). I would use 'dump', since it
seems the obvious choice, but 'restore' seems very unreliable,
and there is no way I can find to test a 'dump' backup without
having a blank drive to restore the data onto. ('restore -t' doesn't
actually read the whole tape.)

I have had a lot of problems with dump/restore, which up to this point
I have been using to backup to another hard drive, e.g.:

  dump -0u -f - / | gzip >/mnt/backup.gz

When I come to restore the data, I've had various random-seeming
errors, to do with restore wanting to 'change volumes' (huh?) and then
coredumping (before setting the permissions on all the directories,
aargh). 'dump' also seems to randomly say 'Signal on pipe: cannot
recover', and I have to start the whole thing again.

So, I think maybe I'd like to use 'tar' instead. At least it's
simple, it can cope if the backup file is truncated, and I trust
it a lot more. My only question is whether it is suitable for
this sort of thing - will it cope okay with devices, FIFOs, hardlinks,
symlinks, files with holes, etc? Can I just do

  tar cl /

to backup and later 'tar x' to restore? Do I need the 'S' option
to handle sparse files 'more efficiently'?

Cheers


Jon
____
\  //    Jon Ribbens    // 10MB virtual-hosted // www.oaktree.co.uk
 \// jon@oaktree.co.uk // web space for 49UKP //