Skip to content
_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN DE
Let's talk

rsync and Backup Strategies

06. 01. 2026 Updated: 27. 03. 2026 1 min read intermediate

rsync transfers only the changed parts of files using a delta algorithm, which dramatically reduces the volume of data transferred during repeated backups. Compared to simple cp or scp, it saves both time and bandwidth by comparing block checksums and transferring only differences. It forms the foundation of most backup strategies on Linux.

Basics

rsync -avz /src/ user@server:/dest/
# -a archive (recursive, preserves permissions, timestamps, symlinks)
# -v verbose, -z compression during transfer
# --delete removes files in destination not present in source

Important: the trailing slash on the source directory determines whether the directory contents or the directory itself is copied. /src/ copies the contents, /src copies the entire directory into the destination.

Incremental Backups

#!/bin/bash
DATE=$(date +%Y-%m-%d)
rsync -av --delete --link-dest=/backups/latest /data/ /backups/$DATE/
ln -sf /backups/$DATE /backups/latest

The --link-dest parameter creates hardlinks to unchanged files from the reference backup. Each backup appears as a complete copy, but unchanged files consume zero extra disk space. This technique allows keeping 30 daily backups with minimal overhead, since only actual changes are stored.

Alternatives

  • restic — deduplication, encryption, cloud backend support (S3, B2, Azure)
  • borg — excellent compression and deduplication, encryption, mount backups as FS
  • rclone — synchronization with cloud storage (40+ providers)

Rotation and Retention

An effective backup strategy includes automatic rotation — daily backups for 7 days, weekly for a month, monthly for a year. A cron job combined with a find command for deleting old backups ensures disk space does not grow indefinitely.

3-2-1 Rule

3 copies of data, 2 different media, 1 offsite location. rsync is the foundation for local and remote backups. For production environments, combine it with restic or borg for encryption and deduplication.

rsyncbackupdisaster recovery
Share:

CORE SYSTEMS team

We build core systems and AI agents that keep operations running. 15 years of experience with enterprise IT.