macro and text revision (-mdoc version 3)
[unix-history] / usr / src / sbin / dump / dump.8
index b56e706..8e318a8 100644 (file)
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
+.\" Copyright (c) 1980, 1991 Regents of the University of California.
+.\" All rights reserved.
 .\"
 .\"
-.\"    @(#)dump.8      6.5 (Berkeley) %G%
+.\" %sccs.include.redist.man%
 .\"
 .\"
-.TH DUMP 8 ""
-.UC 4
-.SH NAME
-dump \- incremental file system dump
-.SH SYNOPSIS
-.B dump
-[ key [
-.I argument
-\&... ] filesystem ]
-.SH DESCRIPTION
-.I Dump
-copies to magnetic tape all files
-changed after a certain date
-in the
-.I filesystem.
-The
-.I key
-specifies the date and other options about the dump.
-.I Key
-consists of characters from
-the set
-.B 0123456789fusdWn.
-.TP 5
-.B  0\-9
-This number is the `dump level'.
-All files modified since the last date stored
-in the file
-.I /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
-.B 0
-causes the entire filesystem to be dumped.
-.TP 5
-.B f
-Place the dump on the next 
-.I argument 
-file
-instead of the tape.
-If the name of the file is ``\-'',
-.I dump 
-writes to standard output.
-.TP 5
-.B u
-If the dump completes successfully,
-write the date of the beginning of the dump on
-file
-.I /etc/dumpdates.
-This file records a separate date for
-each filesystem and each dump level.
+.\"     @(#)dump.8     6.6 (Berkeley) %G%
+.\"
+.Dd 
+.Dt DUMP 8
+.Os BSD 4
+.Sh NAME
+.Nm dump
+.Nd filesystem backup
+.Sh SYNOPSIS
+.Nm dump
+.Op Cm 0123456789fusdWn Op Ar argument ...
+.Op Ar filesystem
+.Sh DESCRIPTION
+.Nm Dump
+examines files
+on a filesystem
+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
+.Xr rdump 8
+for
+remote backups) .
+.Pp
+The following options are supported by
+.Nm dump:
+.Bl -tag -width 4n
+.It Cm 0\-9
+Dump levels.
+A level 0, full backup,
+guarantees the entire file system is copied.
+A level number above 0,
+incremental backup,
+tells dump to
+copy all files new or modified since the
+last dump of the same or lower level. The default
+level is 9.
+.It Cm f Op Ar file
+Write the backup to
+.Ar file ;
+.Ar file
+may be a special device file
+like
+.Pa /dev/rmt12
+(a tape drive),
+.Pa /dev/rsd1c
+(an optical drive),
+an ordinary file,
+or
+.Ql Fl
+(the standard output).
+.It Cm d Ar density
+Set tape density to
+.Ar density .
+The default is 1600BPI.
+.It Cm n
+Whenever
+.Nm dump
+requires operator attention,
+notify all operators in the group
+.Dq operator
+by means similar to a
+.Xr wall 1 .
+.It Cm s Ar feet
+Attempt to caluculate the amount of tape needed
+at a particular density.
+If this amount is exceeded,
+.Nm dump
+prompts for a new tape. It is recommended to be a bit conservative
+on this option.
+The default size is 2300 feet.
+.It Cm u
+Update the file
+.Pa /etc/dumpdates
+after a successful dump.
 The format of
 The format of
-.I /etc/dumpdates
+.Pa /etc/dumpdates
 is readable by people, consisting of one
 free format record per line:
 is readable by people, consisting of one
 free format record per line:
-filesystem name, increment level
+filesystem name,
+increment level
 and
 and
-.I ctime(3)
+.Xr ctime 3
 format dump date.  
 format dump date.  
-.I /etc/dumpdates
+There may be only one entry per filesystem at each level.
+The file
+.Pa /etc/dumpdates
 may be edited to change any of the fields,
 if necessary.
 may be edited to change any of the fields,
 if necessary.
-.TP 5
-.B s
-The size of the dump tape is specified in feet.
-The number of feet is taken from the next
-.I argument.
-When the specified size is reached,
-.I dump
-will wait for reels to be changed.
-The default tape size is 2300 feet.
-.TP 5
-.B d
-The density of the tape, expressed in BPI,
-is taken from the next
-.I argument.
-This is used in calculating the amount of tape
-used per reel. The default is 1600.
-.TP 5
-.B b
-The number of kilobytes per dump record.
-.TP 5
-.B B
-The number of dump records per volume.
-This option overrides the calculation of tape size
-based on length and density.
-.TP 5
-.B W
-.I Dump
+.It Cm W
+.Nm Dump
 tells the operator what file systems need to be dumped.
 This information is gleaned from the files
 tells the operator what file systems need to be dumped.
 This information is gleaned from the files
-.I /etc/dumpdates
+.Pa /etc/dumpdates
 and
 and
-.I /etc/fstab.
+.Pa /etc/fstab .
 The
 The
-.B W
+.Cm W
 option causes
 option causes
-.I dump
+.Nm dump
 to print out, for each file system in
 to print out, for each file system in
-.I /etc/dumpdates
+.Pa /etc/dumpdates
 the most recent dump date and level,
 and highlights those file systems that should be dumped.
 If the 
 the most recent dump date and level,
 and highlights those file systems that should be dumped.
 If the 
-.B W
+.Cm W
 option is set, all other options are ignored, and
 option is set, all other options are ignored, and
-.I dump
+.Nm dump
 exits immediately.
 exits immediately.
-.TP 5
-.B w
+.It Cm w
 Is like W, but prints only those filesystems which need to be dumped.
 Is like W, but prints only those filesystems which need to be dumped.
-.TP 5
-.B n
-Whenever
-.I dump
-requires operator attention,
-notify by means similar to a
-.IR wall (1)
-all of the operators in the group \*(lqoperator\*(rq.
-.PP
-If no arguments are given,
-the
-.I key
-is assumed to be
-.B 9u
-and a default file system is dumped
-to the default tape.
-.PP
-.I Dump
+.El
+.Pp
+If no options are specified,
+.Nm dump
+does a level
+.Cm 9u
+to the system's default tape device.
+.Pp
+.Nm Dump
 requires operator intervention on these conditions:
 end of tape,
 end of dump,
 requires operator intervention on these conditions:
 end of tape,
 end of dump,
@@ -140,34 +130,34 @@ 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
 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
-.B n
+.Cm n
 key,
 key,
-.I dump
+.Nm dump
 interacts with the operator on 
 interacts with the operator on 
-.I dump's
+.Em dump's
 control terminal at times when
 control terminal at times when
-.I dump
+.Nm dump
 can no longer proceed,
 or if something is grossly wrong.
 All questions
 can no longer proceed,
 or if something is grossly wrong.
 All questions
-.I dump
+.Nm dump
 poses
 poses
-.B must
+.Em must
 be answered by typing \*(lqyes\*(rq or \*(lqno\*(rq,
 appropriately.
 be answered by typing \*(lqyes\*(rq or \*(lqno\*(rq,
 appropriately.
-.PP
+.Pp
 Since making a dump involves a lot of time and effort for full dumps,
 Since making a dump involves a lot of time and effort for full dumps,
-.I dump
+.Nm dump
 checkpoints itself at the start of each tape volume.
 If writing that volume fails for some reason,
 checkpoints itself at the start of each tape volume.
 If writing that volume fails for some reason,
-.I dump
+.Nm 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.
 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.
-.PP
-.I Dump
+.Pp
+.Nm 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
 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
@@ -175,71 +165,95 @@ the time to the tape change.
 The output is verbose,
 so that others know that the terminal
 controlling
 The output is verbose,
 so that others know that the terminal
 controlling
-.I dump
+.Nm dump
 is busy,
 and will be for some time.
 is busy,
 and will be for some time.
-.PP
-Now a short suggestion on how to
-perform dumps.
-Start with a full level 0 dump
-.PP
-       dump 0un
-.PP
-Next, dumps of active file 
+.Pp
+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:
+.Bl -bullet -offset indent
+.It
+Always start with a level 0 backup, for example:
+.Bd -literal -offset indent
+/etc/dump 0ufds /dev/nrst1 54000 6000 /usr/src
+.Ed
+.Pp
+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.
+.It
+After a level 0, dumps of active file 
 systems are taken on a daily basis,
 using a modified Tower of Hanoi algorithm,
 with this sequence of dump levels:
 systems are taken on a daily basis,
 using a modified Tower of Hanoi algorithm,
 with this sequence of dump levels:
-.ce 1
+.Bd -literal -offset indent
 3 2 5 4 7 6 9 8 9 9 ...
 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.
+.Ed
+.Pp
+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
 Each week, a level 1 dump is taken, and
-the daily Hanoi sequence repeats with 3.
-For weekly dumps, a set of 5 tapes per dumped file system is
+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.
 used, also on a cyclical basis.
-Each month, a level 0 dump is taken
-on a set of fresh tapes that is saved forever.
-.SH FILES
-.nf
-.ta \w'/etc/dumpdates\ \ 'u
-/dev/rrp1g     default filesystem to dump from
-/dev/rmt8      default tape unit to dump to
-/etc/dumpdates new format dump date record 
-/etc/fstab     dump table: file systems and frequency
-/etc/group     to find group \fIoperator\fP
-.fi
-.DT
-.br
-.SH "SEE ALSO"
-restore(8),
-dump(5),
-fstab(5)
-.SH DIAGNOSTICS
+.El
+.Pp
+After several months or so, the daily and weekly tapes should get
+rotated out of the dump cycle and fresh tapes brought in.
+.Sh FILES
+.Bl -tag -width /etc/dumpdates -compact
+.It Pa /dev/rrp1g
+default filesystem to dump from (system dependent).
+.It Pa /dev/rmt8
+default tape unit to dump to
+.It Pa /etc/dumpdates
+new format dump date record 
+.It Pa /etc/fstab
+dump table: file systems and frequency
+.It Pa /etc/group
+to find group
+.Em operator
+.El
+.Sh SEE ALSO
+.Xr rdump 8 ,
+.Xr restore 8 ,
+.Xr dump 5 ,
+.Xr fstab 5
+.Sh DIAGNOSTICS
 Many, and verbose.
 Many, and verbose.
-.PP
+.Pp
 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 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.
-.SH BUGS
-.PP
+.Sh BUGS
+.Pp
 Fewer than 32 read errors on the filesystem are ignored.
 Each reel requires a new process, so parent processes for
 reels already written just hang around until the entire tape
 is written.
 Fewer than 32 read errors on the filesystem are ignored.
 Each reel requires a new process, so parent processes for
 reels already written just hang around until the entire tape
 is written.
-.PP
-.I Dump
+.Pp
+.Nm Dump
 with the
 with the
-.B W
+.Cm W
 or
 or
-.B w
+.Cm w
 options does not report filesystems that have never been recorded
 options does not report filesystems that have never been recorded
-in /etc/dumpdates, even if listed in /etc/fstab.
-.PP
+in
+.Pa /etc/dumpdates ,
+even if listed in
+.Pa /etc/fstab .
+.Pp
 It would be nice if
 It would be nice if
-.I dump
+.Nm 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
 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
-.IR restore .
+.Xr restore .
+.Sh HISTORY
+A
+.Nm
+command appeared in Version 6 AT&T UNIX.