Amanda-Users

Re: How to label tapes with amanda!

2003-05-27 14:42:28
Subject: Re: How to label tapes with amanda!
From: Gene Heskett <gene.heskett AT verizon DOT net>
To: "Benoit Martin \"Sky Services\"" <bmartin AT skyservices DOT net>, "AMANDA Users" <amanda-users AT amanda DOT org>
Date: Tue, 27 May 2003 10:21:17 -0400
On Tuesday 27 May 2003 07:42, Benoit Martin \ wrote:
>Hi everyone,
>
>First of all, I'm not a unix master at all, I'm trying to install
> and configure amanda on my system, which is a system including 3
> servers, with only one having a tape device.
>
>I don't understand how to label my tapes?
>
There is a labelstr specified in the example amanda.conf, whicxh you 
are free to change, but it basicly is set for I tape label that 
starts with "DailySet1-" with the final 2 characters set for a 
regex search of 00 thru 99.  The fixed part of this string must be 
present in the label block of all tapes amanda can use, or must be 
blank in which case (I haven't tested this personally) it will 
apply the label of the next tape in the sequence to it.  So 
theoreticly if you removed the tape DailySet1-04 for whatever 
reason, and gave it a blank tape when it was expecting 
DailySet1-04, it would label the new tape as DailySet1-04 and use 
it.

Amanda's tape labeling system goes with the 'tapecycle' 
specification you set in amanda.conf so that when you have asked 
her to keep index files, the old index's are removed from the 
system at the same time the tape of that label is overwritten.

>I don't understand either how to start amandad on the clients.
>
>When I do #amcheck DailySet1 on my server, I got this:
>
>bash-2.05$ /usr/sbin/amcheck DailySet1/
>Amanda Tape Server Host Check
>-----------------------------
>Holding disk /var/tmp: 342562 KB disk space available, that's
> plenty ERROR: /dev/st0: not an amanda tape
>       (expecting a new tape)
>NOTE: skipping tape-writable test
>NOTE: info dir /var/lib/amanda/DailySet1/curinfo: does not exist
>NOTE: it will be created on the next run
>NOTE: index dir /var/lib/amanda/DailySet1/index/cfeweb3/_home:
> does not exist
>NOTE: index dir /var/lib/amanda/DailySet1/index/localhost/_etc:
> does not exist

These files will be created in a real amdump run, and are no 
problem.

>Server check took 9.930 seconds
>
>Amanda Backup Client Hosts Check
>--------------------------------
>WARNING: cfeweb3: selfcheck request timed out.  Host down?

The client software will have to be built and installed on each 
client.  There are pretty good readme's in the docs directory on 
that.  We recommend you use the user amanda, so then the 
.amandahosts file will live in the /home/amanda directory of each 
machine, client or server.

>WARNING: localhost: selfcheck request timed out.  Host down?

Two things here.  First, never, ever, use localhost.  Use only the 
FQDN of that machine as contained in its hosts file or in its dns 
records if named is running.  When recovering, a localhost entry 
might be anyplace and it will bite you, usually a couple of feet 
above the ankles.  You may use the one word alias if these are 
properly setup, such as you did in the 'cfeweb3' line above.

The second of course is the same error as the cfeweb3 error, either 
there is no ~/.amandahosts file, its miss-configured, or has bad 
perms.

To the bad perms issue if thats the case, be aware that amanda is to 
be unpacked, configured and made as an ordinary user, amanda will 
chroot itself when it needs run of the system rights.  So you do 
all configuration and maintainance as this user (I have a user 
'amanda', who is a member of the group "disk" so she has sufficient 
rights, which simplifies things for me).  The ONLY time to become 
root is when you are doing the 'make install'.  This automatically 
sets all the perms for you.

>Client check: 2 hosts checked in 29.997 seconds, 2 problems found
>
>(brought to you by Amanda 2.4.2p2)

Thats becomeing a bit ancient now, both the stable and the 
development branches are many, many snapshot dates past the 2.4.4 
and 2.5.0 versions.  These snapshots are backwards compatible with 
2.4.2p2, but have added options and functionality.  See the link 
near the bottom of the page at <http://www.amanda.org> that points 
to a site at UMontreal.edu.  If you are working from an rpm 
install, these install by default in /usr/local, not in /, and you 
will need to rpm -e the whole rpm install to prevent version 
conflicts.

Because so much of amanda's characteristics are controlled by the 
initial configuration, its highly recommended that you commit this 
configuration to a script that can be copied and used to 
(re)configure the next version of amanda should you need to 
update/upgrade your install.

This script would look something like this:
--------------------------
#!/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
------------------------------
The --with-tape-server line really should be the FQDN of that 
machine, but I'm lazy in my old (I'm a senior citizen by several 
years) age.  The --with-configdir is where amanda will be hard 
coded to look for the configuration directory called 'DailySet1' 
unless you've changed that.  And as you can surmise I have a 
changer equipt drive.

None of this is carved in stone, EXCEPT that if a new install is to 
match the present one for seemless continuity, the new one needs to 
be configured exactly like the old one.  I have successfully built 
and used every 2.4.x snapshot Jean-Louis has released over the last 
18 months or so with no surprises once we got the changer sript 
running.

The only changes in this script over that time period has been the 
addition of the whoami preamble someone was so nice as to post here 
some time back, and the servers address which I fiddled with a 
couple of months back because the default local address of the 
linksys router when I put in adsl was on my old network and I 
wanted to keep iptables and a seperate nic between me and the 
blackhats.  Currently running the 2.4.4-20030516 version.

Good luck.  You'll have it if you read the docs.  Amanda is a 
complex piece of software, with a simple directive, protect your 
data.  Given a semi free run of the system she will do her best to 
do exactly that.

[...]

-- 
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.


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