Amanda-Users

Re: How can I split up a large disk partition?

2004-02-05 11:05:24
Subject: Re: How can I split up a large disk partition?
From: stan <stanb AT panix DOT com>
To: amanda-users AT amanda DOT org
Date: Thu, 5 Feb 2004 10:57:03 -0500
On Thu, Feb 05, 2004 at 09:21:16AM -0500, Joshua Baker-LePain wrote:
> On Thu, 5 Feb 2004 at 9:02am, stan wrote
> 
> > On Thu, Feb 05, 2004 at 08:03:16AM -0500, Joshua Baker-LePain wrote:
> > > On Thu, 5 Feb 2004 at 7:49am, stan wrote
> > > 
> > > > Note that for the 2 disks in question, both partial backusp claim 
> > > > identical
> > > > size. I beileve that is because they are assuming the size of the entire
> > > > partion.
> > > > 
> > > > # black ad1s1e comp-user-no-compress 2 local
> > > > black ads1e/ak ad1s1e {
> > > >         include "./[A-K]*"
> > > >         exclude "./[L-z]*"
> > > >         user-tar-no-compress
> > > >         } 2 local
> > > > black ads1e/kz ad1s1e {
> > > >         include "./[L-z]*"
> > > >         user-tar-no-compress
> > > >         } 2 local
> > > >
> > > > And here is teh dumptupe definition:
> > > > 
> > > > define dumptype root-tar {
> > > >     program "GNUTAR"
> > > >     comment "root partitions dumped with tar"
> > > >     compress none
> > > >     index
> > > >     exclude list "/usr/local/lib/amanda/exclude.gtar"
> > > >     priority low
> > > > }
> > > > 
> > > > define dumptype user-tar-no-compress {
> > > >     compress none
> > > >     root-tar
> > > >     comment "user partitions dumped with tar"
> > > >     priority medium
> > > > }
> > > 
> > > The short answer is that order matters.  In your disklist entries (DLEs), 
> > > you specify include, exclude, and then the dumptype.  But the dumptype 
> > > specifies its own exclude (list).  In amanda(8), in the part about 
> > > 'exclude' in the dumptype section, it states that "With  the append 
> > > keyword, the string are appended to the current value of the list, 
> > > without 
> > > it, the string overwrite the list."  IOW, the 'exclude list' line in the 
> > > dumptype is overriding the include and exclude directives in your DLEs.
> > > 
> > > So, change your DLEs to specify the dumptype first.  Then your include 
> > > and 
> > > exclude directives will override those in the dumptype.
> > > 
> > 
> > I'm confused. The dumptype is defined in amanda.conf, and only the disks to
> > backup are defined in the disklist file. I assume that amanda.conf is read
> > first, right? The disks are shown in my email in the oreder that they
> > appear in the disklists file.
> > 
> > Sould I just remove the exclude file line in the dumptape?
> 
> You could, and that would fix it, but you should understand what's going 
> on.  Yes, amanda.conf is read first.  But that's not what I was saying 
> above.  For each DLE, you specify a dumptype.  You can do that simply, by 
> just using one that's in amanda.conf.  Or you can put an entirely new one 
> in braces.  In those braces, just as in amanda.conf, you can include 
> previously-defined dumptypes.
>   
> Read through one of your DLEs line by line, applying directives.  
> In the first one, you 'include "./[A-K]*"', then 'exclude "./[L-z]*"', and 
> then you have the entry for the dumptype.  Logically, amanda continues 
> parsing the DLE by parsing the dumptype you specified.  So your whole DLE 
> looks like this to amanda:
> 
> black ads1e/ak ad1s1e {
>    include "./[A-K]*"
>    exclude "./[L-z]*"
>    compress none                             #NOTE - user-tar starts here
>    program "GNUTAR"                          #...and includes root-tar here
>    comment "root partitions dumped with tar"
>    compress none
>    index
>    exclude list "/usr/local/lib/amanda/exclude.gtar"
>    priority low                              #root-tar ends here
>    comment "user partitions dumped with tar" #this is the rest of user-tar
>    priority medium
> } 2 local
> 
> The 'exlude list', coming after the 'exclude', overrides it.  If, in those 
> braces, you specified user-tar-no-compress before your include and exclude 
> directives, then your 'exclude' would override the 'exclude list'.
> 
> Make any more sense?

Much more sense.

Thanks for taking the time to educate me on this.

-- 
"They that would give up essential liberty for temporary safety deserve
neither liberty nor safety."
                                                -- Benjamin Franklin