BorgBackup gives you deduplication, encryption, and compression in a single tool. A full backup of a 20GB server might take 5 minutes the first time and 30 seconds every day after that because only changed blocks are stored.
Initialize a remote repository
borg init --encryption=repokey user@backup-server:/backups/myserver
Save the passphrase somewhere safe — without it the backup is unreadable.
Create a backup
borg create \
--compression lz4 \
--exclude /proc \
--exclude /sys \
--exclude /dev \
--exclude /run \
user@backup-server:/backups/myserver::$(date +%Y-%m-%d) \
/
Prune old backups
borg prune \
--keep-daily 7 \
--keep-weekly 4 \
--keep-monthly 6 \
user@backup-server:/backups/myserver
This keeps daily backups for a week, weekly for a month, and monthly for six months. Put both commands in a script and run it from cron or a systemd timer.
borg extract user@backup-server:/backups/myserver::2025-06-20 path/to/file