[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bacula-devel] FileSet refactoring mockup

Marc Schiffbauer <marc@xxxxxxxxxxxxxxx> writes:

> * Kjetil Torgrim Homme schrieb am 15.10.08 um 13:07 Uhr:
>> you will only have to traverse all filesystems if OneFS is false.
>> sure, it may be slightly tricky to implement a clever cutoff.  e.g.,
>> with
>>   Include { File = "/" }
>>   Exclude {
>>     FileRegex = "/var/(spool|run)/squid"
>>     FileWild = "/home/*/cache" 
>>   }
>> you really don't want to traverse /var/spool/squid to look for files
>> matching /home/*/cache ...  hmm, actually that's pretty easy to
>> implement -- if it matches: no more traversal for you!
> Those are always absolute paths. So if two Exclude statements begin
> with a different directory they will always match different trees.
> Or did I not get the point here?

[EDIT: changed File to FileWild]

well, you could say "/*e/*/cache" as well, there's no prefix to match
against there.  it doesn't really matter, though.  either it matches,
or it doesn't.  there is little to gain from trying to optimise this,
you won't get an early cut-off.  (one exception: patterns ending in a
(redundant) "*", e.g. "/var/*").

in Include, however, it is beneficial -- you'd want to do partial
matches at each level, ie. match "/*e" against toplevel directories
and only recurse into those who match.

(today you can't specify the equivalent of FileWild for Include.
"wildfile" *restricts* the files to backup inside the directories
listed by File, and File can only contain absolute pathnames.)

>> here are two additional rules I think Marc implied:
>>     * All Include sections are evaluated before the Exclude section.
> Right!
> Or with other words: For every directory or file that is scanned
> because of an Include statement, all Exclude patterns have to to be
> applied to it, and if one matches that directory or file will be
> dropped from the list and not backed up.

that's much clearer.

regards,          | Redpill  _
Kjetil T. Homme   | Linpro  (_)

This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
Bacula-devel mailing list

This mailing list archive is a service of Copilotco.