I have two folders that I need to merge onto a remote host. The sources contain conflicting files, and I'm trying to rsolve these conflicts using per-directory filter rules. However, it seems as if these rule files are merged together into one, instead of being treated separately for each directory. Is this the way it's supposed to work? For example, I have: Source A: foo1.zip foo2.zip foo3.zip dummy.txt .rsync-include Source B: bar.zip bar2.zip foobar.txt .rsync-include .rsync-include on A says: + *.zip .rsync-include on B says: + bar.zip - ** the command line I'm using looks like: rsync -f="- .*" -f=": .rsync-include" A B Destination:C I was expecting that I would get everything in A and just bar.zip in B moved into Destination. However, instead I'm getting bar2.zip from B being put into the Destination as well, as if the "+ *.zip" in A is attached to B's include file as well. Is there a better way to get what I want? I could split it up into two commands, but I was expecting better performance by using one command and only connecting to Destination once.
On Tue, Oct 18, 2011 at 1:21 PM, neilsort-rsync at yahoo.com < neilsort-rsync at yahoo.com> wrote:> However, it seems as if these rule files are merged together into one, > instead of being treated separately for each > directory. >Having conflicting per-dir merge files is handled differently depending on if you're doing incremental recursion (the default for 3.x) or the older, pre-scan-the-whole-tree algorithm. You could try using --no-i-r. However, I'd recommend using an absolute hide from a central filter file (or command-line options) as a simpler solve. e.g.: --filter='show,/ /path/A/*.zip' -f'S/ /path/B/bar.zip' --filter='hide *' A/ B/ C rsync -f="- .*" -f=": .rsync-include" A B Destination:C>I assume this is missing the trailing slashes for A and B. ..wayne.. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.samba.org/pipermail/rsync/attachments/20111020/90ef7ac2/attachment.html>