我已经设置rsync镜像从源服务器(a)目录到镜像(b)。 我已经得到它来发送源文件中的新文件,但是当我从源文件中删除一个文件,它不会最终删除它。
rsync -vhzrplt --stats --delete --rsh='/usr/bin/ssh -q' --exclude="core/" --exclude="cache/" /home/(a)/public_html (b):/home/(b)/public_html/
当我运行rsync我得到下面的输出:
stdin: is not a tty sending incremental file list public_html/ deleting public_html/test.html Number of files: 389 Number of files transferred: 0 Total file size: 3.16M bytes Total transferred file size: 0 bytes Literal data: 0 bytes Matched data: 0 bytes File list size: 9.25K File list generation time: 0.001 seconds File list transfer time: 0.000 seconds Total bytes sent: 9.33K Total bytes received: 47 sent 9.33K bytes received 47 bytes 1.25K bytes/sec total size is 3.16M speedup is 336.81
正如你可以看到它显示它正在删除test.html,但它永远不会结束。 任何帮助表示赞赏。
在Windows和OSX之间自动同步剪贴板
WaitForSingleObject问题
C ++中的进程间通信
如何在Windows设备之间使用相同的随机种子?
networking文件系统挂载,本地回退?
“同步”和“同步”系统调用是否映射到FUSE的“fsync”调用?
尝试locking在Windows中
我能够通过使用这个来解决这个问题:
rsync -vhzrplt --stats --delete --rsh='/usr/bin/ssh -q' --exclude="core/" --exclude="cache/" /home/(a)/public_html/ (b):/home/(b)/public_html/
rsync有很多选项 – 请参阅man rsync
例如:
--del an alias for --delete-during --delete delete extraneous files from dest dirs --delete-before receiver deletes before transfer (default) --delete-during receiver deletes during xfer,not before --delete-delay find deletions during,delete after --delete-after receiver deletes after transfer,not before --delete-excluded also delete excluded files from dest dirs
这是真的建议阅读该手册页彻底,因为有这么多有用的选项..
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。