rsync error: protocol incompatibility (code 2)

Posted on November 14th, 2018 by whinger. Filed under Tech.


I needed to push a lot of files from a (very) old server (RHEL3) to a newer one (RHEL7). rsync seemed like a smart choice, because I will need to rerun the command to push any updated files at a later date.

 

Problem is, rsync complains

rsync error: protocol incompatibility (code 2) at compat.c(62)

 

There are loads of webpages suggesting this is a problem with your .bashrc outputting text when it shouldn’t, but in my case that wasn’t it; turns out rsync rather stupidly uses the latest protocol version without checking to see if both ends will support it. The new version on the target machine was blithely talking a version that the old version wouldn’t run.

 

Anyway, to cut a long story short, adding

 

--rsync-path="rsync --protocol=30"

 

to the rsync command line worked for me.

 



Trackback URI | Comments RSS

Leave a Reply


Blogroll

Categories