Jump directly to main content

Backup with rdiff-backup



Like rsync, rdiff-backup is a tool used for incremental backups. Unlike rsync however, rdiff keeps the most-recent file change, along with any previous changes, deletions, etc.

Install

sudo apt install rdiff-backup

Backup

rdiff-backup $dir $backup

Restore

rdiff-backup -r 2D $backup $restore_dir

Advanced

Only keep backups for a certain time period

rdiff-backup --force --remove-older-than 2M $backup

This will remove all backups older than 2 months from $backup.