rsync协议不兼容

Modified on: Tue, 05 Nov 2019 01:40:02 +0800

使用以下命令从远程服务器执行rsync拉取时:

/usr/bin/rsync -av -e ssh --delete --chmod=a+rwx,g+rwx,o-wx --dry-run username@server:/remote/path/ /home/dir/local/path

我收到以下错误:

receiving file list ... Invalid flist flag: 1004
rsync error: protocol incompatibility (code 2) at flist.c(2354) [Receiver=3.0.7]

当从远程到本地进行反向(即PUSH)时,我得到以下结果:

building file list ... Invalid flist flag: 1004
rsync error: protocol incompatibility (code 2) at flist.c(2354) [Receiver=3.0.7]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(468) [sender=2.6.8]

我已经尝试逐个删除参数,它似乎与-a标志

有关

环境强>

# local machine
Linux lbox 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux
# rsync version
rsync  version 3.0.7  protocol version 30

# remote machine
FreeBSD rbox 6.4-STABLE FreeBSD 6.4-STABLE #0: Mon Feb 22 01:05:13 EST 2010     UNIX-BSD
rsync  version 2.6.8  protocol version 29

这可以轻松解决吗?

最佳答案

有趣的是,将中间机器放在原始机器和目标机器之间可以达到预期的效果:

机器1(原点)>>机器2(中介)>>机器3(目的地)

machine 1: rsync  version 2.6.8  protocol version 29
machine 2: rsync  version 3.0.3  protocol version 30
machine 3: rsync  version 3.0.7  protocol version 30

相关问答

添加新评论