[Box Backup] Exclude/Include - what am I doing wrong?

Chris Wilson boxbackup@fluffy.co.uk
Mon, 26 Nov 2007 09:11:57 +0000 (GMT)


Hi Garry,

On Mon, 26 Nov 2007, Garry Glendown wrote:

> I have a drive /data, of which I only want to back up three subdirectories.
> Sure, I could create an entry in the config for each, but would rather keep it
> together (knowing there may be additional directories anytime).
> 
> So I tried something like this:
> 
> >         data
> >         {
> >                 Path = /data
> >                 ExcludeDirsRegex = .*
> >                 ExcludeFilesRegex = .*
> >                 AlwaysIncludeDir = /data/comics
> >                 AlwaysIncludeDir = /data/src
> >                 AlwaysIncludeDir = /data/contrib
> >         }
> Putting the "AlwaysIncludeDir" didn't work, either ... in both cases, no files
> were saved ...

AlwaysIncludeDir will back up the directory, but all the files inside it 
will be excluded by the ExcludeFilesRegex and ExcludeDirsRegex. If you 
add:

  AlwaysIncludeFilesRegex = /data/comics/.*
  AlwaysIncludeDirsRegex = /data/comics/.*

does that help?

> Using "ExcludeDir = /data" followed by the AlwaysIncludeDir statements 
> didn't work either, though this time everything was stored (well, at 
> least it started saving files from the /data directory, so I assume it 
> would have just stored everything ...)

You can't exclude the root directory, it would have no effect.

> What am I doing wrong? The docs don't really give away much info on the 
> way the filters work ... it would be nice if they worked in the way e.g. 
> Cisco routers do access lists ... go through the list, testing for 
> matching patterns - once a pattern matches, the include or exclude is 
> taken ... in my example, I'd just put the AlwaysInclude statements in 
> first, then the Exclude for /data or the Files .* ...

Sorry, yes, I know it could be better and it's one of my plans for the 
next version, but we're about to release 0.11 and I don't want to 
destabilise it right now.

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 |