rsync笔记
作者:互联网
同步删除文件时报错:cannot delete non-empty directory
原始命令:
rsync -a --delete --exclude={'*/.git/','*/.gradle','*/.idea/','*/*/build','*/target','*/*/target','*/*/*/target','azkaban_source/azkaban-web-server/src/restli/generatedJava','*/logs','*/*/logs'} /appcom/workspace/ /media/sf_fff/workspace/
在同步过程中报错:
cannot delete non-empty directory: data-studio/ds-common
cannot delete non-empty directory: datamap/dm-warehouse
这两个目录在源头已经被删除,需要添加上参数--delete-excluded
rsync -a --delete --delete-excluded --exclude={'*/.git/','*/.gradle','*/.idea/','*/*/build','*/target','*/*/target','*/*/*/target','azkaban_source/azkaban-web-server/src/restli/generatedJava','*/logs','*/*/logs'} /appcom/workspace/ /media/sf_fff/workspace/
标签:rsync,logs,--,笔记,azkaban,workspace,delete,target 来源: https://blog.csdn.net/fqjia2008/article/details/122732446