https://bugzilla.samba.org/show_bug.cgi?id=6752





------- Comment #4 from [email protected]  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.

Thanks
John


-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to