| DUMP_LFS(8) | System Manager's Manual | DUMP_LFS(8) | 
dump_lfs, rdump_lfs —
| dump_lfs | [ -0123456789aceFnStuX]
      [-Brecords]
      [-bblocksize]
      [-ddensity]
      [-ffile]
      [-hlevel]
      [-kread-blocksize]
      [-Llabel]
      [-ltimeout]
      [-rcachesize]
      [-sfeet]
      [-Tdate]
      [-Udumpdev]
      [-xsnap-backup]
      files-to-dump | 
| dump_lfs | [ -W|-w](The 4.3BSD option syntax is implemented for backward compatibility, but is not documented here). | 
dump_lfs examines files on a file system and determines
  which files need to be backed up. These files are copied to the given disk,
  tape or other storage medium for safe keeping (see the
  -f option below for doing remote backups). A dump that
  is larger than the output medium is broken into multiple volumes. On most
  media the size is determined by writing until an end-of-media indication is
  returned. This can be enforced by using the -a option.
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:
-0-9-h option below). A level
      number above 0, incremental backup, tells dump to copy all files new or
      modified since the last dump of a lower level. The default level is
    9.-a-B
    records-b
    blocksize-c-d
    density-e-F-f
    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.-h
    levelUF_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.-k
    read-blocksize-l
    timeoutdump_lfs falls
      back to the default behavior, and prompts the operator for the next
    tape.-L
    labelLBLSIZE
      (currently 16) characters, which must include the terminating
      ‘\0’.-ndump_lfs requires operator attention,
      notify all operators in the group “operator” using
      wall(1).-r
    cachesize-k option for the size of the
      buffers. Maximum is 512, the size of the cache is limited to 15% of the
      avail RAM by default.-s
    feetdump_lfs prompts for a
      new tape. It is recommended to be a bit conservative on this option. The
      default tape length is 2300 feet.-S-tdump_lfs
      will have the time prepended to them. Also, the completion time interval
      estimations will have the estimated time at which the dump will complete
      printed at the end of the line.-T
    date-T option is mutually exclusive from
      the -u option.-u-T
      option is used or if a list of files or subdirectories is being dumped (as
      opposed to an entire file system), then -u is
      ignored.-U
    dumpdev-u but specifies the device in
      /etc/dumpdates as dumpdev.
      This option can be used with subdir dumps and with the
      -T option.-X-x flag is provided for compatibility
      with dump(8); it functions
      exactly as the -X flag does (its argument is
      ignored).-Wdump_lfs 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_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.-wIf 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.
TAPEdump_lfs will use
      the device specified via TAPE as the dump device.
      TAPE may be of the form “tapename”,
      “host:tapename”, or “user@host:tapename”.RCMD_CMDdump_lfs will use RCMD_CMD
      rather than rsh(1) to invoke
      rmt(8) on the remote
    machine.TIMEFORMAT-t option. 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”_PATH_DEFTAPE
      in /usr/include/paths.h.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.
dump_lfs command appeared in NetBSD
  1.5.
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).
| March 25, 2019 | NetBSD 10.1 |