.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Id: dump.8.in,v 1.7 1999/12/06 21:37:50 tiniou Exp $
+.\" $Id: dump.8.in,v 1.34 2001/11/11 00:06:39 stelian Exp $
.\"
.Dd __DATE__
.Dt DUMP 8
.Nd ext2 filesystem backup
.Sh SYNOPSIS
.Nm dump
-.Op Fl 0123456789ackMnSu
+.Op Fl 0123456789ackMnqSu
.Op Fl B Ar records
.Op Fl b Ar blocksize
.Op Fl d Ar density
+.Op Fl e Ar inode numbers
+.Op Fl E Ar file
.Op Fl f Ar file
+.Op Fl F Ar script
.Op Fl h Ar level
+.Op Fl I Ar nr errors
+.Op Fl j Ar compression level
.Op Fl L Ar label
+.Op Fl Q Ar file
.Op Fl s Ar feet
.Op Fl T Ar date
-.Ar filesystem
-.Nm dump
-.Op Fl 0123456789ackMnSu
-.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
+.Op Fl z Ar compression level
+.Ar files-to-dump
.Nm dump
.Op Fl W Li \&| Fl w
.Pp
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
-.Fl a
-option.
+end-of-media indication is returned.
.Pp
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, density and/or
-block count options below.
+(such as some cartridge tape drives), each volume is of a fixed size;
+the actual size is determined by specifying cartridge media, or via 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
+.Ar files-to-dump
+is either a mountpoint of a filesystem
+or a list of files and directories to be backed up as a subset of a
+filesystem.
+In the former case, either the path to a mounted filesystem
+or the device of an unmounted filesystem can be used.
+In the latter case, certain restrictions are placed on the backup:
+.Fl u
+is not allowed, the only dump level that is supported is
+.Fl 0
+and all the files and directories must reside on the same filesystem.
+.Pp
The following options are supported by
.Nm Ns :
.Bl -tag -width Ds
last dump of a lower level.
The default level is 9.
.It Fl B Ar records
-The number of 1 KB blocks per volume.
-This option overrides the calculation of tape size
-based on length and density.
+The number of 1 kB blocks per volume.
+This option overrides the end-of-media detection, and calculation
+of tape size based on length and density. If compression is on this
+limits the size of the compressed output per volume.
.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).
+Bypass all tape length calculations, and write
+until an end-of-media indication is returned. This works best
+for most modern tape drives, and is the default.
+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
+(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.
+The default blocksize is 10.
.It Fl c
Change the defaults for use with a cartridge tape drive, with a density
-of 8000 bpi, and a length of 1700 feet.
+of 8000 bpi, and a length of 1700 feet. Specifying a cartridge drive
+overrides the end-of-media detection.
+.It Fl e Ar inodes
+Exclude
+.Ar inodes
+from the dump. The
+.Ar inodes
+parameter is a comma separated list of inode numbers (you can use
+.Ar stat
+to find the inode number for a file or directory).
+.It Fl E Ar file
+Read list of inodes to be excluded from the dump from the text file
+.Ar file .
+The file
+.Ar file
+should be an ordinary file containing inode numbers separated by
+newlines.
.It Fl h Ar level
Honor the user
.Dq nodump
.It Fl d Ar density
Set tape density to
.Ar density .
-The default is 1600BPI.
+The default is 1600BPI. Specifying a tape density overrides the
+end-of-media detection.
.It Fl f Ar file
Write the backup to
.Ar file ;
.Pa /etc/rmt ;
this can be overridden by the environment variable
.Ev RMT .
+.It Fl F Ar script
+Run script at the end of each tape. The device name and the
+current volume number are passed on the command line.
+The script must return 0 if
+.Nm
+should continue without asking the user to change the tape, 1 if
+.Nm
+should continue but ask the user to change the tape.
+Any other exit code will cause
+.Nm
+to abort.
+For security reasons,
+.Nm
+reverts back to the real user ID and the real group ID before
+running the script.
+.It Fl I Ar nr errors
+By default,
+.Nm
+will ignore the first 32 read errors on the file
+system before asking for operator intervention. You can change this
+using this flag to any value. This is useful when running
+.Nm
+on an active filesystem where read errors simply indicate an
+inconsistency between the mapping and dumping passes.
+.It Fl j Ar compression level
+Compress every block to be written on the tape using bzlib library. This
+option will work only when dumping to a file or pipe or, when dumping
+to a tape drive, if the tape drive is capable of writing variable
+length blocks. You will need at least the 0.4b24 version of restore in
+order to extract compressed tapes. Tapes written using compression will
+not be compatible with the BSD tape format. The (optional) parameter
+specifies the compression level bzlib will use. The default compression
+level is 2.
.It Fl k
Use Kerberos authentication to talk to remote tape servers. (Only
available if this option was enabled when
.Dq operator
by means similar to a
.Xr wall 1 .
+.It Fl q
+Make
+.Nm
+abort immediately whenever operator attention is required,
+without prompting in case of write errors, tape changes etc.
+.It Fl Q Ar file
+Enable the Quick File Access support. Tape positions for each
+inode are stored into the file
+.Ar file
+which is used by restore (if called with parameter Q and the filename)
+to directly position the tape at the file restore is currently working
+on. This saves hours when restoring single files from large backups,
+saves the tapes and the drive's head.
+.Pp
+It is recommended to set up the st driver to return logical tape
+positions rather than physical before calling dump/restore with
+parameter Q. Since not all tape devices support physical tape
+positions those tape devices return an error during dump/restore when
+the st driver is set to the default physical setting.
+Please see the st man page, option MTSETDRVBUFFER, or the mt man
+page, on how to set the driver to return logical tape positions.
+.Pp
+Before calling restore with parameter Q, always make sure the st
+driver is set to return the same type of tape position used during the
+call to dump. Otherwise restore may be confused.
.It Fl s Ar feet
-Attempt to calculate the amount of tape needed
-at a particular density.
+Attempt to calculate the amount of tape needed at a particular density.
If this amount is exceeded,
.Nm
prompts for a new tape.
It is recommended to be a bit conservative on this option.
-The default tape length is 2300 feet.
+The default tape length is 2300 feet. Specifying the tape size
+overrides end-of-media detection.
.ne 1i
.It Fl S
Size estimate. Determine the amount of space
that is needed to perform the dump without
actually doing it, and display the estimated
-number of blocks it will take. This is useful
+number of bytes it will take. This is useful
with incremental dumps to determine how many
volumes of media will be needed.
.It Fl T Ar date
.Fl W
option causes
.Nm
-to print out, for each file system in
+to print out, for all file systems in
.Pa __DUMPDATES__ ,
+and regognized file systems in
+.Pa /etc/fstab .
the most recent dump date and level,
-and highlights those file systems that should be dumped.
+and highlights those that should be dumped.
If the
.Fl W
option is set, all other options are ignored, and
.It Fl w
Is like
.Fl W ,
-but prints only those filesystems which need to be dumped.
+but prints only recognized filesystems in
+.Pa /etc/fstab
+which need to be dumped.
+.It Fl z Ar compression level
+Compress every block to be written on the tape using zlib library. This
+option will work only when dumping to a file or pipe or, when dumping
+to a tape drive, if the tape drive is capable of writing variable
+length blocks. You will need at least the 0.4b22 version of restore in
+order to extract compressed tapes. Tapes written using compression will
+not be compatible with the BSD tape format. The (optional) parameter
+specifies the compression level zlib will use. The default compression
+level is 2.
.El
.Pp
.Nm Dump
end of dump,
tape write error,
tape open error or
-disk read error (if there is more than a threshold of 32).
+disk read error (if there is more than a threshold of nr errors).
In addition to alerting all operators implied by the
.Fl n
key,
If this variable is not set,
.Xr rcmd 3
will be used, but only root will be able to do remote backups.
+.El
.Sh FILES
.Bl -tag -width __DUMPDATES__ -compact
.It Pa /dev/st0
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
+Fewer than 32 read errors (change this with -I)
+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
reels already written just hang around until the entire tape
is written.
.Pp
-.Nm Dump
-with the
-.Fl W
-or
-.Fl w
-option does not report filesystems that have never been recorded
-in
-.Pa __DUMPDATES__ ,
-even if listed in
-.Pa /etc/fstab .
+The estimated number of tapes is not correct if compression is on.
.Pp
It would be nice if
.Nm
.Sh AUTHOR
The
.Nm dump/restore
-backup suit was ported to Linux's Second Extended File System
+backup suite was ported to Linux's Second Extended File System
by Remy Card <card@Linux.EU.Org>. He maintained the initial versions
of dump (up and including 0.4b4, released in january 1997).
.Pp
Starting with 0.4b5, the new maintainer is Stelian Pop
.br
-<pop@cybercable.fr>.
+<pop@noos.fr>.
.Sh AVAILABILITY
The
.Nm dump/restore
-backup suit is available for anonymous ftp from tsx-11.mit.edu
-in /pub/linux/ALPHA/ext2fs (development versions) or
-/pub/linux/packages/ext2fs (stable versions).
-.Pp
-An alternate downloading location is http://perso.cybercable.fr/pop/dump.
+backup suite is available from
+.br
+http://dump.sourceforge.net
.Sh HISTORY
A
.Nm