dump command in Linux is used for backup the filesystem to some storage device. It backs up the complete file system and not the individual files. In other words, it backups the required files to tape, disk or any other storage device for safe storage. The dump command in Linux works only with ext2/ext3 filesystem and not with others like FAT and ReiserFS. One special feature of dump is that it allows incremental backups. Incremental backups mean that the user can set up a backup plan according to which the file systems will be backed up weekly or only those files will be backed up which have been changed or added recently.
dump [-level#] [-a autosize] [-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]
dump command without any options: It prints the general syntax of the command along with the various options that can be used with the dump command. It also prints the version number of the dump command being used.
- -level # : The dump level which is an integer ranging from 0-9. If the user has asked to perform a full backup or a backup of only those new files added after the last dump of a lower level.
- – f file : This specifies the file where the backup will be written to. The file can be a tape drive, a floppy disk, ordinary file or standard output.
- -u : This records and updates the backup in /etc/dumpdates file.
sudo dump 0uf /dev/qft0 /dev/sda6
- -B records : It displays the number of dump records per volumes. In other words, it shows the amount of data that can fit in the tape. This is not always required as DUMP can detect the end of media or storage. This takes a numerical value and is used in combination with -b (mentioned below).
- -b blocksize : The block size specifies the number of kilobytes per dump record. The default value of block size is 10. Notice here how in the 4th line of DUMP the block size is 20 instead of 10.
sudo dump 0uBbf /dev/qft0 /dev/sda6
- -W : Lists the file systems that need to be backed up.
- -a : ‘a’ stands for ‘auto-size’. This is useful because it helps us bypass all tape length calculations and works best when we have to append to an existing disk.
sudo dump 0uaf /dev/qft0 /dev/sda9
- -z compression level : Compresses every block to be written on to the tape using the zlib library. The default compression level is 2.
sudo dump 0ufz /dev/qft0 /dev/sda6
- S : Estimates the size even before doing it. The output is the estimated number of bytes the dump will take. It is helpful in case of incremental dumps in order to determine how many volumes of media will be used.
sudo dump S /dev/sda6
- -I nr errors : The dump by defualt ignores first 32 read errors. This value can be manually changed to any value according to the user choice.
sudo dump 0ufI20 /dev/qft0 /dev/sda9
Some other options(which are less frequently used):
- – A archieve_file : Archieves a dump table-of-contents into the specified archieve_file.
- -d density : This sets the tape density . It takes a numerical argument and its default value is 1600 bits per inch.
- -n : When there is some change to the tape or there are some other changes, the dump sends a message to the user. This option takes no argument.
- -s feet : This specifies the length of dump tape in feet. This takes a numerical argument.
- -t date : This specifies a date and time entry according to which the incremental backups take place. Any modification or addition after the specified time will be backed up.
- seq command in Linux with Examples
- more command in Linux with Examples
- tac command in Linux with Examples
- tty command in Linux with examples
- apt command in linux with examples
- ex command in Linux with examples
- if command in linux with examples
- cc command in Linux with Examples
- cpp command in Linux with Examples
- env command in Linux with Examples
- df Command in Linux with examples
- ZIP command in Linux with examples
- tee command in Linux with examples
- ed command in Linux with examples
- gcc command in Linux with examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.