the protect flag - P doesn't work with --relative option ?

paresh masani masaniparesh at gmail.com
Mon Aug 3 13:25:42 MDT 2009


Hi,

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't
have --relative option used but in below case it doesn't work.

rsync  -avz  --relative --delete  --filter='H /mydir2' --exclude='-
/preserve'  mydir1/. destHost:/tmp/mydir

I want to sync "/tmp/mydir/mydir1", delete "mydir2" and protect and hide
"preserve" directory on destination host.

I noticed that rsync doesn't deletes the "mydir2" 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?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20090804/77d35444/attachment.html>


More information about the rsync mailing list