multiple sources and excludes

neilsort-rsync at neilsort-rsync at
Tue Oct 18 14:21:13 MDT 2011

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:


Source B:


.rsync-include on A says:
+ *.zip

.rsync-include on B says:
- **

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 in B moved into Destination. However, instead I'm getting 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.

More information about the rsync mailing list