CAVEAT: I don't have a running NetBSD system so be careful.
If I would want to dump my OpenBSD system on
wd0a
Code:
# disklabel wd0
# /dev/rwd0c:
type: ESDI
disk: ESDI/IDE disk
label: WDC WD3200AAKS-2
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 38913
total sectors: 625142448
rpm: 3600
interleave: 1
boundstart: 63
boundend: 81915435
drivedata: 0
16 partitions:
# size offset fstype [fsize bsize cpg]
a: 81787372 63 4.2BSD 2048 16384 1 # /
b: 128000 81787435 swap
c: 625142448 0 unused
Just like your NetBSD system, my OBSD is in one single filesystem/label :
wd0a
Code:
# ls -l /
drwxr-xr-x 2 root wheel 512 Apr 4 2010 altroot
drwxr-xr-x 2 root wheel 1024 Apr 4 2010 bin
-r-xr-xr-x 1 root wheel 42612 Apr 5 2010 boot
-rw-r--r-- 1 root wheel 8635425 Apr 5 2010 bsd
-rw-r--r-- 1 root wheel 8658947 Apr 5 2010 bsd.mp
-rw-r--r-- 1 root wheel 7318475 Apr 5 2010 bsd.rd
drwxr-xr-x 3 root wheel 23552 Nov 29 15:58 dev
drwxr-xr-x 28 root wheel 2560 Nov 29 15:58 etc
drwxr-xr-x 7 root wheel 512 Apr 5 2010 home
drwxr-xr-x 2 root wheel 512 Apr 4 2010 mnt
drwx------ 6 root wheel 1024 Jun 20 18:42 root
drwxr-xr-x 2 root wheel 1536 Apr 4 2010 sbin
drwxrwxrwt 6 root wheel 512 Nov 29 15:58 tmp
drwxr-xr-x 17 root wheel 512 Mar 26 2010 usr
drwxr-xr-x 24 root wheel 512 May 11 2010 var
Mount your USB 120 GB disk on /mnt. ( I don't know the NetBSD commands to do so ...)
Now backup all directories to files using the
-a flag, except
/mnt.
Reason: you don't want to backup your backup in progress!
The autosize
-a flag is needed to backup to file.
Code:
dump -0af /mnt/bin.dump /bin
dump -0af /mnt/boot.dump /boot
dump -0af /mnt/dev.dump /dev
....
dump -0af /mnt/usr.dump /usr
dump -0af /mnt/var.dump /var
For the files /boot, bsd and bsd.mp:
Code:
dump -0af /mnt/kernels.dump /bsd /bsd.mp /bsd.rd
If you have a second system that you can connect to, you don't have to do a dump for each directory separately, but could dump the complete
wd0a filesystem over the network through
ssh or
nc.