rsync
The backup and sync workhorse: copies only what changed, locally or over SSH.
What it does
rsync compares source and destination and transfers only differing blocks, which makes repeated syncs of a large tree cheap. Over SSH it needs nothing on the far end but rsync itself.
# mirror a directory to a server, preserving everything
rsync -avh --delete ~/Media/ lab:/srv/media/
# dry run first, always
rsync -avhn --delete ~/Media/ lab:/srv/media/
# resumable, with progress
rsync -avh --partial --info=progress2 big.img lab:/srv/
# snapshot-style backup with hardlinks
rsync -avh --link-dest=../2026-09-23 ~/Documents/ ./2026-09-24/Why the Homebrew build
macOS shipped an ancient rsync 2.6.9 for years, and now ships an openrsync shim; the Homebrew formula is current upstream rsync with the flags scripts written on Linux expect.
--delete removes files at the destination that no longer exist at the source, and a trailing slash on the source changes whether the directory itself or its contents are copied. Run with -n first — that one habit prevents most rsync accidents.Alternative to
| Alternative | Type | Trade-off |
|---|---|---|
| rclone | Open source | The same shape, for cloud storage instead of SSH hosts |
| Unison | Open source | Genuinely bidirectional, which rsync is not |
| Syncthing | Open source | Continuous and peer-to-peer, no scheduled runs |
| Carbon Copy Cloner or Time Machine | Paid / Built in | For Mac backups specifically, with snapshots |
Install
brew install rsync