mac 和 linux 之间的 rsync xattr 奇怪吗?

Dav*_*eto 9 ubuntu rsync osx-snow-leopard

大家好 - 我正在使用 rsync 从我的 mac 备份到运行 linux 的文件服务器,我看到以下错误:

rsync -e ssh -vaxE --delete --ignore-errors 192.168.1.3:/bkup/mac/Users/dave/ /Users/dave/Desktop/dave 
dave@192.168.1.3's password: 
rsync: on remote machine: --extended-attributes: unknown option
rsync error: syntax or usage error (code 1) at main.c(1441) [server=3.0.5]
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-37.3/rsync/io.c(452) [receiver=2.6.9]
Run Code Online (Sandbox Code Playgroud)

... 足够清楚的错误,但是 -v 显示了两台机器的以下内容:

MAC(客户端/本地):

rsync  version 2.6.9  protocol version 29
...
Capabilities: 64-bit files, socketpairs, hard links, symlinks, batchfiles,
              inplace, IPv6, 64-bit system inums, 64-bit internal inums
Run Code Online (Sandbox Code Playgroud)

LINUX(服务器/远程):

rsync  version 3.0.5  protocol version 30
...
Capabilities:
    64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, ACLs, xattrs, iconv, symtimes
Run Code Online (Sandbox Code Playgroud)

...所以鉴于 Linux 盒子说它支持 xattrs 为什么它会抱怨 Mac 请求的扩展属性?

FWIW Mac 正在运行 OS X 10.6.1 & 服务器正在运行 Ubuntu 2.6.28-15-generic - 两台机器都运行最新的标准包(除了默认情况下,任何一方都没有安装特殊的 rsync 版本) .

任何见解表示赞赏:-)

Mor*_*ven 8

标志 -E / --extended-attributes 不是官方 rsync 发行版的一部分,而是 Apple 在官方 rsync 版本不支持它们时包含的补丁。

现在,rsync 版本 3.x 以与 Apple 补丁不兼容的方式重新实现了扩展属性支持。根据3.0.6rsync 手册页,扩展属性支持现在使用 --xattrs 或 -X 参数完成。它似乎根本不接受 --extended-attributes 标志。

您将不得不不指定 -E 或在本地安装支持新实现的 rsync 更新版本。