Hi,<br><br>Basically, I want to preserve some of directories on destination side conditionally and hence, I choose to use --filter option mentioned in rsync man pages. I noticed that --filter option works as expected when I don&#39;t have --relative option used but in below case it doesn&#39;t work.<br>
<br>rsync  -avz  --relative --delete  --filter=&#39;H /mydir2&#39; --exclude=&#39;- /preserve&#39;  mydir1/. destHost:/tmp/mydir<br><br>I want to sync &quot;/tmp/mydir/mydir1&quot;, delete &quot;mydir2&quot; and protect and hide &quot;preserve&quot; directory on destination host.<br>
<br>I noticed that rsync doesn&#39;t deletes the &quot;mydir2&quot; on destination host but if I remove --relative then it does. Could anyone tell me is there any dependencies between Hide and Protect flag with --relative option? How to make rsync to delete directories with H flag set and --relative option specified?<br>
<br>Thanks.<br><br>