DO NOT REPLY [Bug 6752] --force option doesn't work as expected/documented

samba-bugs at samba-bugs at
Wed Sep 23 07:30:28 MDT 2009

------- Comment #4 from ciolfi at  2009-09-23 08:30 CST -------
Thanks for the "p" modifier tip. That solves the problem. May I suggest that if
you are updating the documentation that you also note that the "p" modifier can
be applied to the protect rules. Here's the example that does work (which may
be worth adding to a FAQ):

mkdir -p dst/s1/CVS
echo foo > dst/s1/CVS/Root

mkdir -p src/s2/foo.txt

rsync -az --filter='exclude /**/CVS/Root' --filter='protect,p /**/CVS/Root'
--delete-excluded src/ dst

The scenario is that I'm copying a CVS source tree from a src location to a dst
location. The contents of the CVS/Root file needs to be different in the
destination, therefore we exclude them from the rsync transfer and after the
rsync is complete create the desired CVS/Root files. On a 2nd rsync, we don't
want the CVS/Root files touched, thus we use the protect rule. However, we need
to use the p modifier for the protect rule such that we can delete the files
when the directory tree is no longer present on the src side.


Configure bugmail:
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

More information about the rsync mailing list