System using old version of rSync instread of new version I have a Mac computer and would like to send backups to a Synology NAS.

Apple has rSync 2.6.9 pre-loaded with the operating system.

I installed rSync 3.1.3 using HomeBrew as Synology Active Backup requires at least 3.0.  HomeBrew installed rSync into /usr/local/bin/rsync.  

The problem is when I connect to the Mac computer using rSync, the Mac uses version 2.6.9 instead of the new one I installed.  How can I make it so that it uses the new one instead of the old one?

I know about changing the PATH for the local user to put /usr/local/bin/rsync before /usr/bin/rsync.  It works when I am logged in using the terminal or SSH.  However, when I connect using Synology, it always invokes 2.6.9 which renders it not workable.  

Is there anything in there that can cause the system to use 3.1.3 in the /usr/local/bin/rsync instead of the original one that came with the computer?

Thanks in advance.
The answer depends on how you have setup ActiveBackup, as you can run it in three different ways:

1) Rsync shell mode via SSH

2) Rsync module mode (directly)

3) Rsync module mode via SSH

When using mode 1, ActiveBackup will login to the Mac and start up rsync itself. This does not go through launchd at all. I can see that you have been advised to use "--rsync-path", but that is not an option for you, simply because ActiveBackup does not let you set this parameter.

Instead what you need to do is to ensure that when ActiveBackup starts rsync on the remote server, it will start up the correct version - WITHOUT the possibility of changing which command ActiveBackup sends over. There's two ways of doing this depending on whether your ActiveBackup version is the one that issues the "rsync" command or the one issuing the "/usr/bin/rsync" command.

If it is the first one (try this first), then edit the /private/etc/paths file and make sure the "/usr/local/bin" line comes before the "/usr/bin" line.

If it is the second one, then use these steps:


Reboot the Mac in Recovery Mode
Open Terminal and disable SIP: "csrutil disable"
Reboot and open Terminal
Move away old rsync: "mv /usr/bin/rsync /usr/bin/rsync.orig"
Link in new rsync: "ln -s /usr/local/bin/rsync /usr/bin/rsync"


You'll want to test this with ActiveBackup, and then reboot into Recovery Mode to enable SIP again with "csrutil enable".

Note that a subsequent macOS update might replace rsync. If that happens, just repeat the process. Note that as Apple hasn't updated rsync for years, it is not that likely to happen.

If you're using mode 2, ActiveBackup communicates directly with the rsync daemon, and does not start the rsync command itself on the Mac. In this case you cannot use the advise of using "--rsync-path", as it doesn't apply here at all. How to fix it depends on how you have actually started the rsync daemon. As you haven't detailed anything about starting it, I assume this means that you haven't actually started it.

However if you did follow a guide to enable rsyncd - you have probably done it through adding a launchd "LaunchDaemon". In that case you'll need to change your launch daemon file and find the key "Program" and change the corresponding string element to:

/usr/local/bin/rsync

If you're using mode 3, you'll want to follow the guide for mode 1 as it is the same steps necessary.