16.3 Backup and Restore Commands
To use the /usr/etc/dump or /usr/sbin/ufsdump program, e.g. to an 8mm tape drive, we'll use a command line similar to the following to dump the root device, /dev/rsd0a.
/usr/etc/dump 0ufsdb /dev/nrst8 6000 54000 126 /dev/rsd0a
where 0ufsdb call for:
0 - full dump; dump level (0->9).
u - update the record for dumps, /etc/dumpdates.
f - dump file; e.g. /dev/nrst8, where nrst indicates "no rewind".
s - size of the tape volume you're dumping to, e.g. 6000 ft.
d - tape density; e.g. 54000 bpi for 8mm tape.
b - tape block size; e.g. 126
When you specify the size of the tape volume be conservative. Deliberately reduce it a few percent from the actual length, as the SunOS 4.1.X dump program doesn't know how to determine end-of-tape and will try to write to the full size specified, if needed. Also, any additional tapes needed for this backup will be assumed to have the same size as that specified for the first tape. The SunOS 5.X dump program, ufsdump, can detect end-of-tape, and so the size parameter is not needed here.
The following is a sample dump output when backing up the /usr partition to a remote tape drive.
DUMP: Date of this level 0 dump: Sat Oct 1 04:56:03 1994
DUMP: Date of last level 0 dump: the epoch
DUMP: Dumping /dev/rsd0g (/usr) to /dev/nrst8 on host tardis
DUMP: mapping (Pass I) [regular files]
DUMP: mapping (Pass II) [directories]
DUMP: estimated 254102 blocks (124.07MB) on 0.07 tape(s).
DUMP: dumping (Pass III) [directories]
DUMP: dumping (Pass IV) [regular files]
DUMP: 41.11% done, finished in 0:07
DUMP: 81.87% done, finished in 0:02
DUMP: DUMP: 254102 blocks (124.07MB) on 1 tape
DUMP: DUMP IS DONE
DUMP: level 0 dump on Sat Oct 1 04:56:03 1994
DUMP: Tape rewinding
dump and ufsdump keep a record in /etc/dumpdates of files they have backed up in the form:
#filesystem level date
/dev/rsd0a 0 Sat Oct 1 04:54:52 1994
/dev/rsd0g 0 Sat Oct 1 04:56:03 1994
-or, for SunOS 5.X-
/dev/rdsk/c0t3d0s0 0 Sat Oct 1 04:54:52 1994
/dev/rdks/c0t3d0s5 0 Sat Oct 1 04:56:03 1994