]> git.wh0rd.org - dump.git/blobdiff - dump/dump.8
Version 0.4b6.
[dump.git] / dump / dump.8
index fae652bcd70ae3e0af047fd1205577f4bcaf40a0..b7f427ea79830ac8fcdec4ab2c6cd6cb72ecdc76 100644 (file)
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)dump.8     8.3 (Berkeley) 5/1/95
+.\"    $Id: dump.8,v 1.3 1999/10/11 12:59:18 stelian Exp $
 .\"
-.Dd May 1, 1995
+.Dd June 4, 1997
 .Dt DUMP 8
 .Os BSD 4
 .Sh NAME
 .Nm dump
-.Nd filesystem backup
+.Nd ext2 filesystem backup
 .Sh SYNOPSIS
 .Nm dump
-.Op Fl 0123456789cnu
+.Op Fl 0123456789acknu
 .Op Fl B Ar records
 .Op Fl b Ar blocksize
 .Op Fl d Ar density
 .Op Fl f Ar file
 .Op Fl h Ar level
+.Op Fl L Ar label
 .Op Fl s Ar feet
 .Op Fl T Ar date
 .Ar filesystem
 .Nm dump
-.Op Fl 0123456789cnu
+.Op Fl 0123456789acknu
 .Op Fl B Ar records
 .Op Fl b Ar blocksize
 .Op Fl d Ar density
 .Op Fl f Ar file
 .Op Fl h Ar level
+.Op Fl L Ar label
 .Op Fl s Ar feet
 .Op Fl T Ar date
 .Ar directory
 .in -\\n(iSu
 (The
 .Bx 4.3
-option syntax is implemented for backward compatibility, but
+option syntax is implemented for backward compatibility but
 is not documented here.)
 .Sh DESCRIPTION
 .Nm Dump
 examines files
-on a filesystem
+on an ext2 filesystem
 and determines which files
 need to be backed up. These files
 are copied to the given disk, tape or other
@@ -80,17 +83,21 @@ 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.
+end-of-media indication is returned. This can be enforced
+by using the
+.Fl a
+option.
+.Pp
 On media that cannot reliably return an end-of-media indication
-(such as some cartridge tape drives)
+(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
+the actual size is determined by the tape size, 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.
 .Pp
 The following options are supported by
-.Nm dump :
+.Nm Ns :
 .Bl -tag -width Ds
 .It Fl 0\-9
 Dump levels.
@@ -101,19 +108,46 @@ guarantees the entire file system is copied
 option below).
 A level number above 0,
 incremental backup,
-tells dump to
+tells
+.Nm dump
+to
 copy all files new or modified since the
 last dump of the same or lower level.
 The default level is 9.
 .It Fl B Ar records
-The number of dump records per volume.
+The number of 1 KB blocks per volume.
 This option overrides the calculation of tape size
 based on length and density.
+.It Fl a
+.Dq auto-size .
+Bypass all tape length considerations, and enforce writing
+until an end-of-media indication is returned.  This fits best
+for most modern tape drives.  Use of this option is particularly
+recommended when appending to an existing tape, or using a tape
+drive with hardware compression (where you can never be sure about
+the compression ratio).
 .It Fl b Ar blocksize
 The number of kilobytes per dump record.
+Since the IO system slices all requests into chunks of MAXBSIZE
+(typically 64KB), it is not possible to use a larger blocksize
+without having problems later with
+.Xr restore 8 .
+Therefore
+.Nm dump
+will constrain writes to MAXBSIZE.
 .It Fl c
-Modify the calculation of the default density and tape size to be more
-appropriate for cartridge tapes.
+Change the defaults for use with a cartridge tape drive, with a density
+of 8000 bpi, and a length of 1700 feet.
+.It Fl h Ar level
+Honor the user
+.Dq nodump
+flag
+.Dp Dv UF_NODUMP
+only for dumps at or above the given
+.Ar level .
+The default honor level is 1,
+so that incremental backups omit such files
+but full backups retain them.
 .It Fl d Ar density
 Set tape density to
 .Ar density .
@@ -124,10 +158,10 @@ Write the backup to
 .Ar file
 may be a special device file
 like
-.Pa /dev/rmt12
+.Pa /dev/st0
 (a tape drive),
 .Pa /dev/rsd1c
-(a disk drive),
+(a floppy disk drive),
 an ordinary file,
 or
 .Ql Fl
@@ -138,25 +172,39 @@ 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
-.Dq host:file ,
+.Dq host:file
 or
-.Dq user@host:file ,
-.Nm dump
+.Dq user@host:file
+.Nm
 writes to the named file on the remote host using
 .Xr rmt 8 .
-.It Fl h Ar level
-Honor the user
-.Dq nodump
-flag
-.Dp Dv UF_NODUMP
-only for dumps at or above the given
-.Ar level .
-The default honor level is 1,
-so that incremental backups omit such files
-but full backups retain them.
+The default path name of the remote
+.Xr rmt 8
+program is
+.\" rmt path, is the path on the remote host
+.Pa /etc/rmt ;
+this can be overridden by the environment variable
+.Ev RMT .
+.It Fl k
+Use Kerberos authentication to talk to remote tape servers.  (Only
+available if this option was enabled when
+.Nm
+was compiled.)
+.It Fl L Ar label
+The user-supplied text string
+.Ar label
+is placed into the dump header, where tools like
+.Xr restore 8
+and
+.Xr file 1
+can access it.
+Note that this label is limited
+to be at most LBLSIZE (currently 16) characters, which must include
+the terminating
+.Ql \e0 .
 .It Fl n
 Whenever
-.Nm dump
+.Nm
 requires operator attention,
 notify all operators in the group
 .Dq operator
@@ -166,7 +214,7 @@ by means similar to a
 Attempt to calculate the amount of tape needed
 at a particular density.
 If this amount is exceeded,
-.Nm dump
+.Nm
 prompts for a new tape.
 It is recommended to be a bit conservative on this option.
 The default tape length is 2300 feet.
@@ -175,7 +223,9 @@ The default tape length is 2300 feet.
 Use the specified date as the starting time for the dump
 instead of the time determined from looking in
 .Pa /etc/dumpdates .
-The format of date is the same as that of
+The format of
+.Ar date
+is the same as that of
 .Xr ctime 3 .
 This option is useful for automated dump scripts that wish to
 dump over a specific period of time.
@@ -212,18 +262,20 @@ and
 The
 .Fl W
 option causes
-.Nm dump
+.Nm
 to print out, for each file system in
-.Pa /etc/dumpdates
+.Pa /etc/dumpdates ,
 the most recent dump date and level,
 and highlights those file systems that should be dumped.
 If the
 .Fl W
 option is set, all other options are ignored, and
-.Nm dump
+.Nm
 exits immediately.
 .It Fl w
-Is like W, but prints only those filesystems which need to be dumped.
+Is like
+.Fl W ,
+but prints only those filesystems which need to be dumped.
 .El
 .Pp
 .Nm Dump
@@ -232,19 +284,19 @@ 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).
+disk read error (if there is more than a threshold of 32).
 In addition to alerting all operators implied by the
 .Fl n
 key,
-.Nm dump
+.Nm
 interacts with the operator on
 .Em dump's
 control terminal at times when
-.Nm dump
+.Nm
 can no longer proceed,
 or if something is grossly wrong.
 All questions
-.Nm dump
+.Nm
 poses
 .Em must
 be answered by typing
@@ -254,10 +306,10 @@ or
 appropriately.
 .Pp
 Since making a dump involves a lot of time and effort for full dumps,
-.Nm dump
+.Nm
 checkpoints itself at the start of each tape volume.
 If writing that volume fails for some reason,
-.Nm dump
+.Nm
 will,
 with operator permission,
 restart itself from the checkpoint
@@ -272,7 +324,7 @@ the time to the tape change.
 The output is verbose,
 so that others know that the terminal
 controlling
-.Nm dump
+.Nm
 is busy,
 and will be for some time.
 .Pp
@@ -309,9 +361,29 @@ used, also on a cyclical basis.
 .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 ENVIRONMENT
+.Bl -tag -width Fl
+.It Ev TAPE
+If no -f option was specified,
+.Nm
+will use the device specified via
+.Ev TAPE
+as the dump device.
+.Ev TAPE
+may be of the form
+.Qq tapename ,
+.Qq host:tapename ,
+or
+.Qq user@host:tapename .
+.It Ev RMT
+The environment variable
+.Ev RMT
+will be used to determine the pathname of the remote
+.Xr rmt 8
+program.
 .Sh FILES
 .Bl -tag -width /etc/dumpdates -compact
-.It Pa /dev/rmt8
+.It Pa /dev/st0
 default tape unit to dump to
 .It Pa /etc/dumpdates
 dump date records
@@ -322,18 +394,23 @@ to find group
 .Em operator
 .El
 .Sh SEE ALSO
+.Xr fstab 5 ,
 .Xr restore 8 ,
-.Xr rmt 8 ,
-.Xr dump 5 ,
-.Xr fstab 5
+.Xr rmt 8
 .Sh DIAGNOSTICS
 Many, and verbose.
 .Pp
-Dump exits with zero status on success.
+.Nm 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
-Fewer than 32 read errors on the filesystem are ignored.
+It might be considered a bug that this version of dump can only handle ext2
+filesystems.  Specifically, it does not work with FAT filesystems.
+.Pp
+Fewer than 32 read errors on the filesystem are ignored. If noticing
+read errors is important, the output from dump can be parsed to look for lines
+that contain the text 'read error'.
 .Pp
 Each reel requires a new process, so parent processes for
 reels already written just hang around until the entire tape
@@ -344,21 +421,29 @@ with the
 .Fl W
 or
 .Fl w
-options does not report filesystems that have never been recorded
+option does not report filesystems that have never been recorded
 in
 .Pa /etc/dumpdates ,
 even if listed in
 .Pa /etc/fstab .
 .Pp
 It would be nice if
-.Nm dump
+.Nm
 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
 .Xr restore .
+.Pp
+.Nm Dump
+cannot do remote backups without being run as root, due to its
+security history.  This will be fixed in a later version of
+.Bx Free .
+Presently, it works if you set it setuid (like it used to be), but this
+might constitute a security risk.
 .Sh HISTORY
 A
-.Nm dump
-command appeared in Version 6 AT&T UNIX.
+.Nm
+command appeared in
+.At v6 .