Dump And Restore: 4 Essential Backup Strategies For Linux Guide

ST
Written by
Integrated MA, Certified Relationship Coach

In the world of Linux system administration, protecting data against loss is a top priority. Traditional tools like tar and cpio handle individual files effectively, but they fall short when it comes to comprehensive filesystem protection. Enter dump and restore—veteran utilities designed specifically for backing up entire filesystems with support for incremental updates. These tools have stood the test of time, offering efficiency and reliability for servers, workstations, and critical data stores.

This guide dives deep into leveraging dump and restore, from setup to advanced recovery scenarios. Whether you’re managing a single machine or a networked environment, understanding these utilities can streamline your backup processes and minimize downtime during restores.

Why Choose Dump Over Modern Alternatives?

Dump distinguishes itself by operating at the filesystem level rather than per-file. This approach captures not just data but also structural metadata, making it ideal for ext2, ext3, and ext4 filesystems—the most common in Linux distributions. Unlike rsync or tar, which require custom scripts for incrementals, dump natively supports multiple backup levels, from full (level 0) to fine-grained daily changes (level 9).

Key advantages include:

  • Efficiency in large-scale operations: Perfect for terabyte-scale servers where file-by-file copying would be prohibitively slow.
  • Incremental intelligence: Tracks changes since the last backup of the same or lower level, optimizing storage use.
  • Media spanning: Handles multi-tape or multi-volume backups seamlessly.
  • Network capabilities: Via rdump, it supports remote storage without additional setup.

While newer tools like Borg or restic offer deduplication, dump’s simplicity and integration with standard Linux kernels make it a go-to for many enterprise setups.

Installing Dump and Restore on Your Distribution

Not all Linux distros ship dump by default due to its specialized nature. Installation is straightforward via package managers.

DistributionPackage NameInstallation Command
Ubuntu/Debiandumpsudo apt update && sudo apt install dump
Red Hat/CentOS/RHEL/Fedoradumpsudo dnf install dump (Fedora) or sudo yum install dump (older)
SUSE/openSUSEdumpsudo zypper install dump
Arch Linuxdumpsudo pacman -S dump

After installation, verify with dump --version and restore --version. Ensure your target filesystems are unmounted or read-only during backups to avoid corruption.

Understanding Backup Levels and Strategies

Dump uses a numeric level system (0-9) to define backup scope:

  • Level 0: Complete filesystem dump—your baseline.
  • Level 1-9: Incremental; level N backs up changes since the most recent dump of level N-1 or lower.

A common strategy: Weekly level 0 on Sundays, daily level 9 on weekdays. This balances recovery time and storage. Dump logs progress in /var/lib/dumpdates (or /etc/dumpdates), which restore uses to reconstruct sequences.

Check pending backups with:

  • dump -W: Scans /etc/fstab and dumpdates for due filesystems.
  • dump -w: Limits to currently mounted filesystems.

Executing Full and Incremental Backups

The core syntax is dump [options] filesystems dumpfile. Essential options:

  • -0u: Level 0, update dumpdates.
  • -f file: Output to file (e.g., /backup/full.dump).
  • -A catfile: Create index catalog for faster restores.

Example: Full backup to local file

sudo dump -0u -f /mnt/backup/full-2026.dump -A /mnt/backup/full.cat /dev/sda1

Incremental example (level 9)

sudo dump -9u -f /mnt/backup/incr9-2026.dump /dev/sda1

Monitor output for ‘DUMP: Date of this level 0 dump’ and byte counts. Use -v for verbose logging.

Network Backups with Rdump

For distributed setups, rdump extends dump to remote hosts. Syntax: rdump -f user@host:/path dumpfile filesystem.

Setup prerequisites:

  1. Enable rdump service on target (often via xinetd or systemd).
  2. Ensure SSH or RSH access (SSH preferred for security).
  3. Create target directories: ssh user@backupserver 'mkdir -p /backups/server1'.

Example:

sudo rdump -0u -f backupuser@backupserver:/backups/full.dump /dev/sda1

This pipes data over the network, ideal for centralized backup servers.

Precise File Recovery with Restore

Restore reverses dump’s magic. Interactive mode (restore -i) lets you browse and extract selectively.

Basic commands:

  • restore -t -f backup.dump: List contents.
  • restore -i -f backup.dump: Interactive shell (ls, cd, add, extract).
  • restore -r -f backup.dump: Full filesystem restore (mountpoint required).

For multi-volume dumps, respond to prompts with ‘mount next tape’ or specify with -f file1,file2.

Selective restore example:

sudo restore -i -f /mnt/backup/full.dump

Inside: ls to browse, add filename, extract to restore.

Advanced Tips for Production Use

  • Automation: Cron jobs: 0 2 * * 0 dump -0u -f /backup/weekly.%Y-%m-%d.dump /dev/sda1.
  • Compression: Pipe to gzip: dump ... | gzip > backup.dump.gz; ungzip before restore.
  • Verification: restore -t -f backup.dump | grep criticalfile.
  • Limits: No XFS/Btrfs support; use alternatives like xfsdump.

Common Pitfalls and Troubleshooting

IssueSolution
Incomplete dumpEnsure filesystem unmounted; check disk space.
Restore fails on labelsUse -N to ignore inode numbers.
Network rdump errorsVerify .rhosts or SSH keys; firewall ports.
Missing dumpdatesManually edit or use -u.

FAQ

Q: Can dump handle LVM snapshots?
A: Yes, dump from a snapshot device for consistency.

Q: Is dump secure for unencrypted backups?
A: No built-in encryption; use filesystem encryption or post-process with gpg.

Q: How does restore handle multi-level restores?
A: restore -r prompts for all levels in sequence based on dumpdates.

Q: Alternatives for non-ext filesystems?
A: xfsdump for XFS, ZFS send/receive for ZFS.

Q: Does dump support USB drives?
A: Yes, via -f /dev/sdb; format as needed.

References

References

  1. Linux man page: dump(8) — Linux Programmer’s Manual. 2024-01-15. https://man7.org/linux/man-pages/man8/dump.8.html
  2. Linux man page: restore(8) — Linux Programmer’s Manual. 2024-01-15. https://man7.org/linux/man-pages/man8/restore.8.html
  3. Ubuntu Manpages: dump — Ubuntu Documentation. 2025-03-20. https://manpages.ubuntu.com/manpages/noble/man8/dump.8.html
  4. Red Hat Enterprise Linux 9: Filesystem Backup — Red Hat Documentation. 2025-05-01. https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/managing_file_systems/assembly_backing-up-and-restoring-file-systems_managing-file-systems
  5. Linode Docs: Linux Dump and Restore Commands — Linode. 2024-11-10. https://www.linode.com/docs/guides/linux-dump-and-restore-commands/
‹›