Need to Backup Using Dump

Polytropon freebsd at
Sun Oct 23 19:08:17 UTC 2011

On Sun, 23 Oct 2011 06:04:14 -0700 (PDT), Bill Tillman wrote:
> I have two FreeBSD 8.2-STABLE servers running NFS. I have
> tons of files on Server A that I want to backup to a big
> drive on Sever B. Server B nfs_mounts one of the filesystems
> on Server A to /mnt. So if I wanted to make a backup of
> the filesytem on Server A to Server B I tried:
> dump -d /home/my_home/backups/20111024 /mnt
> but each time I try this it tells me that filesystem /mnt
> is unknown. /mnt is not in /etc/fstab. I manually mounted
> this via NFS and that's where all the files I want to backup
> are accessible to the command line on Server B. What am I
> missing?

The dump + restore mechanism operates on device files
representing a file system, not a _mounted_ file system,
as source.

If, for example, your /home partition is /dev/ad0s1e, and
you've mounted the target at /mnt, then you could do:

	# cd /mnt
	# dump -0 -f - /dev/ad0s1e | restore -r -f -

Therefore /home has to be unmounted (or add flag -L to
dump from mounted file systems).

But note that this will dump the _complete_ file system's
content to /mnt as dump cannot be "more selective" here.

An alternative is to use rsync or cpdup where you can
explicitely address a subtree to be copied instead of
the whole file system.

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list