Life is Rich All the time.

Building a Robust, Modern, Mac-friendly rsync

11 Jan 2014

I use rsync extensively. It's my tool of choice for moving files between both local and remote computers. While the mac ships with an rsync, it's nearly always old and outdated. With Mavericks, the currently shipped version is 2.6.9, protocol version 29 — and does not include full support for ACLs and xattrs (at least they are not listed in the current capabilities list).

The following installs a modern (3.0.8) variant with patches to support the Mac file system:

curl -O
tar -xzvf rsync-3.0.8.tar.gz
rm rsync-3.0.8.tar.gz
curl -O
tar -xzvf rsync-patches-3.0.8.tar.gz
rm rsync-patches-3.0.8.tar.gz
cd rsync-3.0.8
patch -p1 <patches/fileflags.diff
patch -p1 <patches/crtimes.diff
patch -p1 <patches/hfs-compression.diff
./configure --prefix /usr/local --disable-debug --enable-ipv6
sudo make install

Once installed, adjust your path or call it explicitly. You will need to install this version on both source and destination Macs if working between two computers. To ensure rsync uses the correct version of rsync on the destination, you can call rsync with the --rsync-path parameter:

/usr/local/bin/rsync --rsync-path=/usr/local/bin/rsync source dest