| DUMP(8) | System Manager's Manual | DUMP(8) | 
dump, rdump —
| dump | [ -0123456789aceFinStuX]
      [-Brecords]
      [-bblocksize]
      [-ddensity]
      [-ffile]
      [-hlevel]
      [-kread-blocksize]
      [-Llabel]
      [-ltimeout]
      [-rcachesize]
      [-sfeet]
      [-Tdate]
      [-Udumpdev]
      [-xsnap-backup]
      files-to-dump | 
| dump | [ -W|-w](4.3BSD option syntax is implemented for backward compatibility, but not documented here.) | 
dump 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.
Any files with the superuser “log” flag
    (SF_LOG) set will be skipped. These files are
    assumed to be wapbl(4) journal
    files and will not be backed up.
The following options are supported by
    dump:
-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 (but see also the
      -i option below). The default level is 9.-a-B
    records-b
    blocksize-c-d
    density-e-F-f
    file-dump 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.-i-k
    read-blocksize-L
    label\0’.-l
    timeoutdump falls back to
      the default behavior, and prompts the operator for the next tape.-ndump 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-s
    feetdump prompts for a new
      tape. It is recommended to be a bit conservative on this option. The
      default tape length is 2300 feet.-T
    date-T option and the
      -u option are mutually exclusive.-tdump
      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.-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.-Wdump 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-W, but prints only those file systems which
      need to be dumped.-X-x but uses a file system internal
      snapshot on the file system to be dumped.-x
    snap-backupIf dump 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 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 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 volume. If writing that 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.
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 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 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 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.
The historic alternate name rdump was once
    required when dumping to a remote host. This functionality is now built into
    dump itself.
dump.
TAPEdump 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 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 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 command appeared in
  Version 4 AT&T UNIX.
The -i flag was inspired by the
    -x flag from Sun's Solstice Backup utility.
dump 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.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(8).| March 25, 2019 | NetBSD 9.4 |