Amanda-Users

Re: Amanda and localhost definition?

2006-04-11 12:37:49
Subject: Re: Amanda and localhost definition?
From: Gene Heskett <gene.heskett AT verizon DOT net>
To: amanda-users AT amanda DOT org
Date: Tue, 11 Apr 2006 12:34:17 -0400
On Tuesday 11 April 2006 11:59, stan wrote:
>I'm setting up a new Ubuntu box as my next generation Amanda server.
>Somehow the /etc/hosts file for this machine was created looking like
> this:
>
>170.85.113.24 localhost.localdomain localhost
>
>At least _I think_ this was what was there. I did not keep a copy, as
> I thought I new how to set up a hosts file. Little did I know :-(

8:{

>I really did not pick up on this for quite some time, Finally i
> tracing down why email from this machine would not work I noticed
> this. So I changed it to:
>
>127.0.0.1       localhost

    address   full_name     alias
wrong, s/b 127.0.0.1 localhost.localdomain localhost

>170.85.113.24   amanda amanda.meadwestvaco.com

wrong, the alias goes after the full domain name string
Also, the 'amanda' needs to be the machines real domain name, matching 
what you get when you run hostname from the cli.  Also, when posting 
addresses that do not resolve from the outside, but are exposed, always 
obfuscate the numerical address for security reasons.

>But now I seem to have confused Amanda, for instance if I run amcheck,
> I get:
>
>Amanda Backup Client Hosts Check
>--------------------------------
>ERROR: amanda: [Can't open exclude file
>'/opt/amanda/lib/gnutar_exclude_list': No such file or directory]
>ERROR: amanda: [could not access /dumpdisk (/dumpdisk): No such file
> or directory]
>ERROR: amanda: [could not access /data_backups (/data_backups): No
> such file or directory]
>
>These are local disk on the Amanda machine (whose name is amanda
> logically enough).
>
>Looking at the backups of the previous machine (which ran  an earlier
> version of Amanda), ( it was a Debian machine BTW). I find that the
> hosts file on it looked like this:
>
>127.0.0.1       localhost
>170.85.109.24   debian debian.meadwestvaco.com
>
>Yes, same IP address, and a different name. I changed that in the DNS
> for clarity.
>
>I guess I really don't know what I am doing here :-(
>
>Can anyone show me the error of my ways?

You'll need to reconfigure and rebuild amanda as either the address, or 
the FQDN of the server needs to be hard-coded into it as you pass it 
the ./configure [argument list]

If you use the FQDN of the server, then it must be resolvable either by 
local dns, or /etc/hosts files.  The below config would be just as 
valid if a set the tape-server set to a 192.168.xxx.xxx address.

Here is the script I've been using for that for some years now:
=====================cut below & paste to your script===========
#!/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 user amanda,"
 echo "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-tapedev="FILE:/amandatapes" \
 --with-debugging=/tmp/amanda-dbg/ \
 --with-tape-server=coyote.coyote.den \
 --with-amandahosts \
 --with-configdir=/usr/local/etc/amanda \
 --with-config=Daily \
 --with-gnutar=/usr/bin/tar

make
========paste cut to your script=================
And modify to suit.  tape-dev and tape-server in particular
All of the above info is hard-coded into amanda as its being built.

-- 
Cheers, Gene
People having trouble with vz bouncing email to me should add the word
'online' between the 'verizon', and the dot which bypasses vz's
stupid bounce rules.  I do use spamassassin too. :-)
Yahoo.com and AOL/TW attorneys please note, additions to the above
message by Gene Heskett are:
Copyright 2006 by Maurice Eugene Heskett, all rights reserved.