如何在两个ftp之间镜像文件?

发布于 2024-09-03 21:19:31 字数 126 浏览 9 评论 0原文

我只想镜像一些文件“不是目录”。我知道 PHP ftp 函数并使用它们,只是想知道是否有任何方法可以使服务器到服务器 FXP 工作。

我看到 CLI 工具 lftp 但它只镜像 dir。 如果有其他工具可以 fxp 文件。

I want to mirror only some files "Not directory". I know PHP ftp function and using them as well, just want to know if any way i can make server to server FXP working.

i saw CLI tool lftp but it mirrors dir only.
And if there is some other tool that can fxp the files.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

清风疏影 2024-09-10 21:19:31

您可以连接到两台服务器并手动发出 FXP 命令。
维基百科的 - 文件交换协议页面上有一个很好的示例

You could connect to the 2 servers and give the FXP commands manually.
There is an nice example on Wikipedia's - File eXchange Protocol page

ま柒月 2024-09-10 21:19:31

您应该使用 rsync 来执行此操作。

直接来自他们的网站:

rsync is a file transfer program for Unix systems. rsync uses the "rsync 
algorithm" which provides a very fast method for bringing remote files into 
sync. It does this by sending just the differences in the files across the 
link, without requiring that both sets of files are present at one of the 
ends of the link beforehand.

Some features of rsync include

    * can update whole directory trees and filesystems
    * optionally preserves symbolic links, hard links, file ownership, 
      permissions, devices and times
    * requires no special privileges to install
    * internal pipelining reduces latency for multiple files
    * can use rsh, ssh or direct sockets as the transport
    * supports anonymous rsync which is ideal for mirroring 

You should be using rsync to do this.

Directly from their site:

rsync is a file transfer program for Unix systems. rsync uses the "rsync 
algorithm" which provides a very fast method for bringing remote files into 
sync. It does this by sending just the differences in the files across the 
link, without requiring that both sets of files are present at one of the 
ends of the link beforehand.

Some features of rsync include

    * can update whole directory trees and filesystems
    * optionally preserves symbolic links, hard links, file ownership, 
      permissions, devices and times
    * requires no special privileges to install
    * internal pipelining reduces latency for multiple files
    * can use rsh, ssh or direct sockets as the transport
    * supports anonymous rsync which is ideal for mirroring 
香橙ぽ 2024-09-10 21:19:31

不确定 rsync 的建议,因为 rsync 不支持通过 FTP 进行镜像,上次我检查过。

如果您想镜像文件,一个好的方法是使用 -mirror 选项的 wget,或者查看 ftpcopy。

Not sure about the recommendations for rsync, as rsync doesn't support mirroring over FTP, last I checked.

If you want to mirror files, a good approach would be wget using the -mirror option, or check out ftpcopy.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文