|
-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 :
/dev/rst0
(a tape drive),
/dev/rsd1c
(a disk drive),
an ordinary file, or
`-'
(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 asssh(1))
can be used to invoke
rmt(8)
on the remote host, via the environment variable
RCMD_CMD
.
See
rcmd(3)
for more details.
UF_NODUMP
)
only for dumps at or above the given
level.
The default honor level is 1,
so that incremental backups omit such files
but full backups retain them.
LBLSIZE
(currently 16) characters, which must include the terminating
`\0'.
/etc/dumpdates
.
The format of date is the same as that of
ctime(3).
This option is useful for automated dump scripts that wish to
dump over a specific period of time.
The
-T
option is mutually exclusive from the
-u
option.
/etc/dumpdates
after a successful dump.
The format of
/etc/dumpdates
is readable by people, consisting of one
free format record per line:
file system name,
increment level
and
ctime(3)
format dump date.
There may be only one entry per file system at each level.
The file
/etc/dumpdates
may be edited to change any of the fields,
if necessary.
If a list of files or subdirectories is being dumped
(as opposed to an entire file system), then
-u
is ignored.
/etc/dumpdates
and
/etc/fstab
.
The
-W
option causes
dump_lfs
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_lfs
exits immediately.
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 Ns'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.
TAPE
TAPE
as the dump device.
TAPE
may be of the form
"tapename,
"host:tapename,
or
"user@host:tapename.
RCMD_CMD
RCMD_CMD
rather than
rsh(1)
to invoke
rmt(8)
on the remote machine.
TIMEFORMAT
TIMEFORMAT
is a string containing embedded formatting commands for
strftime(3).
The total formatted string is limited to about 80 characters, if this
limit is exceeded then
"ERROR: TIMEFORMAT too long, reverting to default
will be printed and the time format will revert to the default one.
If
TIMEFORMAT
is not set then the format string defaults to
"%T %Z
/dev/nrst0
_PATH_DEFTAPE
in
/usr/include/paths.h
.
/dev/rst*
/etc/dumpdates
/etc/fstab
/etc/group
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).