anchoring of patterns for per-directory merge files
andy at strugglers.net
Wed Nov 11 10:14:01 MST 2009
I'm extremely confused about anchoring of patterns for per-directory
merge files, as what I see seems to not be the behaviour the
On the receiver side I have rsync version 3.0.3 protocol version
30. On the sender I have rsync version 2.6.9 protocol version 29.
rsync --filter='dir-merge /.rsync-filter' -avz --delete \
--numeric-ids --relative --delete-excluded --sparse --hard-links \
--rsh='/usr/bin/ssh -4 -i /root/.ssh/rsync -q' \
root at corona:/data \
On the sender, I have in the file "/data/home/andy/.rsync-filter":
The documentation leads me to believe that this should exclude a
directory called "tmp/" located only in the same directory as the
merge file. What happens is, nothing gets excluded.
If I use the following content instead:
then every path containing a directory called "tmp/" is excluded.
I found I can also make it more precise by using:
to exclude just the path I wanted. It's workable but I would fear
that somehow a path like this might be matched by chance in a big
So why doesn't "- /tmp/" work?
The documentation also says that if I am confused over what to
exclude, I should just use the path as printed by --dry-run -v and
put a "/" on the start. I tried that:
but this also does not match.
What am I doing wrong?
More information about the rsync