DUMP(8)

๐Ÿ‘‘ DUMP โ€” the dump(8) glow-up ๐Ÿ’พ

okay bestie, so this is the manual page for dump, section 8, from the system management commands crew. she's an ext2/3/4 filesystem backup queen and she's about to tell you everything โœจ


๐ŸŒธ NAME ๐ŸŒธ

dump โ€” ext2/3/4 filesystem backup

that's it. that's the whole identity. backup girlie ๐Ÿ’…


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

dump [-level#] [-ackMnqSuv] [-A file] [-B records] [-b blocksize] [-d
density] [-D file] [-e inode_numbers] [-E file] [-f file] [-F script]
[-h level] [-I nr errors] [-jcompression_level] [-L label] [-Q file] [-s
feet] [-T date] [-y] [-zcompression_level] files-to-dump

dump [-W | -w]

two whole moods, love that for her ๐Ÿซถ


๐Ÿ’– DESCRIPTION ๐Ÿ’–

dump goes poking around the files on an ext2/3/4 filesystem and figures out which ones need saving. those files get copied over to whatever disk, tape, or other storage medium you told her about, so they're safe forever (peep the -f option below if you wanna do remote backups ๐Ÿ‘€). if a single dump is bigger than the output medium, she just splits it into multiple volumes like a queen. on most media the size is decided by literally writing until an end-of-media indication comes back.

but โ€” and this is the messy part ๐Ÿ˜ญ โ€” on media that can't reliably return an end-of-media indication (some cartridge tape drives, looking at you), every volume is a fixed size instead. the actual size comes from specifying cartridge media, or from the tape size, density, and/or block count options down below. by default, the same output file name is used for each volume, after she prompts the operator to change media.

files-to-dump can be a filesystem identifier OR a list of files and directories to back up. either/or, no pressure ๐ŸŽ€

a filesystem can be identified by:

  • its device path (e.g. /dev/sde2) ๐Ÿฆ‹
  • its mountpoint, if it's currently mounted (e.g. /var) ๐ŸŒธ
  • its label or UUID property, if the block device is known to blkid(8) (e.g. LABEL=foobar or UUID=a0f155-...) ๐Ÿ’ซ

if files-to-dump is a list of files and directories, then all of them must live on the same filesystem. no mixing, babes, she will not be doing that.

and if the filesystem is a bind mount, then the whole underlying filesystem gets dumped โ€” even if the bind mount is only of a subdirectory of that underlying filesystem. wild, i know. but listen:

do not rely on this behaviour staying the same in the future. it's giving "temporary situation", fr fr. โš ๏ธ

โœจ OPTIONS โœจ

here's everything dump supports. buckle up bestie, there's a lot, but every single one is important ๐Ÿ’œ

  • -level# โ€” the dump level, and it takes any integer. a level 0, aka a full backup, written as -0, guarantees the entire file system gets copied (though like, also see the -h option below, okay?). a level number above 0, aka an incremental backup, tells dump to copy all files that are new or modified since the last dump of a lower level. the default level is 0. historically only levels 0 to 9 were usable in dump, but this version is able to understand any integer as a dump level. glow-up confirmed ๐Ÿ‘‘
  • -a, --auto-size โ€” "auto-size". she bypasses all tape length calculations and just writes until an end-of-media indication is returned. this works best for most modern tape drives and it's literally the default. using this option is especially recommended when you're appending to an existing tape, or using a tape drive with hardware compression (where you can never be sure about the compression ratio, and honestly? relatable, nobody knows what's happening in there ๐Ÿ˜ญ).
  • -A, --archive-file archive_file โ€” archives a dump table-of-contents into the specified archive_file, which restore(8) can then use to work out whether a file is in the dump file that's being restored. receipts, bestie, we keep receipts ๐Ÿงพโœจ
  • -b, --block-size blocksize โ€” the number of kilobytes per dump record. the default blocksize is 10, unless you used the -d option to specify a tape density of 6250BPI or more, in which case the default blocksize is 32. the maximal value is 1024. but heads up: since the IO system slices all requests into chunks of MAXBSIZE (which can be as low as 64kB), you can experience problems with dump(8) and restore(8) when using a higher value, depending on your kernel and/or libc versions. so, like, vibe check your kernel first ๐Ÿซ 
  • -B, --blocks-per-volume records โ€” the number of 1 kB blocks per volume. not normally required, because dump can detect end-of-media on her own. but when the specified size is reached, dump waits for you to change the volume. this option overrides the calculation of tape size based on length and density. if compression is on, this limits the size of the compressed output per volume. multiple values may be given as a single argument separated by commas. each value will be used for one dump volume in the order listed; if dump creates more volumes than there are values, the last value gets used for all the remaining volumes. this is useful for filling up already partially filled media (and then continuing with full size volumes on empty media) or for mixing media of different sizes. so versatile, she contains multitudes ๐Ÿ’…
  • -c, --cartridge โ€” changes the defaults for use with a cartridge tape drive, with a density of 8000BPI and a length of 1700 feet. specifying a cartridge drive overrides the end-of-media detection. she said "i'll decide when it's done" ๐Ÿ˜ค
  • -d, --density density โ€” set tape density to density. the default is 1600BPI. specifying a tape density overrides the end-of-media detection. same energy as above, different knob ๐ŸŽ›๏ธ
  • -D, --dumpdates-file file โ€” set the path name of the file that stores the info about previous full and incremental dumps. the default location is /var/lib/dumpdates. her diary, basically ๐Ÿ“”๐Ÿ’–
  • -e, --excluded-inodes inodes โ€” exclude inodes from the dump. the inodes parameter is a comma-separated list of inode numbers (you can use stat(1) to find the inode number for a file or directory). bye bye, not you ๐Ÿšซโœจ
  • -E, --excluded-inodes-file file โ€” read the list of inodes to be excluded from the dump from the text file file. that file should be an ordinary file containing inode numbers separated by newlines. one per line, keep it tidy ๐ŸŒธ
  • -f, --output-file file โ€” write the backup to file. and file can be so many things bestie: a special device file like /dev/st0 (a tape drive) or /dev/rsd1c (a floppy disk drive), an ordinary file, or - (the standard output). multiple file names may be given as a single argument separated by commas. each file will be used for one dump volume in the order listed; if the dump needs more volumes than the number of names given, the last file name will be used for all remaining volumes after prompting for media changes. and if the name of the file is of the form host:file or user@host:file, then dump writes to the named file on the remote host (which should already exist โ€” dump doesn't create a new remote file) using rmt(8). the default path name of the remote rmt(8) program is /etc/rmt; this can be overridden by the environment variable RMT. remote girlie stays remote ๐Ÿ’ปโœจ
  • -F, --eot-script script โ€” run script at the end of each tape (except for the last one). the device name and the current volume number are passed on the command line. the script must return 0 if dump should continue without asking the user to change the tape, or 1 if dump should continue but ask the user to change the tape. any other exit code will cause dump to abort ๐Ÿ˜ญ. and for security reasons, dump reverts back to the real user ID and the real group ID before running the script. safety first, always ๐Ÿซถ
  • -h, --honor-nodump-level level โ€” honor the user nodump flag UF_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. she's polite about it, but only up to a point ๐Ÿ’…
  • -I, --max-ignore-errors nr errors โ€” by default, dump 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 dump on an active filesystem where read errors simply indicate an inconsistency between the mapping and dumping passes. and a value of 0 means that all read errors will be ignored. zero chill, zero errors reported, iconic ๐Ÿ˜Œ
  • -j, --bz-compress compression level โ€” compress every block to be written on the tape using the bzip2 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. if the optional parameter is specified, there should be no white space between the option letter and the parameter. none. zero. squeeze them together like besties in a photo ๐Ÿซ‚
  • -k, --kerberos โ€” use Kerberos authentication to talk to remote tape servers. (only available if this option was enabled when dump was compiled.) so like, ask your distro if she's got it ๐ŸŒˆ
  • -L, --label label โ€” the user-supplied text string label is placed into the dump header, where tools like restore(8) and file(8) can access it. note that this label is limited to be at most LBLSIZE (currently 16) characters, which must include the terminating \0. so really you've got less than you think, budget accordingly ๐Ÿ’€
  • -m, --metadata-only โ€” if this flag is specified, dump will optimise the output for inodes that have been changed but not modified since the last dump ('changed' and 'modified' have the meaning defined in stat(2)). for those inodes, dump will save only the metadata, instead of saving the entire inode contents. inodes which are either directories or have been modified since the last dump are saved in a regular way. uses of this flag must be consistent, meaning that either every dump in an incremental dump set has the flag, or none of them do. no halfsies.
if you use this option, be aware that many programs that unpack files from archives (e.g. tar, rpm, unzip, dpkg) may set files' mtimes to dates in the past. files installed this way may not be dumped correctly using dump -m if the modified mtime is earlier than the previous level dump. ๐Ÿ˜ญ

tapes written using such 'metadata-only' inodes will not be compatible with the BSD tape format or older versions of restore. so like, know what you're getting into, fr fr.

  • -M, --multivolume โ€” enable the multi-volume feature. the name specified with -f is treated as a prefix, and dump writes in sequence to <prefix>001, <prefix>002, etc. this can be useful when dumping to files on an ext2/3/4 partition, in order to bypass the 2GB file size limitation. she said "i'll just make more files, problem solved" ๐Ÿ‘‘โœจ
  • -n, --notify-operators โ€” whenever dump requires operator attention, she notifies all operators in the group operator by means similar to a wall(1). group chat announcement, basically ๐Ÿ“ฃ๐Ÿ’–
  • -q, --abort-on-intervention โ€” make dump abort immediately whenever operator attention is required, without prompting in case of write errors, tape changes, etc. no questions, no waiting, she's out ๐Ÿšช๐Ÿ’จ

  • -Q, --QFAfile file โ€” turns on Quick File Access support ๐Ÿ’ซ Tape positions for every inode get stashed into the file file, and restore uses that (when you call it with parameter -Q and the filename) to jump the tape straight to the file it's currently working on. This literally saves hours when you're restoring single files out of huge backups, and it saves the tape's and the drive's head from wear. Your hardware will thank you ๐Ÿซถ

It's recommended to set up the st driver to return logical tape positions rather than physical ones before calling dump/restore with parameter -Q. Because 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. Peep the st(4) man page, option MTSETDRVBUFFER, or the mt(1) man page, for how to set the driver to return logical tape positions ๐Ÿ‘‘

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 ๐Ÿ˜ตโ€๐Ÿ’ซ fr fr.

This option can be used when dumping to local tapes (see above) or to local files.

  • -s, --tape-feet-per-volume feet โ€” tries to calculate how much tape you'll need at a particular density ๐Ÿ“ผ If that amount gets exceeded, dump prompts for a new tape. Bestie, be a bit conservative on this one. The default tape length is 2300 feet. Specifying the tape size overrides end-of-media detection.
  • -S, --size-estimate-only โ€” size estimate only โœจ It figures out how much space the dump needs without actually doing it, and shows you the estimated number of bytes it'll take. Super useful with incremental dumps to work out how many volumes of media you'll need.
  • -T, --dump-changed-since-time date โ€” use the given date as the starting time for the dump instead of the time it works out from looking in /var/lib/dumpdates โฐ The format of date is the same as that of ctime(3) followed by an rfc822 timezone specification: either a plus or minus sign followed by two digits for the number of hours and two digits for the minutes. Example: -0800 for eight hours west of Greenwich, or +0230 for two hours and a half east of Greenwich. This timezone offset takes daylight saving time into account (if that applies to the timezone) โ€” UTC offsets when daylight savings time is in effect will be different than offsets when daylight savings time is not in effect. For backward compatibility, if no timezone is specified, a local time is assumed. This option is useful for automated dump scripts that wish to dump over a specific period of time. The -T option is mutually exclusive from the -u option ๐Ÿšซ
  • --dumpdates-time date โ€” use the specified date as the as-of time that the dump is taken from instead of using the current time. Most useful when dumping a snapshot, where the time of the dump should be the time of the snapshot ๐Ÿ“ธ
  • -u, --update-dumpdates โ€” update the file /var/lib/dumpdates after a successful dump ๐Ÿ—‚๏ธ The format of /var/lib/dumpdates is human-readable, one record per line. Each line holds, separated by spaces, a filesystem identifier, dump increment level and dump date in ctime(3) format followed by an rfc822 timezone specification (see the -T option for details). If no timezone offset is specified, times are interpreted as local. Whenever the file is written, all dates in the file are converted to the local time zone, without changing the UTC times.

The filesystem identifier is exactly as given on the command line, e.g. UUID=a0f155-... or /dev/sde2. This is for incremental dumps of filesystems on removable media or other situations where the device path changes over time. There may be at most one entry per filesystem for each increment level. The file /var/lib/dumpdates may be edited to change any of the fields, if necessary.

  • --use-blockdev-for-dumpdates โ€” write the blockdev into the file /var/lib/dumpdates after a successful dump instead of whatever parameter was passed to dump. This makes dump revert to the behaviour from before 0.4b49. Heads up though: removable media whose block device changes when it is reinserted will not find the correct records in /var/lib/dumpdates when using this flag ๐Ÿ˜ฌ
  • -v, --verbose โ€” the -v (verbose) option causes dump to print extra information which could be helpful in debug sessions ๐Ÿ”
  • -W, --print-all-dump-stats โ€” dump tells the operator what file systems need to be dumped. This information is gleaned from the files /var/lib/dumpdates and /etc/fstab. The -W option causes dump to print out, for all file systems in /var/lib/dumpdates, and recognized file systems in /etc/mtab and /etc/fstab, the most recent dump date and level, and highlights those that should be dumped. If the -W option is set, all other options are ignored, and dump exits immediately ๐Ÿ’€
  • -w, --print-dump-stats โ€” is like -W, but prints only recognized filesystems in /etc/mtab and /etc/fstab which need to be dumped.
  • -y, --lzo-compress โ€” compress every block to be written to the tape using the lzo library ๐Ÿ—œ๏ธ This doesn't compress as well as the zlib library but it's much faster. 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.4b34 version of restore in order to extract compressed tapes. Tapes written using compression will not be compatible with the BSD tape format โš ๏ธ
  • -z, --z-compress compression level โ€” compress every block to be written on the tape using the 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. If the optional parameter is specified, there should be no white space between the option letter and the parameter.
  • --filesys-name filesys description โ€” use the supplied filesys description instead of "an unlisted file system" for dumping a filesystem that is not listed in /etc/mtab or /etc/fstab. This option has no effect if the filesystem being dumped is in mtab or fstab ๐Ÿšซ

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 is more than a threshold of nr errors). In addition to alerting all operators implied by the -n key, 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:

  • Always start with a level 0 backup, for example:
/sbin/dump -0u -f /dev/st0 /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 ๐ŸŒˆ

  • After a level 0, dumps of active file systems are taken on a daily basis, with this sequence of dump levels:
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 ๐ŸŽ€

Another backup strategy is the Tower of Hanoi sequence, which reuses older tapes in a way that for newer dates the available restore points are more frequent than for older dates (see https://en.wikipedia.org/wiki/Backup_rotation_scheme for additional information).

(The 4.3BSD option syntax is implemented for backward compatibility but is not documented here.)

๐ŸŒธ ENVIRONMENT ๐ŸŒธ

  • TAPE โ€” if no -f option was specified, dump will use the device specified via TAPE as the dump device. TAPE may be of the form tapename, host:tapename, or user@host:tapename.
  • RMT โ€” the environment variable RMT will be used to determine the pathname of the remote rmt(8) program.
  • RSH โ€” dump uses the contents of this variable to determine the name of the remote shell command to use when doing remote backups (rsh, ssh etc.). If this variable is not set, rcmd(3) will be used, but only root will be able to do remote backups.

๐Ÿ’– FILES ๐Ÿ’–

  • /dev/st0 โ€” default tape unit to dump to
  • /var/lib/dumpdates โ€” dump date records
  • /etc/fstab โ€” dump table: file systems and frequency
  • /etc/mtab โ€” dump table: mounted file systems
  • /etc/group โ€” to find the group operator

โœจ SEE ALSO โœจ

fstab(5), restore(8), rmt(8)

๐Ÿฉบ DIAGNOSTICS ๐Ÿฉบ

Many, and verbose ๐Ÿ’€

๐Ÿ’– COMPATIBILITY ๐Ÿ’–

Okay so the format of the /var/lib/dumpdates file changed in release 0.4b34 โ€” but bestie, don't panic. ๐Ÿซถ The file gets read correctly by either pre-0.4b34 or 0.4b34 and later versions of dump, the only condition being that the machine you're running dump on didn't switch timezones in between (which, like, should be a pretty rare occurrence ngl). ๐ŸŒโœจ


๐Ÿšช EXIT STATUS ๐Ÿšช

dump exits with zero status on success, periodt. โœจ Startup errors get an exit code of 1, and abnormal termination gets an exit code of 3. Them's the vibes. ๐Ÿ’…


๐Ÿ’€ BUGS ๐Ÿ’€

Not me listing out the flaws but honestly it's giving transparency:

  • It might be considered a bug that this version of dump can only handle ext2/3/4 filesystems. Specifically โ€” and I cannot stress this enough โ€” it does not work with FAT filesystems. ๐Ÿšซ
  • Fewer than 32 read errors (change this with -I) on the filesystem are ignored. So if noticing read errors is important to you, the move is to parse the output from dump and look for lines that contain the text 'read error'. ๐Ÿ”
  • When a read error occurs, dump prints out the corresponding physical disk block and sector number and the ext2/3/4 logical block number. What it does not print out is the corresponding file name โ€” or even the inode number. ๐Ÿ˜ญ So you, the user, have to use debugfs(8), commands ncheck and icheck, to translate the ext2blk number printed out by dump into an inode number, and then into a file name. Good luck bestie, that's a whole quest. ๐Ÿ—บ๏ธ
  • Each reel requires a new process, so parent processes for reels already written just... hang around. Waiting. Chilling. Until the entire tape is written. ๐Ÿ™ˆ
  • The estimated number of tapes is not correct if compression is on. Lowkey rude but okay.
  • It would be nice if 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. Until then: we dream. ๐Ÿ’ญ
  • dump cannot do remote backups without being run as root, due to its security history. Presently, it works if you set it setuid (like it used to be), but this might constitute a security risk. โš ๏ธ Note that you can set RSH to use a remote shell program instead.
Real talk: that setuid one is a genuine security risk โ€” dramatic pause, be careful. ๐Ÿ’…

๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

The dump/restore 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). ๐ŸŽ€

Starting with 0.4b5, the new maintainer is Stelian Pop <stelian@popies.net>. โœจ

Since release 0.4b49 the new maintainer is Tim Woodall <debianbugs@woodall.me.uk>. ๐Ÿ’œ


๐ŸŒˆ AVAILABILITY ๐ŸŒˆ

The dump/restore backup suite is available from https://dump.sourceforge.io โ€” go get it, it's iconic. ๐Ÿฆ‹


๐Ÿ“œ HISTORY ๐Ÿ“œ

A dump command appeared in Version 6 AT&T UNIX. Ancient. Legendary. The blueprint, fr fr. โญ


And that's a wrap on DUMP(8), bestie!! ๐Ÿ’– This gorgeous specimen is version 0.4b55 of 10 Jun 2026, from the BSD corner of the world, and that's the whole manual page โ€” every last flag, file, exit code and bug note accounted for. Now go forth and back up your stuff before something tragic happens, mwah ๐Ÿ’‹โœจ๐ŸŽ€๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from