How to Use rsync for Incremental Backups

How to Use rsync for Incremental Backups
SPONSORED

Sponsor message — This article is made possible by Dargslan.com, a publisher of practical, no-fluff IT & developer workbooks.

Why Dargslan.com?

If you prefer doing over endless theory, Dargslan’s titles are built for you. Every workbook focuses on skills you can apply the same day—server hardening, Linux one-liners, PowerShell for admins, Python automation, cloud basics, and more.


Understanding the Critical Role of Incremental Backups in Modern Data Management

Data loss represents one of the most devastating experiences for individuals and organizations alike. Whether caused by hardware failure, accidental deletion, ransomware attacks, or natural disasters, losing critical information can result in financial losses, operational disruptions, and irreparable damage to reputation. In today's digital landscape, where data grows exponentially and storage costs continue to be a consideration, implementing an efficient backup strategy isn't just recommended—it's absolutely essential for survival.

Incremental backups using rsync offer a powerful solution that combines efficiency, reliability, and flexibility. Unlike full backups that copy every file regardless of changes, incremental approaches only transfer modified or new data, dramatically reducing storage requirements and backup times. This methodology represents a middle ground between comprehensive data protection and practical resource management, making it accessible for home users managing family photos and enterprise administrators safeguarding terabytes of business-critical information.

Throughout this comprehensive guide, you'll discover how to leverage rsync's capabilities to create robust incremental backup systems. We'll explore the fundamental concepts behind rsync's operation, walk through practical implementation strategies, examine advanced techniques for optimization, and address common challenges you might encounter. By the end, you'll possess the knowledge to design and deploy backup solutions tailored to your specific needs, ensuring your valuable data remains protected without overwhelming your infrastructure.

The Fundamental Architecture of rsync and Incremental Backups

Before diving into implementation details, understanding how rsync operates provides crucial context for making informed decisions about your backup strategy. The rsync utility, short for "remote synchronization," was designed specifically to efficiently transfer and synchronize files between different locations. Its brilliance lies in the delta-transfer algorithm, which identifies differences between source and destination files, transmitting only the changed portions rather than entire files.

When configured for incremental backups, rsync examines each file's metadata—including modification time, size, and optionally checksums—to determine whether changes have occurred since the last backup. This intelligent comparison process means that after your initial full backup, subsequent operations transfer significantly less data. For organizations with large datasets where only a small percentage changes daily, this approach can reduce backup windows from hours to minutes.

"The efficiency of incremental backups isn't just about saving storage space—it's about making backups so fast and painless that you actually perform them regularly, which is the only backup strategy that truly matters."

Core Concepts Behind Effective Incremental Strategies

Implementing incremental backups requires understanding several foundational concepts that influence how you structure your backup architecture. The relationship between full backups, incremental backups, and differential backups creates different trade-offs in terms of storage efficiency, restoration complexity, and operational overhead.

A full backup captures every file in your source directory, creating a complete snapshot at a specific point in time. This serves as your baseline and the foundation upon which incremental backups build. Incremental backups then capture only files that have changed since the last backup of any type, creating a chain of dependencies. Differential backups, by contrast, always reference the last full backup, capturing everything that has changed since that baseline.

With rsync, you can implement various incremental strategies, but the most popular approach involves creating a series of backup snapshots where each new backup references the previous one through hard links. This technique, often called "snapshot-style" backups, provides the appearance of multiple full backups while consuming storage space equivalent to one full backup plus the actual changes between versions.

Preparing Your Environment for rsync Backup Operations

Successful backup implementation begins with proper preparation. Your environment setup determines not only the effectiveness of your backups but also their reliability and ease of management. This preparation phase involves verifying rsync availability, establishing appropriate permissions, and structuring your storage destinations.

Most Linux and Unix-based systems include rsync by default, but Windows users will need to install it through WSL (Windows Subsystem for Linux), Cygwin, or similar compatibility layers. Verifying your rsync version ensures you have access to necessary features, particularly if you plan to use advanced options. Running rsync --version in your terminal provides this information and confirms proper installation.

Establishing Directory Structures and Permissions

Organizing your backup destination thoughtfully prevents confusion and simplifies management as your backup history grows. A recommended structure separates different backup sources and maintains clear naming conventions that indicate backup dates and types. Creating a dedicated backup user with appropriate permissions enhances security by limiting access to backup operations only.

Your source directories require read permissions for the backup user, while destination directories need write permissions. For system-level backups, you'll typically need root or sudo access to read all files, but consider security implications carefully. Running backups with minimum necessary privileges follows the principle of least privilege and reduces potential damage from compromised backup scripts.

Permission Requirement Source Directory Destination Directory Purpose
Read Access ✓ Required ✓ Required Allows rsync to read files and compare with existing backups
Write Access ✗ Not needed ✓ Required Enables creation and modification of backup files
Execute Access ✓ Required ✓ Required Permits directory traversal during backup operations
Ownership Varies Backup user Ensures consistent access and management capabilities

Essential rsync Command Options for Backup Operations

The power of rsync lies in its extensive option set, allowing fine-tuned control over exactly how files are transferred and synchronized. Understanding key options transforms rsync from a simple file copying tool into a sophisticated backup engine. While the number of available options might seem overwhelming initially, focusing on core backup-related flags provides a solid foundation.

The most commonly used option combination for backups is -avz, which actually represents three separate flags bundled together for convenience. The -a flag enables archive mode, preserving permissions, timestamps, symbolic links, and other important file attributes. The -v flag activates verbose output, showing which files are being transferred. The -z flag enables compression during transfer, reducing bandwidth usage when backing up over networks.

Critical Options for Incremental Backup Scenarios

Beyond basic options, several flags specifically enhance incremental backup operations. The --delete option removes files from the destination that no longer exist in the source, maintaining exact synchronization. However, use this carefully with backups, as it can eliminate files you might want to retain from previous versions.

The --link-dest option represents the cornerstone of efficient snapshot-style incremental backups. It instructs rsync to create hard links to unchanged files in a previous backup directory rather than copying them again. This approach provides multiple complete backup snapshots while consuming minimal additional storage for unchanged files.

  • 📁 --archive (-a): Preserves permissions, timestamps, symbolic links, and recursively copies directories
  • 🔗 --link-dest: Creates hard links to unchanged files from a reference directory
  • 🗑️ --delete: Removes files from destination that don't exist in source
  • 📊 --stats: Displays detailed transfer statistics after completion
  • 🔍 --dry-run (-n): Simulates the operation without making actual changes
"The difference between a backup system that gets used and one that gets abandoned often comes down to how well the commands are documented and how easily they can be executed without deep technical knowledge."

Implementing Your First Basic Incremental Backup

With foundational knowledge established, creating your first incremental backup involves constructing an appropriate rsync command and testing it thoroughly. Starting with a simple scenario helps build confidence before adding complexity. Consider backing up a home directory to an external drive as an ideal learning exercise.

A basic incremental backup command might look like this: rsync -avz --delete /home/username/ /mnt/backup/current/. This command synchronizes your home directory to a backup location, preserving attributes, showing progress, compressing data, and removing files from the backup that no longer exist in the source. The trailing slashes on directory paths matter significantly—they determine whether the directory itself or its contents are copied.

To implement true incremental backups with multiple versions, you'll use the --link-dest option to reference previous backups. This approach requires organizing backups into dated directories and maintaining a reference to the most recent successful backup. The process involves creating a new backup directory, running rsync with a link to the previous backup, and updating your reference to the latest backup.

A practical implementation creates directories named with timestamps, such as backup-2024-01-15, making it easy to identify and manage different versions. Your rsync command then becomes: rsync -avz --delete --link-dest=/mnt/backup/backup-2024-01-14 /home/username/ /mnt/backup/backup-2024-01-15/. Files unchanged since the previous backup become hard links rather than duplicate copies, dramatically reducing storage consumption.

#!/bin/bash
# Basic incremental backup script

SOURCE="/home/username/"
BACKUP_ROOT="/mnt/backup"
DATE=$(date +%Y-%m-%d-%H%M%S)
LATEST="${BACKUP_ROOT}/latest"
BACKUP_DIR="${BACKUP_ROOT}/backup-${DATE}"

# Create backup directory
mkdir -p "${BACKUP_DIR}"

# Perform backup with link to previous version
if [ -d "${LATEST}" ]; then
    rsync -avz --delete --link-dest="${LATEST}" "${SOURCE}" "${BACKUP_DIR}/"
else
    rsync -avz --delete "${SOURCE}" "${BACKUP_DIR}/"
fi

# Update latest symlink
rm -f "${LATEST}"
ln -s "${BACKUP_DIR}" "${LATEST}"

echo "Backup completed to ${BACKUP_DIR}"

Advanced Techniques for Production Backup Systems

Moving beyond basic implementations, production backup systems require additional considerations around reliability, monitoring, error handling, and retention policies. These advanced techniques transform simple backup scripts into robust data protection solutions capable of running unattended in critical environments.

Error handling becomes paramount when backups run automatically via cron jobs or schedulers. Your scripts should capture rsync's exit codes, log both successes and failures, and potentially send notifications when problems occur. Rsync returns different exit codes depending on what happened—0 for success, various non-zero values for different error conditions—allowing your scripts to respond appropriately.

Implementing Intelligent Retention Policies

Storage constraints necessitate retention policies that balance protection depth with available space. A common approach maintains daily backups for a week, weekly backups for a month, and monthly backups for a year. Implementing this requires logic to identify which backups to keep and which to remove based on their age and relationship to your retention schedule.

Rather than deleting old backups immediately, consider moving them to an archive location or marking them for deferred deletion. This provides a safety buffer against retention policy errors that might accidentally remove important historical data. Some administrators implement a two-stage deletion process where backups are first moved to a "pending deletion" directory and only permanently removed after a grace period.

Retention Period Frequency Typical Count Storage Multiplier
Daily Every day 7 backups 1.5x - 2x source size
Weekly Every Sunday 4 backups 0.5x - 1x source size
Monthly First of month 12 backups 1x - 1.5x source size
Yearly January 1st 3-5 backups 0.5x - 1x source size

Optimizing Performance for Large Datasets

When backing up large datasets, performance optimization becomes critical for maintaining reasonable backup windows. Several rsync options and system-level considerations can significantly impact transfer speeds and resource utilization. Understanding these factors allows you to tune your backup operations for your specific environment.

The --inplace option updates files directly rather than creating temporary copies, reducing I/O operations and space requirements during backups. However, this trades safety for speed—if a transfer fails midway, the file may be left in a corrupted state. For backup scenarios where destination files are not actively used, this trade-off often makes sense.

Network bandwidth limitations often constrain remote backups. While rsync's compression helps, you can further optimize by excluding unnecessary files through --exclude patterns. Temporary files, cache directories, and other non-essential data can be safely omitted from backups, reducing both transfer time and storage consumption.

"Performance optimization isn't about making backups run as fast as possible—it's about making them fast enough to complete within your available backup window while maintaining data integrity and system stability."

Securing Your Backup Operations

Security considerations permeate every aspect of backup operations, from initial transfer to long-term storage. Backups contain copies of your most sensitive data, making them attractive targets for attackers. Implementing appropriate security measures protects both the backup process itself and the backed-up data at rest.

When performing remote backups over networks, always use SSH for transport rather than rsync's native protocol or unencrypted methods. SSH provides authentication and encryption, preventing eavesdropping and tampering during transfer. The syntax changes slightly: rsync -avz -e ssh /source/ user@remote:/destination/. Setting up SSH key-based authentication eliminates password prompts, enabling automated backups while maintaining security.

Protecting Backups from Ransomware and Unauthorized Access

Modern ransomware specifically targets backup systems, attempting to encrypt or delete backups before attacking primary data. Protecting against this threat requires implementing defense-in-depth strategies that assume attackers may gain access to systems running backup operations. Immutable backups, where files cannot be modified or deleted after creation, provide strong protection but require specialized storage systems or cloud services.

For local backups, storing backup media offline or in append-only mode prevents remote attackers from reaching them. Some administrators rotate external drives, keeping previous backups physically disconnected except during backup operations. This "air gap" approach provides robust protection but requires discipline and careful tracking to avoid gaps in backup coverage.

Encryption protects backup data at rest, ensuring that even if backup media is stolen or improperly disposed of, the data remains inaccessible. While rsync doesn't provide built-in encryption for stored data, you can encrypt the destination filesystem using LUKS, VeraCrypt, or similar tools. Alternatively, encrypt individual files before backing them up, though this prevents rsync from efficiently detecting changes within encrypted containers.

Monitoring and Verifying Backup Integrity

Creating backups represents only half of an effective backup strategy—verifying that backups can actually be restored when needed completes the picture. Many organizations discover backup failures only when attempting recovery during emergencies, a scenario that transforms a bad situation into a catastrophic one. Regular verification and testing prevent this nightmare scenario.

Rsync provides several options for verification. The --checksum flag forces rsync to verify files using checksums rather than relying on modification times and sizes. While slower, this provides stronger assurance that files match exactly. The --dry-run option combined with --itemize-changes allows you to preview what would be transferred without actually modifying anything, useful for validating backup configurations.

Establishing Comprehensive Monitoring Systems

Automated monitoring detects backup failures before they become critical problems. Your monitoring system should track several key metrics: backup completion status, duration, amount of data transferred, error messages, and storage capacity. Deviations from normal patterns often indicate developing problems that require investigation.

Simple monitoring can be implemented by having backup scripts write status information to log files and checking those logs regularly. More sophisticated approaches integrate with monitoring systems like Nagios, Zabbix, or Prometheus, generating alerts when backups fail or exhibit unusual behavior. Cloud-based monitoring services provide additional reliability by detecting when backup systems themselves fail or become unreachable.

  • Completion Status: Did the backup finish successfully or encounter errors?
  • ⏱️ Duration Tracking: How long did the backup take compared to historical averages?
  • 📦 Data Volume: How much data was transferred and does it match expectations?
  • 💾 Storage Capacity: Is backup storage approaching capacity limits?
  • 🔔 Alert Configuration: Are appropriate parties notified of backup issues?
"The most dangerous backup is the one you assume is working but haven't actually tested. Regular restoration drills should be as routine as the backups themselves."

Troubleshooting Common rsync Backup Issues

Even well-designed backup systems encounter problems. Understanding common issues and their solutions reduces downtime and prevents data loss. Many rsync problems stem from permissions issues, network interruptions, or filesystem limitations that manifest as cryptic error messages.

Permission denied errors typically indicate that the user running rsync lacks necessary access to source or destination files. Running rsync with sudo provides elevated privileges but introduces security considerations. A better approach often involves adjusting file permissions or running rsync as a user with appropriate access. For system backups requiring root access, carefully audit what files actually need those privileges versus what can be backed up with normal user permissions.

Resolving Network and Transfer Interruptions

Network-based backups face additional challenges from connection instability. Rsync handles interruptions gracefully when properly configured, resuming transfers from where they stopped rather than starting over. The --partial option keeps partially transferred files, allowing subsequent runs to complete them. The --timeout option prevents rsync from hanging indefinitely on stalled connections.

For extremely large transfers over unreliable networks, consider using --bwlimit to throttle transfer speeds, paradoxically improving reliability by reducing network congestion and the likelihood of connection drops. Breaking large backup operations into smaller chunks—backing up different subdirectories separately—also improves reliability by reducing the impact of individual transfer failures.

Filesystem limitations sometimes prevent rsync from accurately preserving file attributes. Extended attributes, ACLs, and special file types may not transfer correctly between different filesystem types. The --xattrs option attempts to preserve extended attributes, while --acls handles access control lists. However, backing up from Linux to FAT32 or NTFS filesystems will inevitably lose some metadata due to fundamental filesystem differences.

Automating Backups with Cron and Systemd

Manual backups fail because humans forget, get busy, or postpone them "just this once." Automation removes human fallibility from the equation, ensuring backups occur consistently according to schedule. Linux provides several automation mechanisms, with cron and systemd timers being the most common choices.

Cron excels at simple, time-based scheduling. Creating a crontab entry that runs your backup script daily at 2 AM looks like: 0 2 * * * /usr/local/bin/backup-script.sh. The cron syntax, while cryptic initially, provides flexible scheduling including specific days, months, or intervals. For user-specific backups, user crontabs work well, while system-wide backups typically use the root crontab or system cron directories.

Leveraging Systemd for Modern Backup Scheduling

Systemd timers offer advantages over traditional cron for backup scheduling, including better logging integration, dependency management, and the ability to trigger backups based on system events rather than just time. Creating a systemd timer involves defining both a service unit that performs the backup and a timer unit that schedules it.

Systemd's randomized delay feature helps prevent multiple systems from starting backups simultaneously, avoiding network congestion when backing up many machines to a central server. The RandomizedDelaySec directive spreads backup start times across a specified window, naturally load-balancing backup operations.

# /etc/systemd/system/backup.service
[Unit]
Description=Incremental Backup Service
After=network.target

[Service]
Type=oneshot
ExecStart=/usr/local/bin/backup-script.sh
User=backup
Group=backup

# /etc/systemd/system/backup.timer
[Unit]
Description=Daily Backup Timer
Requires=backup.service

[Timer]
OnCalendar=daily
RandomizedDelaySec=1h
Persistent=true

[Install]
WantedBy=timers.target

Designing Multi-Destination Backup Strategies

The 3-2-1 backup rule recommends maintaining three copies of data, on two different media types, with one copy offsite. Implementing this with rsync involves orchestrating backups to multiple destinations, each serving different purposes in your overall data protection strategy. Local backups provide fast recovery for common scenarios, while remote backups protect against site-wide disasters.

Your backup script can execute multiple rsync commands targeting different destinations—a local disk, a NAS device, and a cloud storage service, for example. Each destination might use different retention policies and optimization strategies based on its characteristics. Local backups might retain numerous daily versions for quick recovery of recently deleted files, while remote backups keep fewer, longer-term snapshots focused on disaster recovery.

Implementing Cloud-Based Backup Destinations

Cloud storage services provide excellent offsite backup destinations, offering durability and accessibility without maintaining physical infrastructure. Many cloud providers support rsync-compatible protocols or provide tools that integrate with rsync workflows. Services like rsync.net specialize in providing rsync-accessible cloud storage specifically for backup purposes.

When backing up to cloud destinations, bandwidth becomes a critical consideration. Initial full backups may take days or weeks depending on data volume and connection speed. Planning for this involves potentially seeding initial backups using physical media shipment or performing initial uploads during low-usage periods. Subsequent incremental backups typically complete quickly, transferring only changed data.

"Redundancy in backups isn't paranoia—it's recognition that every backup method has failure modes, and protecting critical data requires defense in depth across multiple independent systems."

Restoring Data from Incremental Backups

Understanding restoration procedures proves just as important as creating backups. The snapshot-style incremental backup approach using hard links provides a significant advantage here—each backup directory appears as a complete snapshot, allowing straightforward restoration by simply copying files from the desired backup version.

To restore a single file, identify which backup version contains the desired state and copy it back to the source location: rsync -av /mnt/backup/backup-2024-01-15/path/to/file /home/username/path/to/file. For full system restoration, reverse your backup command, treating the backup directory as the source and your system as the destination. Always test restoration procedures before emergencies occur, ensuring you understand the process and can execute it under pressure.

Selective Restoration and Point-in-Time Recovery

One advantage of maintaining multiple backup snapshots involves the ability to restore data from specific points in time. If a file was corrupted or deleted several days ago but you only noticed recently, you can examine multiple backup versions to find the last good copy. This capability proves invaluable when dealing with gradual data corruption or investigating when specific changes occurred.

Selective restoration allows recovering specific files or directories without restoring entire backups. This granularity speeds recovery and prevents overwriting current data unnecessarily. Using rsync's --include and --exclude options, you can precisely specify what to restore, even pulling specific files from deep within directory hierarchies.

Scaling Backup Operations for Enterprise Environments

Enterprise environments introduce additional complexity through scale, diversity of systems, compliance requirements, and organizational structures. Backing up hundreds or thousands of systems requires centralized management, standardized procedures, and robust reporting capabilities. While rsync remains useful at this scale, it typically integrates into larger backup frameworks rather than operating standalone.

Centralized backup servers receive backups from multiple clients, requiring careful capacity planning and network design. Pull-based architectures where the backup server initiates transfers provide better control and security than push-based approaches where clients initiate backups. This also simplifies firewall configurations and prevents clients from needing access to backup storage.

Implementing Parallel Backup Operations

Backing up multiple systems simultaneously requires orchestration to prevent overwhelming network or storage infrastructure. Staggering backup start times, limiting concurrent operations, and prioritizing critical systems ensures reliable completion within available backup windows. Tools like parallel, GNU Parallel, or custom scripting distribute backup operations across time and resources.

For individual large backups, rsync itself doesn't parallelize file transfers, processing files sequentially. However, you can achieve parallelization by running multiple rsync processes targeting different subdirectories simultaneously. This approach works best when backing up many small files where the overhead of managing multiple processes doesn't outweigh the benefits of parallel transfer.

Integrating Backup Operations with Configuration Management

Modern infrastructure-as-code practices extend to backup configurations, treating backup scripts and policies as code that's version-controlled, tested, and deployed through automated pipelines. Configuration management tools like Ansible, Puppet, or Chef can deploy standardized backup configurations across multiple systems, ensuring consistency and simplifying management.

Defining backup configurations in code provides several advantages: changes are tracked and auditable, configurations can be tested before deployment, and disaster recovery includes not just data restoration but also rebuilding backup systems from code. This approach aligns backup management with broader DevOps practices, bringing the same rigor to data protection as to application deployment.

"In mature organizations, backup configurations are treated with the same care as application code—version controlled, peer reviewed, tested in staging environments, and deployed through controlled processes."

Compliance and Regulatory Considerations

Many industries face regulatory requirements regarding data retention, protection, and disposal. Healthcare organizations must comply with HIPAA, financial institutions with various banking regulations, and companies handling European data with GDPR. These regulations often specify minimum retention periods, security controls, and procedures for data destruction.

Your rsync-based backup system must support these requirements through appropriate retention policies, encryption, access controls, and audit logging. Documenting your backup procedures, maintaining logs of backup operations, and regularly testing restoration capabilities often form part of compliance requirements. Some regulations require demonstrating that backups can be restored within specific timeframes.

Implementing Audit Trails and Compliance Reporting

Audit trails documenting backup operations, access to backup data, and restoration activities support compliance efforts and security investigations. Your backup scripts should log detailed information about each operation, including what was backed up, when, by whom, and whether it succeeded. Storing these logs separately from the systems being backed up prevents loss if those systems fail.

Regular compliance reporting summarizes backup coverage, success rates, and adherence to retention policies. Automated reports generated from backup logs provide evidence of compliance without manual effort. These reports should highlight any gaps or failures requiring attention, ensuring problems are addressed promptly rather than discovered during audits.

Future-Proofing Your Backup Strategy

Technology and requirements evolve, necessitating backup strategies that adapt without complete redesigns. Building flexibility into your rsync-based backup system involves choosing portable formats, avoiding proprietary tools where possible, and documenting configurations thoroughly. Future administrators—or yourself in six months—will appreciate clear documentation explaining why specific decisions were made.

As data volumes grow, periodically reassess whether your backup approach remains appropriate. Rsync scales remarkably well, but at some point, you might need to consider dedicated backup software, cloud-native solutions, or specialized hardware. Planning for this evolution from the beginning—using modular designs, standard interfaces, and clear separation of concerns—eases transitions when they become necessary.

Emerging technologies like immutable storage, blockchain-based verification, and AI-driven anomaly detection will increasingly integrate with traditional backup tools. Staying informed about developments in data protection helps you evaluate when adopting new capabilities makes sense for your environment. However, fundamental principles—regular backups, multiple copies, tested restoration procedures—remain constant regardless of technological changes.

How often should incremental backups run?

The optimal backup frequency depends on your data change rate and acceptable data loss tolerance. For actively used systems, daily backups represent a reasonable minimum, with more critical systems potentially backing up hourly or even more frequently. Consider your Recovery Point Objective (RPO)—the maximum acceptable data loss measured in time—when determining backup frequency. If losing a day's work would be catastrophic, daily backups aren't sufficient.

What's the difference between incremental and differential backups?

Incremental backups capture changes since the last backup of any type, creating chains where each backup depends on previous ones. Differential backups always reference the last full backup, capturing all changes since that baseline. Incremental backups use less storage and complete faster but require all backups in the chain for restoration. Differential backups simplify restoration but consume more storage as they grow between full backups.

Can rsync backup open files that are currently being used?

Rsync can read and backup open files, but this may result in inconsistent copies if files change during the backup process. For databases and applications maintaining complex data structures, backing up open files can create corrupted backups. Instead, use application-specific backup tools, create snapshots using filesystem features like LVM or ZFS, or stop applications during backups to ensure consistency.

How much storage space do incremental backups require?

Storage requirements depend on your data volume, change rate, and retention policy. The initial full backup consumes space equal to your source data. Each subsequent incremental backup using hard links adds only the storage needed for changed files. A typical scenario might use 1.5-2x your source data size to maintain a week of daily backups, assuming 10-20% of files change daily.

What happens if an incremental backup fails partway through?

Rsync handles partial failures gracefully when properly configured. Using the --partial option preserves partially transferred files, allowing subsequent backup runs to resume rather than starting over. The backup directory will be incomplete until the next successful run, but previous backups remain intact. Your monitoring systems should detect failed backups and alert administrators to investigate and resolve underlying issues.

Should backups be encrypted, and how does this affect rsync performance?

Encrypting backups protects sensitive data if backup media is lost or stolen, which is especially important for offsite or cloud backups. Encryption can occur at different layers: filesystem-level encryption (like LUKS) encrypts the entire backup destination, while file-level encryption encrypts individual files before backup. Filesystem encryption is transparent to rsync and has minimal performance impact. File-level encryption prevents rsync from efficiently detecting changes within encrypted containers, potentially increasing backup sizes and times.