Skip to content

rsync Backup Cheat Sheet

Cheat sheet for using rsync to create backups.

  • Use rsync -avh
  • Add --progress for file transfer progress
  • Add --delete to mirror backups
  • Use --dry-run to preview changes
Terminal window
rsync -avh --progress source/ destination/
  • -a = archive mode (recursive, preserves permissions, timestamps, symlinks, etc)
  • -v = verbose output
  • -h = human-readable sizes
  • --progress = shows file transfer progress
Terminal window
rsync -avh --delete source/ destination/
  • --delete = removes files in destination that no longer exist in source
Terminal window
rsync -avh --dry-run source/ destination/
Terminal window
rsync -avh source/ destination/ # copies the _contents_ of source
rsync -avh source destination/ # copies the _source folder itself_