Difference between revisions of "rsync version mismatch"

From thelinuxwiki
Jump to: navigation, search
(Created page with "==problem== rsync transfers are failing due to a version mismatch sender: 2.5.7 <br>receiver: 3.1.2 command run $ '''rsync -avh -e ssh --progress --rsync-path=/usr/local/b...")

Revision as of 02:08, 29 April 2017

problem

rsync transfers are failing due to a version mismatch

sender: 2.5.7
receiver: 3.1.2

command run

$ rsync -avh -e ssh --progress --rsync-path=/usr/local/bin/rsync admin@remotehost:/home/johnsmith/bin/test.csv ./
This system is to be used by authorized Engineering personnel
only.  Individuals using this computer system without authority,
or in excess of their authority, are subject to having all activities
monitored and recorded by system personnel.
admin@remotehosts's password:
protocol version mismatch - is your shell clean?
(see the rsync man page for an explanation)
rsync error: protocol incompatibility (code 2) at compat.c(62)
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [Receiver=3.1.2]


solution

get the protocol number of sender

$ rsync --version | grep protocol
rsync  version 2.5.7  protocol version 26

set the protocol number to match the older version of the sender

$ rsync -avh -e ssh --progress --protocol--rsync-path=/usr/local/bin/rsync admin@remotehost:/home/johnsmith/bin/test.csv ./
receiving file list ...
1 file to consider
rules_test.csv
         4.09K 100%    3.90MB/s    0:00:00 (xfr#1, to-chk=0/1)
sent 32 bytes  received 4.18K bytes  936.89 bytes/sec
total size is 4.09K  speedup is 0.97

Yay! it works!