Amanda-Users

Re: Re : amrecover : unable to find index

2003-05-16 06:27:32
Subject: Re: Re : amrecover : unable to find index
From: Gene Heskett <gene.heskett AT verizon DOT net>
To: cabieces.julien AT wanadoo DOT fr, amanda-users AT amanda DOT org
Date: Fri, 16 May 2003 06:24:46 -0400
On Fri May 16 2003 04:14, Julien CABIECES wrote:
>Joshua-Baker Lepain wrote :
>> > amrecover> setdisk /usr/OTSI
>> > Scanning /var/tmp...
>>
>> It's looking in /var/tmp for your index files, but...
>>
>> > rpm-tmp.69001: skipping cruft file, perhaps you should delete
>> > it. 200 Disk set to /usr/OTSI.
>> > No index records for disk for specified date
>> > If date correct, notify system administrator
>> > --------------------------------------------------------------
>> >---------------------
>> >
>> > I don't understand why it doesn't find my indexes. I have
>> > checked: my indexes are in the directory
>> > /usr/media2i/amanda/infos_sauvegarde/index/localhost/_usr_OTSI
>>
>> They're somewhere else.  Look in your amanda.conf for this setup
>> -- what is 'indexdir' specified as?  Do you perhaps have
>> multiple versions of amanda hanging about (i.e. a vendor
>> installed one and one you compiled)?
>
>indexdir "/usr/media2i/amanda/infos_sauvegarde/index"
>
>How can I checked multiple version , I have done "rpm -qa | grep
> amanda and I have the following things
>
>amanda-server-2.4.2p2-9
>amanda-client-2.4.2p2-9
>amanda-2.4.2p2-9

At risk of starting a flame war here, the number of folks who have 
made the rpms work is relatively miniscule.  Most build from the 
tar.gz.  And version 2.4.2p2 is indeed pretty ancient, the latest 
2.4.4-snapshot_date versions having gained some new features while 
maintaining backwards compatibility.  Get those from Jean-Louis 
M.'s site at umontreal, link near the bottom of the page at 
www.amanda.org.  I'm running the 20030428 version myself.
I highly recommend that you make a script out of your configuration 
options used so that if you ever want to upgrade, the same script 
can be reused, maintaining compatibility with the older version 
each time you do this.

I haven't posted mine for a month or so, and its not too long, so 
here goes again, bearing in mind it needs edited for your devices 
and IP addresses:
----------------------------------
#!/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-tape-device=/dev/nst0 \
        --with-changer-device=/dev/sg1 \
        --with-gnu-ld --prefix=/usr/local \
        --with-debugging=/tmp/amanda-dbg/ \
        --with-tape-server=192.168.71.3 \
        --with-amandahosts \
        --with-configdir=/usr/local/etc/amanda

make
-----------------------------
When this has run to completion, then become root and
#> rpm -e --nodeps `rpm -qa|grep amanda`

Those are backticks above, usually located on the tilde '~' key, and 
you are doing this to get rid of any version conflicts later.

#> make install

And then start configuring things which will live in the 
--with-configdir path shown above.  You could modify that to use 
the old location I suppose, but this directory seems to be fairly 
private and easy to maintain.

>I think they are all different , amanda must be a common base to
> amanda-server and amanda-client. What do you think about that?
> any other amanda.conf files on my system are simple examples (
> saved the files from my previous works )
>
>> > They contain 2 files named 20030507_0.gz and 20030512_1.gz.
>> > This one "20030512_1.gz" (the most recent of the two) contains
>> > the tree : /usr/OTSI.
>> >
>> > My amanda.conf is set with the right path to access index, and
>> > log, ...
>>
>> Ah.  Check for multiple versions.
>>
>> > Something weird, I don't manage to execute "ls". It returns
>> > nothing at all ..!!!
>>
>> Can't execute ls where?  On the tape server?  In some particular
>> directory?  Details.
>
>example :
>
>[root@localhost root]# amrecover media2i
>AMRECOVER Version 2.4.2p2. Contacting server on localhost ...
>220 localhost AMANDA index server (2.4.2p2) ready.
>200 Access OK
>Setting restore date to today (2003-05-16)
>200 Working date set to 2003-05-16.
>200 Config set to media2i.
>501 No index records for host: localhost.localdomain. Invalid?
>Trying localhost.localdomain ...
>501 No index records for host: localhost.localdomain. Invalid?
>Trying localhost ...
>200 Dump host set to localhost.
>Can't determine disk and mount point from $CWD
>amrecover> setdisk /usr/OTSI
>Scanning /var/tmp...
>  rpm-tmp.69001: skipping cruft file, perhaps you should delete
> it. 200 Disk set to /usr/OTSI.
>No index records for disk for specified date
>If date correct, notify system administrator
>amrecover> ls
>amrecover> lpwd
>/root
>amrecover> pwd
>/usr/OTSI
>amrecover> ls
>amrecover>
>
>--> I don't understand really "ls". does it works on the virtual
> file system ( where root is /usr/OTSI ) or on the real system
> file ( where root is "/" )
>
>Thanks for advance
>
>Cabieces Julien

I think this is yet another example of why you should never use 
localhost in the disklist entry, aka the DLE.  Always use the 
machines FQDN.  There may be other reasons it doesn't work, but 
these are known gotcha's that should be eliminated first.

-- 
Cheers, Gene
AMD K6-III@500mhz 320M
Athlon1600XP@1400mhz  512M
99.26% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attornies please note, additions to this message
by Gene Heskett are:
Copyright 2003 by Maurice Eugene Heskett, all rights reserved.