Amanda-Users

Re: include/export again

2003-05-23 22:44:08
Subject: Re: include/export again
From: Jon LaBadie <jon AT jgcomp DOT com>
To: amanda-users AT amanda DOT org
Date: Fri, 23 May 2003 22:41:39 -0400
On Sat, May 24, 2003 at 09:49:00AM +0800, Mathias K?rber wrote:
> to specify more clearly my current problem with Amanda's
> include/exclude rules when using GNUTAR, here is what
> I am trying to achieve and my current workaround.
> 
> If someone knows of any better way to do this, I would
> appreciate it.
> Would in-/exclude lists help in this case? Never
> used them. Does anyone have an example configuration?
> 
> One more question regarding wildcards in in-/excludes:
> 
> Should I use
>       "./imap/*
> or    "./imap*" ?
> 
> would the second match
>       ./imap2/...
> files also?
> 
> Without using wildcards, will
>       "./imap"
> or    "./imap/"
> 
> result in the whole subdirectory recursively
> being in-/excluded? Or do I need wildcards
> for that?

If you have the exact name, no wildcards are needed.

        ./imap

will cover either a file named imap, or an entire directory tree
starting with a directory named imap.

You would use something like ./imap* if you had several "imap"
directories, like imap1, imap2, imap-host1, imap-host2, ...

However, all that said, ./imap and ./imap* should both match
a single entity named "imap".  Just the second form will also
match other possible names (and multiples).

BTW, in some earlier mailing you had multiple exclude/include
lines as if they could follow one another.  If that is done
I think you should be adding the modifier "append" as in

        exclude file "./imap"
        exclude file append "./pop3"

I don't think it hurts to have "append" on each line.
This could be especially important if one dumptype includes another
which includes another which ..., and one of them way back happens
to have an exclude (or include) line.

> Here goes, from my disklist:
> 
> # need to do some fancy splitting here as GNUTAR backups
> # cannot include/exclude subdirectories more than one level down
> # (ie., names in {in|ex}clude "./.." directives must begin with "./"
> # and not contain any other '/'. see amanda(1) :-(

I wonder about that last line of the man page.  Where does that caveat
come from?  I'm using an exclude list, and some of the entries have
multiple "/'s".  They are clearly working, I just checked my index files.
Is that a limitation only when the names are given as exclude "file"
but not for entries in an exclude "list"?  If that is the case Mathias,
just switch to using exclude and include "lists".

> #
> # we really want to do this:
> 
> # # all imap related stuff together..
> # localhost imap /var {
> #       comp-high-tar
> #       include "./imap*" "./spool/imap*"
> #       } 4
> # # everything else in /var..
> # localhost var-other /var {
> #       comp-high-tar
> #       exclude "./imap*" "./spool/imap*"
> #       } 4

fqdn-NOT-localhost ImapDirs /var {
        comp-high-tar
        exclude file append *                   # don't know if needed, seems 
logical
        include list "./.imapdirs-listfile"     # unless an include implies 
exclude *
} 4

fqdn-NOT-localhost VarOther /var {
        comp-high-tar
        exclude list "./.imapdirs-listfile"     # seems like it could be the 
same
} 4

And the list file, in the /var directory could be:

   ./imap
   ./spool/imap

-- 
Jon H. LaBadie                  jon AT jgcomp DOT com
 JG Computing
 4455 Province Line Road        (609) 252-0159
 Princeton, NJ  08540-4322      (609) 683-7220 (fax)

<Prev in Thread] Current Thread [Next in Thread>