Amanda-Users

Re: include vs. exclude?

2003-09-09 03:52:21
Subject: Re: include vs. exclude?
From: Paul Bijnens <paul.bijnens AT xplanation DOT com>
To: Eric Sproul <esproul AT ntelos DOT net>
Date: Tue, 09 Sep 2003 09:46:14 +0200
Eric Sproul wrote:

OK, time to specify the include (the mountpoint of /dev/md4 is
/var/lib/mysql):

monty  md4  {
            comp-user-tar
            include "./.backup"
            } 0

Will the above statement include *only* the directory "./.backup",
implicitly excluding everything else, or do I need to append an exclude
of "./*"?  If I do have to specify both include and exclude, does the
order matter?

Short answer:  yes, only ./.backup will be backed up, implicitely
including everything.

First remember that "include/exclude" only works for GNUTAR backups.
Amanda construct the gnutar command line as follows.
For gnutar the 'md4' name is replaced by the directory name first.
Then other options are added, and finally, if there is no include
statement a dot is append like:

  gnutar --create --file - --directory /var/lib/mysql ... --totals \
                --exclude-from /tmp/name .

If you specified an "include" directive, then instead of the trailing
dot amanda uses the --files-from gnutar option:

  gnutar --create --file - --directory /...   ... --totals \
                --exclude-from /... --files-from /...

The argument of files-from is generated at runtime. The --files-from
option itself in gnutar does not do wildcard expansion; amanda will do that for you instead (one level deep only).

You see from the above that excludes are compatible with includes too.
The order in the DLE does not matter.

Instead of specifying the disk partition, I specify the directoryname
(amanda has to convert it anyway).  So you DLE becomes

  monty  /var/lib/mysql  {
              comp-user-tar
              include "./.backup"
              } 0

And now it becomes obvious that you can say just as well:

  monty  /var/lib/mysql/.backup  comp-user-tar  0

But, yes, the include would work too.

--
Paul Bijnens, Xplanation                            Tel  +32 16 397.511
Technologielaan 21 bus 2, B-3001 Leuven, BELGIUM    Fax  +32 16 397.512
http://www.xplanation.com/          email:  Paul.Bijnens AT xplanation DOT com
***********************************************************************
* I think I've got the hang of it now:  exit, ^D, ^C, ^\, ^Z, ^Q, F6, *
* quit,  ZZ, :q, :q!,  M-Z, ^X^C,  logoff, logout, close, bye,  /bye, *
* stop, end, F3, ~., ^]c, +++ ATH, disconnect, halt,  abort,  hangup, *
* PF4, F20, ^X^X, :D::D, KJOB, F14-f-e, F8-e,  kill -1 $$,  shutdown, *
* kill -9 1,  Alt-F4,  Ctrl-Alt-Del,  AltGr-NumLock,  Stop-A,  ...    *
* ...  "Are you sure?"  ...   YES   ...   Phew ...   I'm out          *
***********************************************************************



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