Rsync Deep Dive: –checksum vs –ignore-times – Key Differences, Performance Impact, and Use Cases


3 views

While both --checksum and --ignore-times alter rsync's default comparison behavior, they operate at different levels of the file synchronization process:

# Default rsync behavior (without either flag):
rsync -avz /source/ user@remote:/destination/

# With --checksum:
rsync -avz --checksum /source/ user@remote:/destination/

# With --ignore-times:
rsync -avz --ignore-times /source/ user@remote:/destination/

--checksum adds an additional verification layer after size and timestamp comparison. When files appear identical by size and mtime, rsync:

  1. Calculates MD5 checksums for both files
  2. Compares the checksums byte-by-byte
  3. Only skips transfer if checksums match exactly

--ignore-times completely bypasses the timestamp comparison phase, forcing rsync to:

  1. Always check file sizes
  2. Perform delta-transfer analysis regardless of modification times
  3. Transfer only the differing portions if files aren't identical

The CPU and I/O overhead differs significantly:

# Benchmark command template
time rsync [OPTIONS] large_dir/ remote:backup/

--checksum impact:

  • +15-30% CPU usage during initial comparison phase
  • +5-10% total sync time for large directories
  • Significant disk I/O for checksum calculation

--ignore-times impact:

  • Minimal CPU overhead compared to default
  • Faster than --checksum but slower than default
  • No additional disk I/O beyond normal transfer

When to use --checksum:

# Backup systems where timestamps might get reset
rsync --checksum --delete /critical-data/ backup-server:/archive/

# Version control systems with identical timestamps
rsync --checksum --exclude='.git/' repo/ mirror-server:/repositories/

When to use --ignore-times:

# Continuous integration systems with frequent rebuilds
rsync --ignore-times --filter='P *.o' build/ test-machine:/build-artifacts/

# Cloud deployments with inconsistent timestamp precision
rsync --ignore-times --exclude='node_modules/' app/ production:/deploy/

For maximum reliability in critical scenarios:

# Nuclear option for complete verification
rsync --checksum --ignore-times --partial --progress /data/ disaster-recovery:/backup/

# Optimized combination for large binary files
rsync --checksum --size-only --compress /media-files/ cloud-storage:/assets/

The --checksum --ignore-times combination effectively forces a full checksum comparison on every file, which is useful for forensic backups but extremely resource-intensive.

Problem: Unexpected file transfers despite using these flags
Solution: Check for filesystem-specific behaviors (NTFS timestamps, FAT32 limitations)

# Example diagnostic command
rsync --dry-run --itemize-changes --checksum /source/ dest/ | grep '^[^.]'

Remember that both options interact with rsync's other optimization flags like --size-only and --whole-file in non-obvious ways.


While both --checksum and --ignore-times modify rsync's default comparison behavior, they operate at different levels of the synchronization process:

# Default rsync behavior (time+size comparison)
rsync -avz source/ destination/

# Using --checksum
rsync -avz --checksum source/ destination/

# Using --ignore-times
rsync -avz --ignore-times source/ destination/

The --checksum option forces rsync to:

  • Skip the quick check based on file size and modification time
  • Calculate MD5 checksums for all files
  • Compare checksums between source and destination

Meanwhile, --ignore-times:

  • Ignores modification time differences
  • Still performs size comparison
  • Uses rsync's delta algorithm for efficient transfers

When to use --checksum:

# Example: Verifying backup integrity
rsync --checksum --delete -av /critical-data/ backup-server:/backups/

When to use --ignore-times:

# Example: Forcing content comparison after timestamp changes
rsync --ignore-times -avz compiled-code/ test-server:/deploy/
Option CPU Usage Network Usage Use Case
--checksum High (checksum calculation) Low (only changed files) Data verification
--ignore-times Medium Medium (delta transfer) Forced comparison

For maximum reliability in critical transfers:

rsync --checksum --ignore-times --partial --progress -avz \
    source-data/ remote-server:/backup/

This combination ensures:

  • Complete content verification (--checksum)
  • No timestamp assumptions (--ignore-times)
  • Resumable transfers (--partial)
  • Progress visibility (--progress)