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

Php 如何在两个FTP之间镜像文件?,php,ftp,mirror,Php,Ftp,Mirror,我只想镜像一些文件“不是目录”。我知道PHP ftp函数,也知道如何使用它们,只是想知道是否有任何方法可以使服务器到服务器的FXP工作 我看到了CLI工具lftp,但它只镜像dir。 如果有其他工具可以对文件进行fxp处理。您应该使用它来执行此操作 直接从他们的网站: rsync is a file transfer program for Unix systems. rsync uses the "rsync algorithm" which provides a very fast met

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

我看到了CLI工具lftp,但它只镜像dir。 如果有其他工具可以对文件进行fxp处理。

您应该使用它来执行此操作

直接从他们的网站:

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 rsync是用于Unix系统的文件传输程序。rsync使用“rsync 算法”,它提供了将远程文件导入到 同步。它只通过跨网络发送文件中的差异来实现这一点 链接,而不要求两组文件都存在于其中一个 链接的两端。 rsync的一些特性包括 *可以更新整个目录树和文件系统 *(可选)保留符号链接、硬链接、文件所有权, 权限、设备和时间 *无需特殊权限即可安装 *内部管道减少了多个文件的延迟 *可以使用rsh、ssh或直接套接字作为传输 *支持匿名rsync,这是镜像的理想选择
您可以连接到这两台服务器并手动发出FXP命令。

页上有一个很好的例子,我不确定rsync的建议,因为rsync不支持通过FTP进行镜像,上次我检查过


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

你可以尝试等待8分钟以上的答案,或者尝试接受其他问题的答案。抱歉,兄弟,但我不知道Rsync做什么,它会同步/镜像FTPs吗?嘿,兄弟。你知道谷歌做什么吗?试试谷歌搜索
rsync