dump

system managementLinux
The dump command is one of the most frequently used commands in Linux/Unix-like operating systems. dump Backup utility for ext2/3/4 filesystems

Quick Reference

Command Name:

dump

Category:

system management

Platform:

Linux

Basic Usage:

dump [options] [arguments]

Common Use Cases

  • 1

    Full system backups

    Create complete backups of entire filesystems for disaster recovery

  • 2

    Incremental backups

    Perform regular incremental backups to minimize backup size and time

  • 3

    Tape archive management

    Back up filesystems to tape devices for long-term storage

  • 4

    Selective backups

    Back up specific directories or files while preserving permissions and attributes

Syntax

dump [-level] [-flags] filesystem [files-to-dump]

Options

Option Description
-level Dump level (0-9), where 0 is a full backup and 1-9 are incremental
-a Auto-size the output to fit on the backup medium
-B size Set the block size for the dump
-b size Set the block size in kilobytes
-f file Write the backup to file instead of tape
-h level Honor the user nodump flag only for dumps at or above level
-j Compress the output using bzip2
-u Update the dump record file /etc/dumpdates
-W List filesystems that need backing up
-w List filesystems that need backing up

Examples

How to Use These Examples

The examples below show common ways to use the dump command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.

# Basic Examples Basic
dump -0uf /dev/st0 /dev/sda1
Create a full backup (level 0) of the filesystem /dev/sda1 to tape device /dev/st0.
dump -0f backup.dump /home
Create a full backup of the /home directory to the file backup.dump.
# Advanced Examples Advanced
dump -1uf /dev/st0 -B 1048576 /dev/sda1 Create an incremental level 1 backup with a 1MB block size. dump -W Display which filesystems need to be backed up according to /etc/fstab. dump -0j -b 64 -f backup.bz2 /home Create a full backup of /home compressed with bzip2 using 64KB blocks. dump -2uf /dev/st0 /dev/sda1 /home/user/important Create a level 2 incremental backup, but only include the specified directory.

Try It Yourself

Practice makes perfect! The best way to learn is by trying these examples on your own system with real files.

Understanding Syntax

Pay attention to the syntax coloring: commands, options, and file paths are highlighted differently.

Notes

The dump utility examines files on an ext2/3/4 filesystem and determines which files need to be backed up. These files are copied to the given disk, tape, or other storage medium for safe keeping. A dump that is larger than the output medium is automatically split into multiple volumes. Volumes other than the first contain a small header with the dump command that created it. The dump command requires root privileges to run in most cases. Restore is the complementary command to dump for restoring from backups.

Tips & Tricks

1

Use level 0 for full backups and levels 1-9 for incremental backups

2

Use the -B option to set a specific block size for better performance

3

Use the -j option to compress the backup with bzip2

4

Use the -W option to check which filesystems need backing up

5

Use the -u option to update /etc/dumpdates when creating backups

Common Use Cases

Full system backups

Create complete backups of entire filesystems for disaster recovery

Incremental backups

Perform regular incremental backups to minimize backup size and time

Tape archive management

Back up filesystems to tape devices for long-term storage

Selective backups

Back up specific directories or files while preserving permissions and attributes

Backup scheduling

Automate regular backups based on filesystem usage patterns

Related Commands

These commands are frequently used alongside dump or serve similar purposes:

Use Cases

1

Full system backups

Create complete backups of entire filesystems for disaster recovery

2

Incremental backups

Perform regular incremental backups to minimize backup size and time

3

Tape archive management

Back up filesystems to tape devices for long-term storage

4

Selective backups

Back up specific directories or files while preserving permissions and attributes

5

Backup scheduling

Automate regular backups based on filesystem usage patterns

Learn By Doing

The best way to learn Linux commands is by practicing. Try out these examples in your terminal to build muscle memory and understand how the dump command works in different scenarios.

$ dump
View All Commands