anchoring of patterns for per-directory merge files
Andy Smith
andy at strugglers.net
Wed Nov 11 10:14:01 MST 2009
Hi,
I'm extremely confused about anchoring of patterns for per-directory
merge files, as what I see seems to not be the behaviour the
documentation suggests.
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.
I'm calling:
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 \
/data/backup/.sync/corona/
On the sender, I have in the file "/data/home/andy/.rsync-filter":
- /tmp/
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:
- tmp/
then every path containing a directory called "tmp/" is excluded.
I found I can also make it more precise by using:
- data/home/andy/tmp/
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
directory tree.
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:
- /data/home/andy/tmp/
but this also does not match.
What am I doing wrong?
Cheers,
Andy
More information about the rsync
mailing list