Hello, Since the very first day I've been using rsync - some 15 years ago - the filtering rules caused great grieve. Their behaviour is just not the way I'd expect it be be and as I read the manpage. Usually I end up with some hand-written recipes, carefully documented,y including all the gotchas.
This time however I failed and I see no other way than to ask for advice. Given the following structure project/ .rsync-filter project.git/ .git/ Now, the following command (rsync 3.1.1) rsync -av --del --deleted-excluded -F \ /path/to/project/ /path/to/backup/project/ should transfer - sync: project/project.git/.git/ - skip: Everything else in project/project.git/ - sync: Everything else in project/ In other words: Don't transfer the git repo except for .git/ itself. Yes, this means files not checked in are lost, that's by intention. Now, how is .rsync-filter supposed to look? The first of many failing attempts was + *.git/.git/* - *.git/ This however kills the entire project.git/ directory, in violation of "the first matching pattern is acted on". Given previous bad experiences I've tried (using a script) all 128 combination of - line order - '+' or '-' at the start of any line - '*' appended to any line, or not, with without trailing slash but no avail. Any clue? Christoph -- 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