Interestingly enough rsync shipped with Mac OS X 10.13 is stuck in the past at version 2.6.9. This is rather unfortunate because if you attempt to use this version of rsync with a modern 3.x version you will receive the dreaded rsync error (code 23):
rsync error: some files could not be transferred (code 23) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-51/rsync/main.c(996) [sender=2.6.9]
The easy fix is to use either Mac Ports or Homebrew to upgrade your Mac’s version of rsync to the latest 3.x variant.
receiving file list ... done
rsync: open "/Users/mikel/Documents/your-life-contest-2014-complete-3001.csv" failed: Permission denied (13)
rsync: connection unexpectedly closed (103 bytes received so far) [generator]
rsync error: error in rsync protocol data stream (code 12) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-52/rsync/io.c(453) [generator=2.6.9]
Upgrading is is the easy part, but once you have the new version installed it will be in a different location from the default 2.6.9 version of rsync installed by Mac OS X. The default location is `/usr/bin/rsync and brew typically installs it’s version into /usr/local/bin/rsync. Unless you alter the path you will continue to use the default version.
Chris says
I have rsync v2.6.9 on MacOS Catalina 10.15.7 and am trying to re-establish rsync backups from there to a Centos 7 rsync v3.1.2 and my final issue involves code 23. Thanks for the suggestion this is caused by crossing versions. Any idea what the underlying issue is?
Chris says
Issue is unrelated to version of rsync. After a lot of thrashing I was able to resolve the issue with the following: (1) by assuring my source path included a trailing slash and also the target path (in my rsyncd.conf file) had a trailing slash and (2) added “–exclude-from=rsync_exclude.txt” to assure MacOS special hidden files & directories were skipped. Sample contents of that exclude file:
.DS_Store
.Trash/
.bash*
.bash_sessions/
.config/
.cpan/
.cups/
Türkalp Burak Kayrancıoğlu says
It works, thank you Chris.