Port-i386 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Mounting a dump file



I've attempted to back up a NetBSD/i386 5.1.2 machine by dumping its root partition to a NetBSD/i386 6.0.1 machine using dump over ssh by running this script using crontab:


# cat dump-script
#!/bin/sh

# This script is run by cron to dump the root file system to the /usr/dumps/$1
# directory on 192.168.0.100 across the LAN using ssh.
#
# This machine's name is the first argument to this script,
# i.e. $1

dump -0a -f - / | ssh dmp@192.168.0.100 dd of=/usr/dumps/$1/$1-dump-`date +%Y-%m-%d`
#


This seems to work; on the destination machine:

# uname -mv
NetBSD 6.0.1 (GENERIC) i386
# ls -lh
total 2.3G
-rw-r--r--  1 dmp  wheel  2.3G Apr 10 05:02 tstdmp-dump-2013-04-10
# file *
tstdmp-dump-2013-04-10: new-fs dump file (little endian), This dump Wed Apr 10 0 4:10:00 2013, Previous dump Thu Jan 1 10:00:00 1970, Volume 1, Level zero, type : tape header, Label none, Filesystem /, Device /dev/rraid0a, Host tstdmp.test.c
om Flags 3
#

However mounting the file system in the dump file fails:

# vnconfig -vcr vnd0 *
/dev/rvnd0d: 2434641920 bytes on tstdmp-dump-2013-04-10
# vnconfig -l
vnd0: /usr/dumps (/dev/wd0e) inode 4496136
vnd1: not in use
vnd2: not in use
vnd3: not in use
# mount /dev/vnd0d /mnt
mount_ffs: /dev/vnd0d on /mnt: incorrect super block
#

I was hoping to be able to mount the the dump file then restore its contents to an empty partition as a way of doing a bare metal restore of the source machine if it dies. Could someone point out where I'm going wrong please?


Ray


Home | Main Index | Thread Index | Old Index