使用以下命令从远程服务器执行 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
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
receiving file list ... Invalid flist flag: 1004
rsync error: protocol incompatibility (code 2) at flist.c(2354) [Receiver=3.0.7]
Run Code Online (Sandbox Code Playgroud)
从远程到本地执行反向操作(即 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]
Run Code Online (Sandbox Code Playgroud)
我已经尝试将参数一一删除,似乎与 -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
Run Code Online (Sandbox Code Playgroud)
这可以轻松解决吗?
Mic*_*ton 10
FreeBSD box 有一个使用较旧协议版本的 rsync 6 年旧版本。您可以通过添加--protocol=29到您的rsync命令来强制新版本的 rsync 使用旧协议。
有趣的是,在源机器和目标机器之间放置一个中间机器可以达到预期的结果:
IE。
机器 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
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9564 次 |
| 最近记录: |