Amanda-Users

Re: turn off --one-file-system when using tar

2006-09-14 11:41:23
Subject: Re: turn off --one-file-system when using tar
From: Paul Bijnens <paul.bijnens AT xplanation DOT com>
To: amanda-users AT amanda DOT org
Date: Thu, 14 Sep 2006 17:33:24 +0200
On 2006-09-14 16:20, Jon LaBadie wrote:
On Thu, Sep 14, 2006 at 03:56:55PM +0200, Dennis Ortsen wrote:
On Thu, 2006-09-14 at 14:58 +0200, Paul Bijnens wrote:
On 2006-09-14 10:58, Dennis Ortsen wrote:
Hi all,

Is there an option available to turn the --one-file-system option off
in a dumptype config? By default this command line option is parsed to
gnutar when running a backup. Is there an easy way to turn this option
off in a config file?
Curiousity... why would you like/need to do that???

to prevent myself from forgetting to add another DLE for a lower mounted
filesystem.

for instance:

I've got a DLE -> jupiter.domain.org /var/www        tar-med

in /var/www I have several directories, one of them has another
filesystem mounted underneath (logical volume management), for
instance /var/www/rpm

As it is now I have to remember to add a new DLE, but whouldn't this
imply that instead of having /var/www as a DLE, I need to
add /var/www/rpm and all the other directories that are on the same
level as /var/www/rpm?
Like /var/www/insite, /var/www/wiki, /var/www/othersite?


Sounds like my guess was pretty close.

If all the extra mounted file systems are like rpm, mounted just
under /var/www, then you might consider a DLE using wildcards
like this (again, untested)

   jupiter.domain.org /var/www {
        tar-med
        include file "./*"    # may include several mount points
   }

I'd suggest a comment because someone looking at that a year from
now might think "why add the include line, it is redundant".


This is indeed a far better approach than omitting the option
"--one-file-system".

You could create an enormous backup just by someone having
an automounted directory (/net, /home,...) touched minutes before
Amanda starts or just by having the CWD on such place.
Left in a DVD by accident?, or having your 200 Gbyte external USB
disk still connected -- all included.
Mounted snapshots?  All included.
And what if you mount two filesystems in a different place?
So you end up with a fairly large exclude list to avoid all
these exceptions.  And then you will need to change the exclude
list when you change your filesystem.
And we're back to the same problem we tried to avoid :-).

Why not write a little script that looks what is mounted, and
alerts with the differences in disklist.
(Hey, maybe that could even be added to amcheck, which could
classify this as warning only, or only test for this when explicitly
asked.)


--
Paul Bijnens, xplanation Technology Services        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, *
* init 0, kill -9 1, Alt-F4, Ctrl-Alt-Del, AltGr-NumLock, Stop-A, ... *
* ...  "Are you sure?"  ...   YES   ...   Phew ...   I'm out          *
***********************************************************************