Rsync 3.0.9 for Lion

Lion ships with the same version of rsync as panther did. Version 2.6.9 is great and all, but its a bit outdated. The newer versions of rsync allow you to do some better stuff, and along with some patches for OS X (by Mike Bombich) it is a great tool for Xsan volumes as well.

Mike Bombich wrote a good tutorial on how to compile version 3.0.7 for Mac. This was updated for 3.0.9 and Lion by Andy Boutte on backuposx.co. This is taken straight from his page.

First fire up Terminal.app

 cd ~/Desktop
 curl -O http://rsync.samba.org/ftp/rsync/src/rsync-3.0.9.tar.gz
 tar -xzvf rsync-3.0.9.tar.gz
 rm rsync-3.0.9.tar.gz
 curl -O http://rsync.samba.org/ftp/rsync/src/rsync-patches-3.0.9.tar.gz
 tar -xzvf rsync-patches-3.0.9.tar.gz
 rm rsync-patches-3.0.9.tar.gz
 cd rsync-3.0.9
 patch -p1 <patches/fileflags.diff
 patch -p1 <patches/crtimes.diff
 patch -p1 <patches/hfs-compression.diff
 ./prepare-source
 ./configure
 make
 sudo make install

Once you have completed those steps you will find rsync version 3.0.9 with those patches applied in the /usr/local/bin/ directory.  Make sure when trying to use this version instead of the version included with Mac OS X Lion to specifically call the version in /usr/local/bin/.  For example to use this version use the following line:

sudo /usr/local/bin/rsync -aNHAXx --fileflags --protect-decmpfs --force-change /source/ /dest
instead of:
sudo rsync -aNHAXx --fileflags --protect-decmpfs --force-change /source/ /dest

It will save you a large headache.  If you have any questions about patching rsync 3.0.9 leave a comment or email using the contact button above.

http://www.backuposx.co/mac-os-x-lion-patching-rsync