Sysadmin > SolarIs > RsyncNotFound

sh: rsync: not found

add --rsync-path=/path/to/rsync to the rsync command

root@host:/root> rsync -avz /var/lib/synctool/synctool.conf 192.168.111.12:/tmp
sh: rsync: not found
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(605) [sender=3.0.9]
root@host:/root> rsync -avz --rsync-path=/usr/pkg/bin/rsync /var/lib/synctool/synctool.conf 192.168.111.12:/tmp
sending incremental file list
synctool.conf

sent 678 bytes  received 31 bytes  1418.00 bytes/sec

Using SSH connections

If, however, one is running on a system that does not accept rlogin connections (like most modern Solaris builds), one must use ssh as the connection method. rsync -auv --delete --rsh=/usr/bin/ssh --rsync-path=/opt/sfw/bin/rsync /sourcedirpath/ remotehost:/targetdirpath/

(A third example is useful on Solaris 2.6 systems that are not ssh enabled) (Note: This example does not use the u or v flags, as it is run in the background, and we want to overwrite newer files. Nor does it specify the rsh path, as the default system rsh is used if not specified) rsync -a --rsync-path=/usr/local/bin/rsync remotesourcehost:/dirpath/dir/ /archive/dirpath/dir/ &