rsync --iconv option on Mac not working (sync from remote Linux server to local Mac)

After a lot of experimenting, and very much due to @Lee Johnson's helpful suggestions, I finally found out the solution, which now strikes me as embarrassingly obvious. Much due to a comment I read when researching the problem, I thought you were supposed to specify the character set in the order of transformation; but it seems as that is not the correct syntax. Rather, one should

ALWAYS use --iconv=utf-8-mac,utf-8 when initialising the rsync from the mac, and ALWAYS use --iconv=utf-8,utf-8-mac when initialising the rsync from the linux machine, no matter if I want to sync files from the mac or linux machine.

Then it works like magic!


Did you recently upgrade to OS X Yosemite? I had the same problem, before I remembered that I had updated /usr/bin/rsync with version 3.1. When I upgraded to Yosemite, this got replaced with the old 2.6.9 version.

In my own case, I fixed the problem on the Mac by relinking my 3.1 rsync back into /usr/bin:

sudo -s
cd /usr/bin
mv rsync rsync-2.6.9
ln -s /usr/local/bin/rsync .
exit