DUMP_LFS(8) | System Manager's Manual | DUMP_LFS(8) |
dump_lfs | [-0123456789aceFnStuX] [-B records] [-b blocksize] [-d density] [-f file] [-h level] [-k read-blocksize] [-L label] [-l timeout] [-r cachesize] [-s feet] [-T date] [-x snap-backup] files-to-dump |
dump_lfs |
[-W | -w] |
(The 4.3BSD option syntax is implemented for backward compatibility, but is not documented here).
On media that cannot reliably return an end-of-media indication (such as some cartridge tape drives) each volume is of a fixed size; the actual size is determined by the tape size and density and/or block count options below. By default, the same output file name is used for each volume after prompting the operator to change media.
files-to-dump is either a single file system, or a list of files and directories on a single file system to be backed up as a subset of the file system. In the former case, files-to-dump may be the device of a file system, the path to a currently mounted file system, the path to an unmounted file system listed in /etc/fstab, or, if -F is given, a file system image. In the latter case, certain restrictions are placed on the backup: -u is ignored, the only dump level that is supported is -0, and all of the files must reside on the same file system.
The following options are supported by dump_lfs:
-
' (the standard output). Multiple file names may be given as a single argument separated by commas. Each file will be used for one dump volume in the order listed; if the dump requires more volumes than the number of names given, the last file name will used for all remaining volumes after prompting for media changes. If the name of the file is of the form “host:file”, or “user@host:file”, dump_lfs writes to the named file on the remote host using rmt(8). Note that methods more secure than rsh(1) (such as ssh(1)) can be used to invoke rmt(8) on the remote host, via the environment variable RCMD_CMD. See rcmd(3) for more details.\0
'.If dump_lfs honors the “nodump” flag (UF_NODUMP), files with the “nodump” flag will not be backed up. If a directory has the “nodump” flag, this directory and any file or directory under it will not be backed up.
dump_lfs requires operator intervention on these conditions: end of tape, end of dump, tape write error, 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 option, dump_lfs interacts with the operator on dump_lfs's control terminal at times when dump_lfs can no longer proceed, or if something is grossly wrong. All questions dump_lfs 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_lfs checkpoints itself at the start of each tape volume. If writing that volume fails for some reason, dump_lfs 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.
dump_lfs tells the operator what is going on at periodic intervals, including usually low estimates of the number of blocks to write, the number of tapes it will take, the time to completion, and the time to the tape change. The output is verbose, so that others know that the terminal controlling dump_lfs is busy, and will be for some time.
In the event of a catastrophic disk event, the time required to restore all the necessary backup tapes or files to disk can be kept to a minimum by staggering the incremental dumps. An efficient method of staggering incremental dumps to minimize the number of tapes follows:
/sbin/dump -0u -f /dev/nrst1 /usr/src
This should be done at set intervals, say once a month or once every two months, and on a set of fresh tapes that is saved forever.
3 2 5 4 7 6 9 8 9 9 ...
For the daily dumps, it should be possible to use a fixed number of tapes for each day, used on a weekly basis. Each week, a level 1 dump is taken, and the daily Hanoi sequence repeats beginning with 3. For weekly dumps, another fixed set of tapes per dumped file system is used, also on a cyclical basis.
After several months or so, the daily and weekly tapes should get rotated out of the dump cycle and fresh tapes brought in.
If dump_lfs receives a SIGINFO signal (see the “status” argument of stty(1)) whilst a backup is in progress, statistics on the amount completed, current transfer rate, and estimated finished time, will be written to the standard error output.
dump_lfs 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.
Each reel requires a new process, so parent processes for reels already written just hang around until the entire tape is written.
dump_lfs with the -W or -w options does not report file systems that have never been recorded in /etc/dumpdates, even if listed in /etc/fstab.
When dumping a list of files or subdirectories, access privileges are required to scan the directory (as this is done via the fts(3) routines rather than directly accessing the file system).
It would be nice if dump_lfs 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(8).
July 23, 2006 | NetBSD 6.1 |