Amanda-Users

Re: amcheck errors

2004-05-28 21:47:11
Subject: Re: amcheck errors
From: Gene Heskett <gene.heskett AT verizon DOT net>
To: amanda-users AT amanda DOT org
Date: Fri, 28 May 2004 21:41:30 -0400
On Friday 28 May 2004 18:34, Fábio Mendonça Albuquerque Cunha wrote:
>Thanks Gene and Marcelo !!!!

My second reply to this post after I'd thought about it a bit.

>I run my backups and it's ok !
>But now, when I try to recover this backup I get this output of
> amrecover:
>
>[root@asterix DailySet1]# amrecover DailySet1
>AMRECOVER Version 2.4.2p2. Contacting server on localhost ...
>220 asterix AMANDA index server (2.4.2p2) ready.
>500 Access not allowed: [access as amanda not allowed from
> root@asterix] amandahostsauth failed
>
>Why amanda is looking for a localhost, if I set up my .amandahosts
> like this :
>
>[root@asterix amanda]# vi .amandahosts
>asterix amanda
>
>Someone could help me with this ?
>
Is this from an rpm install?  The reason I ask is that the 
tape-servers FQDN (in your case localhost) is compiled into amanda 
when its built.

Your initial invocation of amrecover should have looked like this:
[root@coyote root]# amrecover DailySet1
AMRECOVER Version 2.4.5b1-20040510. Contacting server on 
coyote.coyote.den ...
220 coyote AMANDA index server (2.4.5b1-20040510) ready.
200 Access OK
Setting restore date to today (2004-05-28)
200 Working date set to 2004-05-28.
Scanning /dumps...
200 Config set to DailySet1.
501 Host coyote.coyote.den is not in your disklist.
Trying host coyote.coyote.den ...
501 Host coyote.coyote.den is not in your disklist.
Trying host coyote ...
200 Dump host set to coyote.
Trying disk /root ...
$CWD '/root' is on disk '/root' mounted at '/root'.
200 Disk set to /root.
/root
amrecover>

As you can see, it looked for the FQDN of the machine, then finally 
settled for its alias as listed in /etc/hosts.

This is just one of the many reasons one should build amanda from 
scratch, those rpms are broken if 'localhost' is compiled in.  One 
could even say they are drain bamaged. :-)

If thats the case, rpm -e those broken rpms. Then get the latest 
tarball of the 2.4.5b1 series from a link near the bottom of the 
front page at amanda.org.

Configuring and building amanda requires an unpriviledged user, such 
as amanda, who should be a member of some much higher group such as 
disk or backup.

I've had to unpack amanda as root on a few occasions even though I'm 
sitting in the /home/amanda directory when I do the unpack.  In that 
event, while still root, do a 'chown -R amanda:disk 
name-of-amanda-dir' to fix up the perms so amanda can build it.

Here is the script I use, copied into the top level dir the tarball 
unpacks to, and then run as the user amanda here at this hillbillies 
house:
--------------------------
#!/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
# the next 2 lines are in case you've changed something and are
# rebuilding amanda again.
make clean
rm -f config.status config.cache
./configure --with-user=amanda \
        --with-group=disk \
        --with-owner=amanda \
        --with-tape-device=/dev/nst0 \
        --with-changer-device=/dev/sg1 \
        --with-gnu-ld --prefix=/usr/local \
        --with-debugging=/tmp/amanda-dbg/ \
        --with-tape-server=coyote.coyote.den \
        --with-amandahosts \
        --with-configdir=/usr/local/etc/amanda

make
-------------------------------
adjust the tape-server to your machines FQDN.
Delete the changer-device= line if you don't have one.  Set the exec 
bit on this script, and do a './whatever-name-you-gave-it', or use a 
child of sh and do 'sh ./whatever-etc'
This will configure and make amanda, which takes about 3 minutes on 
this machine.  Then become root, and do the 'make install', which 
takes another minute or so.

That will get rid of the localhost stuff as long as you don't have any 
localhosts in your disklist.

Then we can sort your next problems knowing we have a good install to 
work with.

>Regards,
>
>InfraNet Tecnologia
>Fábio M. A. Cunha
>(55 11) 5542-0941 ramal 22
>(55 11) 9603-6377
>www.infranetsp.com.br
>
>On Fri, 28 May 2004 17:16:21 -0400, Gene Heskett <gene> escreveu:
>> De: Gene Heskett <gene>
>> Data: Fri, 28 May 2004 17:16:21 -0400
>> Para: amanda-users AT amanda DOT org
>> Assunto: Re: amcheck errors
>>
>> On Friday 28 May 2004 16:45, Fábio Mendonça Albuquerque Cunha 
wrote:
>> >Hello guys,
>> >It's my first time trying to setup amanda and I am getting this
>> > output when I run amcheck <myconfiguration> :
>> >
>> >Amanda Tape Server Host Check
>> >-----------------------------
>> >Holding disk /var/tmp: 194660 KB disk space available, that's
>> > plenty NOTE: skipping tape-writable test
>> >Tape DailySet101 label ok
>> >Server check took 4.573 seconds
>> >
>> >Amanda Backup Client Hosts Check
>> >--------------------------------
>> >WARNING: localhost: selfcheck request timed out.  Host down?
>> >Client check: 1 host checked in 30.079 seconds, 1 problem found
>>
>> And we are back to the single, most covered in the docs, error. 
>> We don't mean to get short with newbies, but the use of localhost
>> is a no-no.  Please change your disklist entry to use the FQDN of
>> the machine in question.
>>
>> Then, backup just a few days in the archives where I have posted
>> the amanda file that goes in /etc/xinetd.d, and I'll mention that
>> it may be you do not have the /home/(user)/.amandahosts file
>> properly configured.
>>
>> Also, I suspect thats an rpm install, as 2.4.2p2 is getting pretty
>> long in the tooth now.  I'm running 2.4.5b1-20040510 snapshot
>> here.
>>
>> While it is possible to beat the rpm versions around and make them
>> work, generally speaking its a lot easier to build from the
>> tarball, it takes me about 4 minutes to build each new snapshot
>> and install it by use of the scripts I use here.
>>
>> >(brought to you by Amanda 2.4.2p2)
>> >
>> >My OS is Red Hat 8.0
>> >
>> >Some could help me ?
>> >
>> >Regards,
>> >
>> >InfraNet Tecnologia
>> >Fábio M. A. Cunha
>> >(55 11) 5542-0941 ramal 22
>> >(55 11) 9603-6377
>> >www.infranetsp.com.br
>>
>> --
>> 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)
>> 99.23% setiathome rank, not too shabby for a WV hillbilly
>> Yahoo.com attorneys please note, additions to this message
>> by Gene Heskett are:
>> Copyright 2004 by Maurice Eugene Heskett, all rights reserved.

-- 
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)
99.23% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attorneys please note, additions to this message
by Gene Heskett are:
Copyright 2004 by Maurice Eugene Heskett, all rights reserved.

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