
rdump Command in Linux
The rdump command in Linux is used for creating backups of file systems. It is a part of the dump utility, which is designed to back up entire file systems to a storage device or a file.
The rdump command is specifically used for remote backups, allowing you to back up file systems to a remote host over the network. This command is particularly useful for system administrators who need to perform regular backups of critical data across multiple systems.
Table of Contents
Here is a comprehensive guide to the options available with the rdump command â
Understanding rdump Command
It operates similarly to the dump command but allows for backing up data to a remote machine over a network. The rdump command uses the Remote Shell (rsh) protocol to transfer data, which means it requires the rsh service to be running on both the source and destination machines. However, due to security concerns with rsh, it is often recommended to use more secure alternatives like rsync or scp for remote backups.
The rdump command in Linux is a legacy tool used for remote backups. It's part of the dump family, which includes commands like dump and restore for local backups
sudo apt install dump

The rdump command supports different dump levels, which determine the type of backup to be performed −
- Level 0 − A full backup of the entire file system.
- Levels 1-9 − Incremental backups that only include files that have changed since the last backup of a lower level.
For example, a level 1 backup includes all files that have changed since the last level 0 backup, while a level 2 backup includes all files that have changed since the last level 1 backup, and so on.
Syntax of rdump Command
The basic syntax of the rdump command is as follows −
rdump [options] [arguments]
- options − Various options to control the behavior of the rdump command.
- arguments − The file system to be backed up and the destination.
Basic Usage
The general syntax of rdump is −
rdump -level -f remote_host:device filesystem
- -level − Specifies the backup level (0-9), with 0 being a full backup and higher levels incrementally backing up only changed files.
- -f remote_host:device − Specifies the remote host and the device or file where the backup will be stored.
- filesystem − Specifies the filesystem to be backed up.
How to Use rdump Command in Linux?
The rdump command in Linux is used for remote backups of file systems. rdump relies on the rsh protocol for remote access, which has security vulnerabilities and is generally discouraged in modern environments.
rdump

Full Backup of /home to a Remote Machine
This command performs a full backup of the /home filesystem to the rmt0 device on the remote_server.
rdump -0 -f remote_server:/dev/rmt0 /home

Incremental Backup of /usr to a Remote Machine
This command performs an incremental backup of the /usr filesystem, only backing up files that have changed since the last level 0 or level 1 backup.
rdump -1 -f remote_server:/dev/rmt0 /usr

Listing Filesystems Needing Backup
This command lists the filesystems that need to be backed up based on the dumpdates file.
rdump -W

Example with -u Option
The -u option updates the dumpdates file with the backup information. This is important for incremental backups to track which files have changed.
rdump -1 -u -f remote_server:/dev/rmt0 /usr

This command performs an incremental backup of /usr and updates the dumpdates file accordingly.
Remember: Always prioritize security when performing backups. Use secure methods like ssh and tools like rsync or scp for remote backups.
Creating a Full Backup to a Remote Host
To create a full backup of a file system and store it on a remote host, you can use the following command −
rdump 0uf user@remotehost:/path/to/backup/file /dev/sda1
For example, to create a full backup of the /home file system and store it on a remote host named backupserver, you would use −
rdump 0uf user@backupserver:/backups/home.bak /home

Creating an Incremental Backup to a Remote Host
To create an incremental backup of a file system and store it on a remote host, you can use the following command −
rdump 1uf user@remotehost:/path/to/backup/file /dev/sda1
For example, to create an incremental backup of the /home file system and store it on a remote host named backupserver, you would use −
rdump 1uf user@backupserver:/backups/home.bak /home

Specifying Block Size for the Backup
To specify the block size for the backup, you can use the -b option −
rdump 0ubf 64 user@remotehost:/path/to/backup/file /dev/sda1
For example, to create a full backup of the /home file system with a block size of 64 and store it on a remote host named backupserver, you would use −
rdump 0ubf 64 user@backupserver:/backups/home.bak /home

Displaying File Systems that Need to be Backed Up
To display the file systems that need to be backed up, you can use the -W option −
rdump -W

This command will display a list of file systems that need to be backed up.
Displaying File Systems that Need to be Backed Up and Waiting for Confirmation
To display the file systems that need to be backed up and wait for confirmation, you can use the -w option −
rdump -w

This command will display a list of file systems that need to be backed up and wait for confirmation before proceeding.
Authentication
The rdump command relies on the rsh protocol for authentication. This means that the remote host must be configured to allow rsh connections from the local host. This is typically done by adding the local host's name to the .rhosts file in the remote user's home directory. For example −
echo "localhost.localdomain user" >> ~/.rhosts

This line allows the user user on the local host localhost.localdomain to connect to the remote host without a password.
Error Handling
When using the rdump command, you may encounter various errors. Here are some common ones and how to handle them −
Permission denied − Ensure rsh is configured correctly and .rhosts file exists.
Conclusion
The rdump command is a useful tool for creating remote backups of file systems. By understanding the syntax, options, and common use cases of the rdump command, you can effectively use it to manage backups across different hosts. However, due to its lack of security, it is recommended to use more secure alternatives like rsync over SSH for remote backups.
The rdump command, like other rsh-based commands, is not secure because it transmits data, including passwords, in plain text. This makes it vulnerable to eavesdropping and man-in-the-middle attacks.