rsync Cheat Sheet
Efficient delta-based sync — mirrors, backups, and large transfers with bandwidth limits and progress.
Networking3 sections · 17 commands
⌘K
Sync Basics
6rsync -av SRC DESTArchive mode + verbose
rsync -av SRC/ DEST/Trailing slashes = contents of dir
rsync -avzh SRC DESTAdd human-readable + compress
rsync -av --progress SRC DESTPer-file progress bar
rsync -n -av SRC DESTDry run (no changes)
rsync -av --delete SRC/ DEST/Mirror exact (deletes extra files)
Over SSH
5rsync -avz SRC/ user@host:/dest/Sync to a remote host
rsync -avz user@host:/src/ ./Sync from a remote host
rsync -e 'ssh -p 2222' SRC user@host:Custom SSH port
rsync -e 'ssh -i KEY.pem' SRC user@host:Specific key
rsync -avz --bwlimit=2000 SRC user@host:Cap speed to 2 MB/s
Backups & Options
6rsync -a --partial --info=progress2 /data /backupResumable large copy
rsync -a --exclude='*.log' --exclude='cache/' SRC/ DEST/Skip files/patterns
rsync -a --backup --backup-dir=/backup/old SRC/ DEST/Keep replaced versions
rsync -a --link-dest=PREV SRC/ DEST/Hardlink-based snapshots
rsync -az --del --stats /app/ deploy@server:/app/Deploy with stats
rsync -av --checksum SRC DESTChecksum every file (slower, exact)