我已经配置了rsync以从源服务器(a)镜像一个目录到另一台镜像服务器(b)。我已经让它发送源上的新文件,但是当我从源中删除文件时,它并没有将其删除。
以下是我用来调用rsync的内容:
当我运行rsync时,我会得到以下输出:
以下是我用来调用rsync的内容:
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文件,但实际上并没有执行。欢迎提供任何帮助。
/home/(a)/public_html/
路径中的尾部加上/
是否解决了这个问题? - Vilhelm Gray