LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

rdiff-backup

Reverse differential backup with file history

TLDR

Backup a local directory to a local destination
$ rdiff-backup [source/] [backup/]
copy
Backup a local directory to a remote host over SSH
$ rdiff-backup [source/] [user@host::backup/]
copy
Restore the latest version from a backup
$ rdiff-backup -r now [backup/] [restore/]
copy
Restore files from a specific time ago
$ rdiff-backup -r [3D] [backup/] [restore/]
copy
List all backup increments and their dates
$ rdiff-backup --list-increments [backup/]
copy
Remove backup increments older than a given period
$ rdiff-backup --remove-older-than [2W] [backup/]
copy
Verify the integrity of a backup repository
$ rdiff-backup --verify [backup/]
copy
Backup excluding specific patterns
$ rdiff-backup --exclude '[**/*.tmp]' [source/] [backup/]
copy

SYNOPSIS

rdiff-backup [-r time] [options] source destination

DESCRIPTION

rdiff-backup creates incremental backups using reverse diffs. The destination mirrors current state while storing history.Each backup stores only differences from previous. Space-efficient for frequent backups.Restoration from any point in history is possible. Diffs are applied to reconstruct old states.Remote backup works over SSH. No special server needed, just rdiff-backup on both ends.Retention policies remove old increments. Balance history depth against storage.

PARAMETERS

-r, --restore-as-of TIME

Restore from time.
--list-increments
Show backup history.
--remove-older-than TIME
Delete old increments.
--verify
Verify backup integrity.
--include PATTERN
Include files.
--exclude PATTERN
Exclude files.
-v, --verbosity N
Verbosity level.
--force
Force operation, even if destination is not empty or increments are corrupt.
--print-statistics
Print file transfer statistics after backup.

TIME FORMATS

now - Current3D - 3 days ago2W - 2 weeks ago1M - 1 month ago2025-01-15 - Specific date2025-01-15T14:30:00 - Specific date and time

CAVEATS

Requires rdiff-backup installed on both local and remote machines for remote backups. The initial full backup can be large and time-consuming. Metadata changes (permissions, ownership) trigger incremental updates even if file contents are unchanged.

HISTORY

rdiff-backup combines rsync-style mirroring with reverse-diff versioning. It provides space-efficient incremental backup while maintaining easy restoration.

SEE ALSO

rsync(1), borgbackup(1), duplicity(1), restic(1), tar(1)

Copied to clipboard
Kai