DUMP(8) — UNIX Programmer’s Manual
NAME
dump − incremental file system dump
SYNOPSIS
/usr/etc/dump [ key [ argument ... ] filesystem ]
DESCRIPTION
Dump copies to optical disk or magnetic tape all files changed after a certain date in the filesystem. The key specifies the date and other options about the dump. Key consists of characters from the set 0123456789fusdoOWn.
0−9 This number is the ‘dump level’. All files modified since the last date stored in the file /etc/dumpdates for the same filesystem at lesser levels will be dumped. If no date is determined by the level, the beginning of time is assumed; thus the option 0 causes the entire filesystem to be dumped.
f Place the dump on the next argument file instead of the tape or optical disk. If the name of the file is “−”, dump writes to standard output.
u If the dump completes successfully, write the date of the beginning of the dump on file /etc/dumpdates. This file records a separate date for each filesystem and each dump level. The format of /etc/dumpdates is readable by people, consisting of one free format record per line: filesystem name, increment level and ctime(3) format dump date. /etc/dumpdates may be edited to change any of the fields, if necessary.
s The size of the dump tape is specified in feet. The number of feet is taken from the next argument. When the specified size is reached, dump will wait for reels to be changed. The default tape size is 2300 feet.
d The density of the tape, expressed in BPI, is taken from the next argument. This is used in calculating the amount of tape used per reel. The default is 1600.
W Dump tells the operator what file systems need to be dumped. This information is gleaned from the files /etc/dumpdates and /etc/fstab. The W option causes dump to print out, for each file system in /etc/dumpdates the most recent dump date and level, and highlights those file systems that should be dumped. If the W option is set, all other options are ignored, and dump exits immediately.
w Is like W, but prints only those filesystems which need to be dumped.
n Whenever dump requires operator attention, notify by means similar to a wall(1) all of the operators in the group “operator”.
o Specifies that the device to dump to is an optical disk. The NeXT OMD-1 Optical Disk is the default drive when this flag is specified.
O The size of the optical disk, expressed in megabytes (1048576 bytes), is take from the next argument. For example, the size NeXT OMD-1 Optical Disk is 239 megabytes. See /etc/disktab for the disk geometry.
If no arguments are given, the key is assumed to be 9u and a default file system is dumped to the default tape.
Dump requires operator intervention on these conditions: end of optical disk or tape, end of dump, optical disk or tape write error, optical disk or tape open error or disk read error (if there are more than a threshold of 32). In addition to alerting all operators implied by the n key, dump interacts with the operator on dump’s control terminal at times when dump can no longer proceed, or if something is grossly wrong. All questions dump poses must be answered by typing “yes” or “no”, appropriately.
Since making a dump involves a lot of time and effort for full dumps, dump checkpoints itself at the start of each tape or optical disk volume. If writing the tape volume fails for some reason, dump will, with operator permission, restart itself from the checkpoint after the old tape has been rewound and removed, and a new tape has been mounted. If writing the optical disk fails for some reason, dump will prompt the operator to restart from the checkpoint after the old OD has been ejected and the new OD has been inserted.
Dump tells the operator what is going on at periodic intervals, including usually low estimates of the number of blocks to write, the number of optical disks or tapes it will take, the time to completion, and the time to the disk or tape change. The output is verbose, so that others know that the terminal controlling dump is busy, and will be for some time.
Now a short suggestion on how to perform dumps. Start with a full level 0 dump
dump 0un
Next, dumps of active file systems are taken on a daily basis, using a modified Tower of Hanoi algorithm, with this sequence of dump levels:
3 2 5 4 7 6 9 8 9 9 ...
For the daily dumps, a set of 10 tapes per dumped file system is used on a cyclical basis. Each week, a level 1 dump is taken, and the daily Hanoi sequence repeats with 3. For weekly dumps, a set of 5 OD’s or tapes per dumped file system is used, also on a cyclical basis. Each month, a level 0 dump is taken on a set of fresh OD’s or tapes that is saved forever.
DUMPING TO OPTICAL DISK
On systems where the Workspace Manager is running, at any time when dump prompts the operator to insert the optical disk, the disk should not be inserted fully into the NeXT cube. Full insertion of the optical disk will cause the autodiskmount(1) program to try to mount the optical disk on behalf of the Workspace Manager. Instead, the operator should wait until the kernel pop’s up the Insert Disk panel.
FILES
/dev/rsd0adefault filesystem to dump from
/dev/rmt8default tape unit to dump to
/dev/rod?the default optical disk
/etc/dumpdatesnew format dump date record
/etc/fstabdump table: file systems and frequency
/etc/groupto find group operator
SEE ALSO
autodiskmount(1), restore(8), dump(5), fstab(5)
DIAGNOSTICS
Many, and verbose.
Dump exits with zero status on success. Startup errors are indicated with an exit code of 1; abnormal termination is indicated with an exit code of 3.
BUGS
It is hard to measure an optical disk in terms of tenths of inchs and size of inter-record gap. A multi-machine, multi-media solution should be sought.
Dump should have some file that it consults that contain inode numbers, names of files and directories, and names of users and/or groups to not dump to OD/tape. This feature would come in especially handy to avoid dumping /private/vm/swapfile, /usr/man/cat, /NextLibrary, /NextApps. System administrators can get around this by writing a program that changes the modification time for the swapfile inode.
Because of the interworkings of rmt and rdump, it is only possible to run rdump from one NeXT machine to another. This is in part due to the fact that the ioctls for the optical disk differ from the mag tape ioctls available with rmt, and in part due to the fact that NFS does not implement remote device ioctls.
Fewer than 32 read errors on the filesystem are ignored. Each optical disk or reel requires a new process, so parent processes for reels already written just hang around until the entire tape is written.
Dump with the W or w options does not report filesystems that have never been recorded in /etc/dumpdates, even if listed in /etc/fstab.
It would be nice if dump knew about the dump sequence, kept track of the tapes scribbled on, told the operator which tape to mount when, and provided more assistance for the operator running restore.
4th Berkeley Distribution — August 22, 1989