Ignore/keep list processing
robb at canfield.com
Mon Aug 20 19:04:46 UTC 2007
I am in the final stages of adding some ignore/keep processing to
Brackup to support more complex file selection logic and to factor out
ignore lists from the code to an external user specified file. One of
the problems I have encountered is absolute vs. relative file names.
For example if the backup path is '/home/guest' then all files are
(currently) matched with '/home/guest/' removed. So to ignore '.beagle/'
you would use the pattern:
This works fine for per-user configurations. When processing global
include lists that are site wide there is a problem. In this case I am
backing up ALL of /home on behalf of all users. Now the ignore list
needs to be modified to be:
And if '/' is used it must be modified yet again! My goal was to provide
a common ignore list file that is loaded by default for all backup ups
(with custom overrides of course). One way to fix the problem is to
normalize all paths before comparison to their absolute name:
.beagle --> /home/guest/.beagle
Then the pattern becomes:
I am leaning towards using absolute names. This new mechanism would NOT
be used unless the configuration file specifies it should be, thus
preserving backwards compatibility.
The downside is that per-user configurations need to be adjusted to be
absolute instead of relative OR multiple file comparisons need to
happen, which slows things down and introduces some confusing elements
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.danga.com/pipermail/brackup/attachments/20070820/3463bb85/smime-0001.bin
More information about the brackup