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=foobarorUUID=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-hoption below, okay?). a level number above 0, aka an incremental backup, tellsdumpto 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 indump, 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 specifiedarchive_file, whichrestore(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-doption 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 ofMAXBSIZE(which can be as low as64kB), you can experience problems withdump(8)andrestore(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, becausedumpcan detect end-of-media on her own. but when the specified size is reached,dumpwaits 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; ifdumpcreates 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 todensity. 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. theinodesparameter is a comma-separated list of inode numbers (you can usestat(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 filefile. thatfileshould be an ordinary file containing inode numbers separated by newlines. one per line, keep it tidy ๐ธ-f,--output-file fileโ write the backup tofile. andfilecan 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 formhost:fileoruser@host:file, thendumpwrites to the named file on the remote host (which should already exist โdumpdoesn't create a new remote file) usingrmt(8). the default path name of the remotermt(8)program is/etc/rmt; this can be overridden by the environment variableRMT. remote girlie stays remote ๐ปโจ-F,--eot-script scriptโ runscriptat 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 return0ifdumpshould continue without asking the user to change the tape, or1ifdumpshould continue but ask the user to change the tape. any other exit code will causedumpto abort ๐ญ. and for security reasons,dumpreverts 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 flagUF_NODUMPonly for dumps at or above the givenlevel. 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,dumpwill 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 runningdumpon an active filesystem where read errors simply indicate an inconsistency between the mapping and dumping passes. and a value of0means 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 ofrestorein order to extract compressed tapes. tapes written using compression will not be compatible with the BSD tape format. the (optional) parameter specifies the compressionlevelbzlib 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 whendumpwas compiled.) so like, ask your distro if she's got it ๐-L,--label labelโ the user-supplied text stringlabelis placed into the dump header, where tools likerestore(8)andfile(8)can access it. note that this label is limited to be at mostLBLSIZE(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,dumpwill optimise the output for inodes that have been changed but not modified since the last dump ('changed' and 'modified' have the meaning defined instat(2)). for those inodes,dumpwill 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 usingdump -mif 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-fis treated as a prefix, anddumpwrites 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โ wheneverdumprequires operator attention, she notifies all operators in the group operator by means similar to awall(1). group chat announcement, basically ๐ฃ๐-q,--abort-on-interventionโ makedumpabort 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 filefile, andrestoreuses that (when you call it with parameter-Qand 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,dumpprompts 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 givendateas the starting time for the dump instead of the time it works out from looking in/var/lib/dumpdatesโฐ The format ofdateis the same as that ofctime(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:-0800for eight hours west of Greenwich, or+0230for 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-Toption is mutually exclusive from the-uoption ๐ซ--dumpdates-time dateโ use the specifieddateas 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/dumpdatesafter a successful dump ๐๏ธ The format of/var/lib/dumpdatesis human-readable, one record per line. Each line holds, separated by spaces, a filesystem identifier, dump increment level and dump date inctime(3)format followed by an rfc822 timezone specification (see the-Toption 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/dumpdatesafter a successful dump instead of whatever parameter was passed todump. This makesdumprevert 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/dumpdateswhen using this flag ๐ฌ-v,--verboseโ the-v(verbose) option causesdumpto print extra information which could be helpful in debug sessions ๐-W,--print-all-dump-statsโdumptells the operator what file systems need to be dumped. This information is gleaned from the files/var/lib/dumpdatesand/etc/fstab. The-Woption causesdumpto print out, for all file systems in/var/lib/dumpdates, and recognized file systems in/etc/mtaband/etc/fstab, the most recent dump date and level, and highlights those that should be dumped. If the-Woption is set, all other options are ignored, anddumpexits immediately ๐-w,--print-dump-statsโ is like-W, but prints only recognized filesystems in/etc/mtaband/etc/fstabwhich 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 ofrestorein 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 ofrestorein 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 filesysdescriptioninstead of "an unlisted file system" for dumping a filesystem that is not listed in/etc/mtabor/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-foption was specified,dumpwill use the device specified viaTAPEas the dump device.TAPEmay be of the formtapename,host:tapename, oruser@host:tapename.RMTโ the environment variableRMTwill be used to determine the pathname of the remotermt(8)program.RSHโdumpuses the contents of this variable to determine the name of the remote shell command to use when doing remote backups (rsh,sshetc.). 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 groupoperator
โจ SEE ALSO โจ
๐ฉบ 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
dumpcan 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 fromdumpand look for lines that contain the text'read error'. ๐ - When a read error occurs,
dumpprints 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 usedebugfs(8), commandsncheckandicheck, to translate the ext2blk number printed out bydumpinto 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
dumpknew 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 runningrestore. Until then: we dream. ๐ญ dumpcannot 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 setRSHto 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
- ubuntu stonking: dump 0.4b55-3 ยท BSD-3-Clause
- Copyright (c) 1980, 1991, 1993 Regents of the University of California
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms