如何使用 rsync 从 HTTP URL 检索文件?

How can I use rsync to retrieve files from an HTTP URL?

这里有一堆文件:http://data.pudo.org/flexicadastre/

我想要一个本地文件夹,其中包含与 URL 中相同的文件。

我试过:

rsync -av http://data.pudo.org/flexicadastre/ .

但我得到:

ssh: Could not resolve hostname http: nodename nor servname provided, or not known
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: unexplained error (code 255) at /SourceCache/rsync/rsync-45/rsync/io.c(453) [receiver=2.6.9]

我通常使用 rsync 通过 FTP 或 SSH 同步本地文件夹或文件夹,但这不同,我不确定如何处理。这个站点对我来说看起来像一个 FTP,但它是通过 HTTP 公开的。我真的不明白它是如何工作的。在这种情况下可能无法使用 rsync,我应该使用其他东西吗?

无法在 http URL 上使用 rsync。

要使用 rsync algorithm,客户端 rsync 需要与服务器端 rsync 进程交互。这可以通过 ssh 或(不太常见的)rsh 直接完成。 HTTP 不是一个选项。

May rsync is not possible in this scenario and I should use something else?

看来您只想将数据从 HTTP 镜像到本地文件系统。有几个程序可以执行此操作,例如 wget 或 lwp-mirror,可能还有很多其他程序。