[Next] [Previous] [Up] [Top] [Contents]

16.3 Backup and Restore Commands

16.3.1 Dump

The program dump (SunOS 4.1.X, IRIX 5.X, Ultrix, Digital UNIX) or ufsdump (SunOS 5.X) can be used to backup a complete file system. There are 10 levels of dumps, 0-9. 0 is a full dump, while levels 1-9 are incremental dumps. The lower the number the more complete the dump. A level 1 dump will include everything changed since the last level 0 dump. A level 9 dump will only include those files changed since the last lower numbered dump. The manuals sometimes recommend some weird dump sequence involving every possible level through different days of the week, with a monthly period, to minimize tape usage. However, this makes it nearly impossible to figure out what you need to do to restore a particular file. Pick a simple schedule that's easy to follow and stick to it.

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


Unix System Administration - 8 AUG 1996
[Next] [Previous] [Up] [Top] [Contents]