On Monday 13 January 2014 12:56:52 Andrius D. Ilgunas did opine:

> Thanks a brazillion all!
> 
> There's a lot of good info here that I'll need to take some time to
> digest. Amanda sure is a big sandwich.
> 
A good way to put it in the vernacular, yes it is.

> While I'm processing it all, might someone point me to the syntax of
> what might be called a 'compound DLE' ?
> 
> Instead of something like:
> 
> <code>
> localhost /bin simple-gnutar-local
> </code>
> 
> I've seen some entries with the following format:
> 
> <code>
> host entry_name device_or_directory {
>   dumptype
>   include "regex"
>   exclude [append] "regex"
> }  somenumber someword
> </code>
> 
> Though I haven't deciphered what somenumber and someword mean.  It
> appears that somenumber might be a priority and someword might be the
> authentication method?
>
To use a piece of my disklist:
host     directory              dumptype     spindle#   access
coyote  /usr/pix                coyote-tar      1       local

where coyote is the alias for this machine, contained in /etc/hosts file

directory is that dir on that host

dumptype profile is the name of the stanza to use, contained in
/usr/local/etc/amanda/Daily/amanda.conf.

Spindle# (somenumber) is used to prevent amanda from hammering the same 
physical drive with more than one backup operation at a time as the seek 
times would combine and slow the overall operation much more than the 
serialization this enforces does.

The last (someword) is an indicator to amanda as to whether the host/dir is 
local to this machine, or if leo, it has to go out on the network to find 
this particular host/dir.

coyote  /usr/sbin               comp-coyote-tar 1       local
coyote  /usr/share              comp-coyote-tar 1       local
coyote  /usr/src                comp-coyote-tar 1       local
coyote  /usr/games              comp-coyote-tar 1       local

This next entry (on both machines below, is mainly to pickup the LCNC 
config and nc_files directories in the /home dir of those 2 machines.
IOW, backing up the machine configuration files, and any of my gcode
I've written so I don't have to reinvent those wheels again.

shop    /home                   shop-tar-comp   1       le0

The next 2 entries pickup the machine(host) local amanda database kept 
on each machine.

shop    /usr/lib/amanda         shop-tar-comp   1       le0
shop    /var/lib/amanda         shop-tar-comp   1       le0

And last, pickup the locally installed stuff.

shop    /usr/local              shop-tar-comp   1       le0
lathe   /home                   shop-tar-comp   1       le0
lathe   /usr/local              shop-tar-comp   1       le0
lathe   /usr/lib/amanda         shop-tar-comp   1       le0
lathe   /var/lib/amanda         shop-tar-comp   1       le0

You will not find those dumptype profiles in your amanda.conf as they are 
combination profiles since you can use the existing ones in the 
example/amanda.conf by going to the bottom of that set of defines in your 
amanda.conf, and add your own, including one of the supplied ones by the 
use of an include "string" line in your own.

This is kind of verbose but shows how shop-tar-comp was derived.

define dumptype global {
    comment "Global definitions"
    # This is quite useful for setting global parameters, so you don't have
    # to type them everywhere.  All dumptype definitions in this sample file
    # do include these definitions, either directly or indirectly.
    # There's nothing special about the name `global'; if you create any
    # dumptype that does not contain the word `global' or the name of any
    # other dumptype that contains it, these definitions won't apply.
    # Note that these definitions may be overridden in other
    # dumptypes, if the redefinitions appear *after* the `global'
    # dumptype name.
    # You may want to use this for globally enabling or disabling
    # indexing, recording, etc.  Some examples:
    index yes
    program "GNUTAR"
    auth "bsdtcp"
    #    application "/usr/local/libexec/amanda/application/amgtar"
    #   program "APPLICATION"
    # record no
    ##   tape_splitsize     1G
    ##   split_diskbuffer   "/dumps"
    #   fallback_splitsize  64m

    exclude list "/GenesAmandaHelper-0.61/excludes"
}

define dumptype shop-tar-comp {
        global
        compress client best
}

> Is there a document somewhere that describes this syntax and options
> available?

Man pages are there to clarify, but much of it is in the example tree 
off the root of the tarball if building from a tarball.

And we don't generally advise using a distro's amanda packaging because
the limits of the packaging system muck seriously with amanda's security
profiles.  Specifically, neither rpm nor dpkg can apply the needed suid
settings at install to make amanda run like the tarball build will.

To automate as much of that for me as possible, I carved up a bash script
several years ago, called gh.cf that does all that. First I become root
with a sudo -i, unpack the tarball, then copy this script from the 
/home/amanda directory into the root of the tarball unpack, and then 
execute this script with an 'su amanda -c "./gh.cf"'
without the single quotes. The script:
======cut
#!/bin/sh
# since I'm always forgetting to su amanda...
if [ `whoami` != 'amanda' ]; then
        echo
        echo "!!!!!!!!!!!!!!!!!! Warning !!!!!!!!!!!!!!!!!!!"
        echo "Amanda needs to be configured and built by the"
        echo "user amanda, but must be installed by user root."
        echo
        exit 1
fi
make clean
rm -f config.status config.cache
./configure --with-user=amanda \
        --with-group=disk \
        --with-owner=amanda \
        --with-gnu-ld \
        --prefix=/usr/local/ \
        --with-debugging=/tmp/amanda-dbg/ \
        --with-tape-server=coyote \
        --with-bsdtcp-security --with-amandahosts \
        --with-configdir=/usr/local/etc/amanda \
        --with-gnutar=/bin/tar
echo "sleeping for reading configures warnings"
echo "a make as amanda will continue after 15 seconds..."
sleep 15
make
cut====

Then when that is done, which ends the su amanda state, leaving me as root,
at which point I do the final "make install".  Feel free to modify the
build options to suit your environment.
 
> Again, thanks so much for everybody's responses!  I think I'm off to a
> good start now.
> 
Amanda is a mindset as much as it is a backup/restore method.  It works
very well once you arrive at the amanda mindset. It can take a while though.
> 
> 
> --
> Andrius
> 
> On Mon, Jan 13, 2014 at 2:57 AM, Toomas Aas <[email protected]>wrote:
> > On Sun, 12 Jan 2014 Gene Heskett wrote:
> >> If separate configs, which I can't personally find an overpowering
> >> reason for, you would need,  most likely, two separate tape
> >> "libraries" each containing its own drive(s), or 2 separate big hard
> >> drives.
> > 
> > Actually two separate configs do not require separate tape libraries
> > or drives, just tapes labelled with different "labelstr".

I tried that once with a 4 tape changer Toomas, and gave the girl an 
incurable tummy ache, but that was waaay back up the log in 2.4 days IIRC.
Amanda has matured considerably since. And I've binned the changers, 
broken tinker-toys.

> > By this I don't mean to imply that two separate configs are the best
> > solution for OP.
> > 
> > --
> > Toomas Aas


Cheers, Gene
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

Si jeunesse savait, si vieillesse pouvait.
        [If youth but knew, if old age but could.]
                -- Henri Estienne
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
         law-abiding citizens.

Reply via email to