为什么 rsync 守护进程会截断这条路径?

Why is rsync daemon truncating this path?

我正在尝试通过 rsync 守护程序同步一组远程文件,但生成的路径缺少初始路径元素。

$ rsync -HRavP ftp.ncbi.nih.gov::refseq/H_sapiens/README 2015-05-11/
receiving incremental file list
created directory 2015-05-11
H_sapiens/
H_sapiens/README
          4,850 100%    4.63MB/s    0:00:00 (xfr#1, to-chk=0/2)

sent 51 bytes  received 5,639 bytes  3,793.33 bytes/sec
total size is 4,850  speedup is 0.85

$ tree 2015-05-11/
2015-05-11/
└── H_sapiens
    └── README

请注意生成的树缺少远程路径的第一部分 ("refseq")。

我意识到我可以将远程路径的第一个元素附加到目标路径,但(对我而言)这似乎不太可能是 rsync 的预期行为。

比较值得注意的是rsync -HRavP refseq/H_sapiens/README 2015-05-11/(源是本地文件)在目标目录下正确创建了完整的相对路径。

参见rsync description

CONNECTING TO AN RSYNC SERVER

...

Using rsync in this way is the same as using it with rsh or ssh except that:

  • You use a double colon :: instead of a single colon to separate the hostname from the path.
  • The first word of the "path" is actually a module name.

您可以获得所有模块名称

rsync -HRavP ftp.ncbi.nih.gov::