Yet another filter question
kmk at sanitarium.net
Tue May 3 20:29:51 UTC 2016
(you probably want to add --prune-empty-dirs)
Also, when debugging filters/excludes use -vv as it will tell you which
pattern is causing it to do what.
Also, there is no point in using -v without --itemize-changes.
On 05/03/2016 04:07 PM, Christoph Biedl wrote:
> 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
> Given the following structure
> 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?
Kevin Korb Phone: (407) 252-6853
Systems Administrator Internet:
FutureQuest, Inc. Kevin at FutureQuest.net (work)
Orlando, Florida kmk at sanitarium.net (personal)
Web page: http://www.sanitarium.net/
PGP public key available on web site.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 181 bytes
Desc: OpenPGP digital signature
More information about the rsync