[Box Backup] Re: Bug#435860: boxbackup-client: AlwaysInclude[File|Dir] is not working as expected

Chris Wilson boxbackup@fluffy.co.uk
Sun, 5 Aug 2007 20:44:14 +0100 (BST)


Hi Andreas,

On Sun, 5 Aug 2007, Andreas Putzo wrote:

>>> If the include/exclude logic can be improved to be aware of
>>> AlwaysIncluded subdirectories i would appreciate this.
>>
>> I wish it were so simple, but because AlwaysInclude*Regex can apply at any
>> point in the tree, it would mean that we always have to scan all the way
>> down the tree. So we'd need another directive like SkipDir(sRegex) to
>> completely exclude descending into a directory and any possibility of
>> files inside it being backed up.
>
> Mmh, true. I wasn't thinking about that because i was using a simple
> ExcludeDir/AlwaysIncludeDir directive without any regex in it.
> After all, i think the current possibilities to define backup locations are
> already powerful enough.

Actually, I don't think they are. There is no way to exclude some files 
inside a location that is AlwaysIncluded. I think an 
Exclude/Include/Exclude/Include type of system would be much better, but I 
don't have time to implement it yet.

> It's just that i got fooled (dumb me :) by the comment
>
> # For example:
> #
> #   ExcludeDir = /home/guest-user
> #   ExcludeFilesRegex = \.(mp3|MP3)$
> #   AlwaysIncludeFile = /home/username/veryimportant.mp3
> #
>
> # In general, Exclude excludes a file or directory, unless the
> # directory is explicitly mentioned in a AlwaysInclude directive.
>
> Perhaps it would be sufficient to be a little more precise on this, eg. 
> that AlwaysIncludeFile = /home/guest-user/veryimportant.mp3 will not 
> work in the above example.

Thanks for pointing that out, I think I've fixed the script that generates 
the bbackupd.conf file to include more accurate comments.

Cheers, Chris.
-- 
_____ __     _
\  __/ / ,__(_)_  | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Perl/SQL/HTML Developer |
\ _/_/_/_//_/___/ | We are GNU-free your mind-and your software |