# rsync同步报错,目录不为空不能删除的问题
# rsync -zavP --password-file="/data/www/.rsync/rsyncd.aliszdownload" --exclude=cbs_down --delete /data/www/vhosts/download.chinasoft.com/httpdocs/ apache@1.1.1.1::apache/data/www/vhosts/download.chinasoft.com/httpdocs/
cannot delete non-empty directory: data/www/vhosts/download.chinasoft.com/httpdocs
cannot delete non-empty directory: data/www/vhosts/download.chinasoft.com/httpdocs
cannot delete non-empty directory: data/www/vhosts/download.chinasoft.com
cannot delete non-empty directory: data/www/vhosts/download.chinasoft.com
cannot delete non-empty directory: data/www/vhosts
cannot delete non-empty directory: data/www/vhosts
cannot delete non-empty directory: data/www
--delete-excluded
# 可以加上参数 --delete-excluded 就可以删除了
[root@download-web01:~]# rsync -zavP --password-file="/data/www/.rsync/rsyncd.aliszdownload" --exclude=cbs_down --delete --delete-excluded /data/www/vhosts/download.chinasoft.com/httpdocs/ apache@1.1.1.1::apache/data/www/vhosts/download.chinasoft.com/httpdocs/
sending incremental file list
deleting cbs_down
deleting data/www/vhosts/download.chinasoft.com/httpdocs/cbs_down
deleting data/www/vhosts/download.chinasoft.com/httpdocs/
deleting data/www/vhosts/download.chinasoft.com/
deleting data/www/vhosts/
deleting data/www/
developer/
developer/12.5.zip
2,660,463 100% 7.02MB/s 0:00:00 (xfr#1, ir-chk=1020/5507)
sent 2,883,387 bytes received 634 bytes 824,006.00 bytes/sec
total size is 264,107,857,202 speedup is 91,576.26
rsync同步报错cannot delete non-empty directory的问题
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
数据同步--rsync
使用rsync进行两台或多台主机直接的数据同步
rsync数据同步 -
How to delete non empty directory in java
摘要:在这篇文章中,我们将看到如何删除非空的目录/文件夹。您可以使用java。文件个文件,那么我们可以直接删除它,但是如果...
file directory apache java 递归 -
已解决:Elasticsearch报错:Invalid interval specified, must be non-null and non-emptyElasticsearch non-null non-empty 报错