我想镜像只有一些文件“不是目录”。我知道PHP的FTP功能,并使用它们,只是想知道,如果我能使服务器到服务器FXP工作的任何方式。如何在两个ftps之间镜像文件?
我看到CLI工具lftp,但它只镜像dir。 并且如果有一些其他工具可以fxp文件。
我想镜像只有一些文件“不是目录”。我知道PHP的FTP功能,并使用它们,只是想知道,如果我能使服务器到服务器FXP工作的任何方式。如何在两个ftps之间镜像文件?
我看到CLI工具lftp,但它只镜像dir。 并且如果有一些其他工具可以fxp文件。
你可以连接到2台服务器,并给予FXP手动命令。
Wikipedia's - File eXchange Protocol有一个很好的例子
您应该使用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
不知道rsync的建议,因为rsync不支持通过FTP进行镜像,最后我检查了一下。
如果你想镜像文件,一个好的方法是使用-mirror选项,或检查ftpcopy。
没有人知道:(? – Arshdeep 2010-06-04 18:04:35
你可以尝试等待超过8分钟一个答案,或者实际上烦心事接受你的其他问题的答案。 – 2010-06-04 18:06:52
为什么不rsync的工作? – 2010-06-04 18:10:00