Skip to content

rsync

The backup and sync workhorse: copies only what changed, locally or over SSH.

Homebrew formula

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

AlternativeTypeTrade-off
rcloneOpen sourceThe same shape, for cloud storage instead of SSH hosts
UnisonOpen sourceGenuinely bidirectional, which rsync is not
SyncthingOpen sourceContinuous and peer-to-peer, no scheduled runs
Carbon Copy Cloner or Time MachinePaid / Built inFor Mac backups specifically, with snapshots

Install

brew install rsync

Links

This post is licensed under CC BY 4.0 by the author.
Last updated on