rsync is a fast, versatile file-copying tool that uses a delta-transfer algorithm to send only the differences between source and destination files. It supports local copies, remote transfers over SSH, and a standalone daemon mode. rsync is widely used for backups, website mirroring, and directory synchronization because it minimizes data transfer, preserves file attributes, and offers fine-grained control over what is synced and deleted.
What This Cheat Sheet Covers
This topic spans 15 focused tables and 116 indexed concepts, 67 flashcards. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
A jump-to index of every table row in this cheat sheet.
An interactive map of every table and concept in this topic.
Basic Syntax and Local Copies
| Technique/Command | Example | Description | |
|---|---|---|---|
rsync source_file dest_file | • Copy a single file locally • rsync checks size and mtime and only transfers if changed | ||
rsync -r /src/dir/ /dst/dir/ | • Recursively copy directory contents • trailing slash on source copies contents not the directory itself | ||
rsync -r /src/dir /dst/dir/ | Omitting trailing slash on source copies the directory itself into the destination | ||
rsync -v source dest | Print names of files being transferred | ||
rsync -n source dest | • Show what would be transferred without making changes • combine with -v for detail | ||
rsync -nvr /src/ /dst/ | Verbose dry run showing all files that would be transferred recursively | ||
rsync -h source dest | Output numbers in human-readable format (K, M, G) | ||
rsync --progress source dest | Show progress for each file during transfer | ||
rsync --info=progress2 source dest | Show total progress for the entire transfer rather than per-file | ||
rsync --stats source dest | Print a summary of transfer statistics after completion |