如何在两个ftp之间镜像文件?
我只想镜像一些文件“不是目录”。我知道 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以连接到两台服务器并手动发出 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
您应该使用 rsync 来执行此操作。
直接来自他们的网站:
You should be using rsync to do this.
Directly from their site:
不确定 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.