Subject: Re: file system info tool?
To: None <netbsd-users@NetBSD.org>
From: Mike Parson <mparson@bl.org>
List: netbsd-users
Date: 11/05/2004 21:43:56
On Sat, Nov 06, 2004 at 10:25:46AM +1100, Malcolm Herbert wrote:

<snip>

> ... which brings me to the point of asking: at the risk of starting a
> flame war, what are the relative merits of dump over tar?

tar is pretty standard these days, it can dump arbitrary dir
trees and files, etc. dump is used to backup whole filesystems
(partitions/slices/mount points/whatever the term for the platform
you're on).

dump can handle special files, like devices, tar cannot.

I like browsing dump files in interactive mode (restore -i) to pull
individual files out, kinda like walking a filesystem and tagging
what you want restored, instead of the two passes it takes to pull an
individual file out of a tarball, if you don't know the full path to the
file off the top of your head.

> My main reason for avoiding dump was that I was under the impression
> that if you had an environment with more than one architecture/OS/fs
> type then each required it's own version of dump - the output of which
> weren't interoperable, whereas tar was pretty much universal.

I've dumped the filesystems on my Solaris Sparcbook over nfs to my Linux
box, read them under Linux/x86 and NetBSD/Sparc.

My bad experiences with backups and restores are more related to the
media I was backing up to failing more than the software used to make
the backups.

> Are there any benefits which outweigh this problem?

I use tar for smaller stuff, but for whole filesystems (/home, etc), I
generally use dump/restore.

Another trick I use dump/restore for is copying fileystems from one disk
to another, like moving to a larger disk:

dump 0f - / | (cd /mnt ; restore xf - )

This will copy just about everything but the bootblocks.  If you've got
multiple filesystems, you'll have to mount them ask you go along, but
that's the gist of it.  Similar tricks exists with cpio, which I think
will also handle device files.

-- 
Michael Parson
mparson@bl.org