Problems: amanda and amstatus

Amanda is a valuable backup program I have used for years on earlier SuSE versions, although I cannot claim expertise in its installation. At the moment, on SuSE 11.4, I am trying to use amanda to back up files on the SuSE 11.4 system server. I have a general symptom that it seems to run, but does not actually back up to tape. Sorry to be vague — any amanda experts out there using the distribution 11.4 amanda successfully?

One specific symptom: amstatus does not work:

su amanda

> amstatus DailySet1
Can’t exec “-eo”: No such file or directory at /usr/lib/perl5/vendor_perl/5.12.3/Amanda/Process.pm line 177.
-eo pid,ppid,command: No such file or directory at /usr/lib/perl5/vendor_perl/5.12.3/Amanda/Process.pm line 177.

This seems to compare with a discussion at:
#552390 - amstatus: Can’t exec “-eo”: No such file or directory - Debian Bug report logs](http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=552390)
where it was suggested that “For some reason /bin/ps was not picked up during the configuration and so
/usr/lib/amanda/perl/Amanda/Constants.pm is distributed broken”.
In that forum the suggested solution was:
I’ve just change in /usr/lib/amanda/perl/Amanda/Constants.pm
$PS = “”;
into
$PS = “/bin/ps”;
and it works.
However, in this distribution there is no /usr/lib/amanda/perl/Amanda/Constants.pm.

I am not an amanda or perl expert. Any suggestions?

Back again …

In SuSE 11.4, I found Constants.pm at /usr/lib/perl5/vendor_perl/5.12.3/Amanda/Constants.pm.

At line 83, we had:
$PS = “”;
which I changed to:
$PS = “/bin/ps”;

and now my amstatus seems to work OK.

Except that it is telling me what I thought — that all my 21 off entries, at level 0, correspond to 1k of backup — which I believe implies nothing was backed up! Confirmed by:

SUMMARY part real estimated
size size
partition : 21
estimated : 21 672k
flush : 0 0k
failed : 0 0k ( 0.00%)
wait for dumping: 0 0k ( 0.00%)
dumping to tape : 0 0k ( 0.00%)
dumping : 0 0k 0k ( 0.00%) ( 0.00%)
dumped : 21 21k 672k ( 3.12%) ( 3.12%)
wait for writing: 0 0k 0k ( 0.00%) ( 0.00%)
wait to flush : 0 0k 0k (100.00%) ( 0.00%)
writing to tape : 0 0k 0k ( 0.00%) ( 0.00%)
failed to tape : 0 0k 0k ( 0.00%) ( 0.00%)
taped : 21 21k 672k ( 3.12%) ( 3.12%)
tape 1 : 21 21k 672k ( 0.00%) TAPE08 (21 chunks)

Can anyone help?

Hi acllee,

I’ve had the same problem here with the new 11.4.
Some debugging leads me to the point that the tar 1.25, which is delivered with OpenSuSE 11.4, is INCOMPATIBLE with amanda.

According to http://wiki.zmanda.com/index.php/FAQ:What_versions_of_GNU_Tar_are_Amanda-compatible%3F we have to use tar 1.26.

Please note the note 6) on this page! This describes exactly, what is happening here!

After downloading the source and compiling it here, my amanda is working now.

Hope this helps…


Greetings

Tom

Tom:

Thanks for your debugging efforts, and thanks for taking the
trouble to post in — for myself, and for others!

I would never have found the tar problem, especially as the
zmanda wiki installation details at:
http://wiki.zmanda.com/index.php/Installation/Amanda’s_Requirements
merely says you need GNU tar at 1.15 or later. However, I
guess this is new, and humans are allowed to make errors!

How did you install the updated tar? Did you merely replace
the original system executable with the compiled tar 1.26, or
(like me) did you add a prefixing directory address to the PATH
for the user (myself) who will invoke amanda via su? I am now a
little nervous about a system-wide tar replacement, in case it
introduces other problems to the distribution. I would rather
SuSE got around to its replacement.

So we see two problems: a need to modify
…/Amanda/Constants.pm, and a need to change to tar 1.15. Did
you notify SuSE? If not, do you want me to do so?

In practice:

  1. Did those two changes permit the distributed amanda to
    work properly, or were further tweaks needed?

  2. If you install Samba, does this permit backup of external
    PCs? Win XP? Win Vista? Win 7? 64-bit?

  3. I see the amanda package being distributed is
    2.6.1.1-13.7. I assume this means it is based on amanda
    2.6.1. From Amanda Network Backup: Open Source Backup for Linux, Windows, UNIX and OS X I see the current stable
    amanda version is 3.2.2 — there seems to be quite a
    discrepancy. If you can use SuSE-based amanda to back up
    PCs, as well as the SuSE system, what versions of PC-based
    amanda did you use on the client PCs?

At:
http://wiki.zmanda.com/index.php/GSWA/Build_a_Basic_Configuration
under “Oh Noes!” it says: “Using an older version of Amanda.
Amanda came a long way from 2.4.x or even 2.5.x to 3.2.x, and
the older versions are just downright cranky and hard to use.
Upgrade”. To me, this sounds like good advice, especially if
you eventually need to find compatible amandas for various PC
types.

Many years ago I attempted to use my SuSE 9.3 distribution to
install amanda, and failed. Eventually I called in a consultant
expert who specialised in installing amanda backup for mixed
environments. He also failed to get it working under SuSE 9.3.
However, he installed a separate UNIX box for me running amanda
and my DAT drive, and I was able to back my UNIX system and all
the PCs in the house. Bliss. Until I upgraded my PC; I seem to
remember there was some issue with Samba and new-fangled 64-bit
OS PCs. Anyway, I upgraded my main UNIX system to SuSE 11.1 (I
don’t upgrade too often), and eventually managed to get SuSE to
back up itself — but I never got the PCs backed up again.
Now, at SuSE 11.4 I have problems again.

The real problem is that with an rpm it’s great if it all
works, but disaster if it doesn’t — you have no installation
information, and can only trial and error, with lots to go
wrong.

So I have become a little disenchanted with amanda by rpm, and
have been attempting to install amanda 3.2.2 by direct
compilation of source. I run my UNIX system with a system HDD,
and a separate RAID5 system for everything else. I try to
install specialised software on the RAID, in the hopes that it
will survive SuSE distribution changes. Needless to say, this
is also causing me problems.

The main difficulty seems to be that I cannot find a complete
description of amanda installation anywhere — merely isolated
hints in totally separated documents. It’s the simple things,
eg do we still need an amandahosts file (I assume so; where
should it go?), amanda 3.2.2 seems to have differently named .conf
files for server and client — do I need both when backing up
just the server system? etc etc. I guess this is just newbie
questions, but a lot of details are leaving me lost.

Do you know where I should go for reasonably complete
installation details? Do you have experience of compiling and
installing amanda from source?

Hope you can advise.

Tony

Hi Tony,

I did the configure; make; make install way like in the README file.
Tar installs then in /usr/local/bin/tar. Amanda uses the tar executable /bin/tar, so I had to make it an symbolic link to /usr/local/bin/tar.
So my solution is for the whole system.

I think the Constants.pm thing is already known at SuSE. Because it is there since some versions before 11.4.
But it isn’t SuSE specific. It’s more a thing to report to the Amanda team.
The tar dependency seems new for me and I couldn’t find it in the actual bug list at bugzilla. No, I didn’t notify SuSE about that. If you like, you can do that…

All I can remember were these two things.

I do not backup external PCs this way. Don’t know…

I’m using Amanda since many years on several SuSE versions to backup some servers at work and home. Maybe the oldest in use is about 9.something. I never had any problems with amanda but the two above shown.

You need it.
It contains the hosts, that are allowed to connect to the local amanda process by the network. At least a “localhost” has to be there. The file has to be in the home directory of the amanda user.

I don’t use any 3.x version here.

No and No.
There are many HowTo’s for Amanda around the web. I always find any needed information by Google.

It is on bugzilla now. Perhaps readers of this thread could go and vote for it?

I finally got the SuSE distributed amanda working, and also managed to
back up Win XP and Vista Home Edition files. I attach details, which
might be helpful to some.

  1. First, an apology to SuSE. Their distribution does include
    documentation at:
    /usr/share/doc/packages/amanda/amanda-howto-collection.pdf
    Although, strictly, this is for amanda 2.5.0, it is sufficiently
    relevant to SuSE 11.4’s amanda 2.6.1.1-13.7 to be useful. It’s a lot
    easier with documentation!

  2. We need the changes discussed above:
    mozart:/etc> type ps
    ps is /bin/ps
    In SuSE 11.4, Constants.pm is at
    /usr/lib/perl5/vendor_perl/5.12.3/Amanda/Constants.pm
    At line 83, it had:
    $PS = “”;
    which should be changed to:
    $PS = “/bin/ps”;

In addition, OpenSuSE 11.4’s originally distributed gnu tar 1.25 is
incompatible with amanda, and should be replaced with gnu tar 1.26.

  1. I found some of the documentation confusing, so include files that
    worked. First the files under xinetd.d:
    -------8<---------/etc/xinetd.d/amanda-----------8<-------

default: off

description: Amanda backup client

service amanda
{
socket_type = dgram
protocol = udp
wait = yes
user = amanda
group = amanda
server = /usr/lib/amanda/amandad
server_args = -auth=bsdudp amdump amindexd amidxtaped
}
--------8<---------/etc/xinetd.d/amandaidx-----------8<-------

default: off

description: Amanda backup server with indexing capabilities

service amandaidx
{
socket_type = stream
protocol = tcp
wait = no
user = amanda
group = amanda
server = /usr/lib/amanda/amindexd
}
--------8<---------/etc/xinetd.d/amidxtape-----------8<--------

default: off

description: Amanda backup server with indexing capabilities

service amidxtape
{
socket_type = stream
protocol = tcp
wait = no
user = amanda
group = amanda
server = /usr/lib/amanda/amidxtaped
}
----------8<--------------------8<----------
Note that in the above files “server” refers to server CODE. In the
.conf files, below, “server” relates to the server machine NAME.
Amanda needs both amanda.conf and amanda-client.conf, even where it
is only server machine files being backed up. Note that the “auth”
(here bsdudp) must be consistent between xinetd.d files and .conf files:
—8<---------/etc/amanda/DailySet1/amanda-client.conf-----------8<—
conf “DailySet1”
client_username “mozart”
index_server “mozart” # your amindexd server
tape_server “mozart” # your amidxtaped server
tapedev “/dev/nst0”
auth “bsdudp”
gnutar_list_dir “/raid/var/admin/amanda/DailySet1/gnutar-lists”
amandates “/raid/var/admin/amanda/DailySet1/amandates”

      ----------8&lt;--------------------8&lt;----------

There are many examples of amanda.conf file around, so this is an
abbreviated version:
----------8<----------/etc/amanda/DailySet1/amanda.conf----------8<----------
org “DailySet1” # your organization name for reports
mailto “xxxxx” # space separated list of operators at your site
dumpuser “amanda” # the user to run dumps under
inparallel 4 # maximum dumpers that will run in parallel (max 63)
netusage 800 Kbps # maximum net bandwidth for Amanda, in KB per sec
dumpcycle 14 days # the number of days in the normal dump cycle
runspercycle 14 # the number of amdump runs in dumpcycle days
tapecycle 15 tapes # the number of tapes in rotation
bumpsize 20 Mb # minimum savings (threshold) to bump level 1 → 2
bumpdays 1 # minimum days at each level
bumpmult 4 # threshold = bumpsize * bumpmult^(level-1)
etimeout 300 # number of seconds per filesystem for estimates.
dtimeout 1800 # number of idle seconds before a dump is aborted.
ctimeout 30 # maximum number of seconds that amcheck waits for each client host

runtapes 1 # number of tapes to be used in a single run of amdump
tapedev “tape:/dev/nst0” # the no-rewind tape device to be used
tapetype C5683A # what kind of tape it is (see tapetypes below)
labelstr “^TAPE[0-9][0-9]*$” # label constraint regex: all tapes must match

holdingdisk hd1 {
comment “main holding disk”
directory “/raid/holding”
}
reserve 30 # percent

infofile “/raid/var/admin/amanda/DailySet1/curinfo” # database DIRECTORY
logdir “/raid/var/admin/amanda/DailySet1” # log directory
indexdir “/raid/var/admin/amanda/DailySet1/index” # index directory
tapelist “/raid/var/admin/amanda/DailySet1/tapelist” # list of used tapes

tapelist is stored, by default, in the directory that contains amanda.conf

for tapetype C5683A length was 19488 mbytes. Reduce by 7%.

define tapetype C5683A {
length 18124 mbytes
filemark 538 kbytes
speed 3073 kbytes
}

define dumptype global {
comment “Global definitions”
auth “bsdudp” # NB AUTH.
}

define dumptype root-tar {
global
program “GNUTAR”
comment “root partitions dumped with tar”
compress none
index
exclude list “/usr/lib/amanda/exclude.gtar”
priority low
}

define dumptype user-tar {
root-tar
comment “user partitions dumped with tar”
priority medium
}

define dumptype comp-user-tar {
user-tar
program “GNUTAR”
comment “partitions dumped with tar”
compress client fast
index
exclude list “./amanda.exclude”
priority medium
}

for Samba shares

define dumptype comp-user-tar-samba {
global
program “GNUTAR”
comment “SAMBA partitions dumped with tar”
# options no-compress, index
priority medium
}

define interface local {
comment “a local disk”
use 1000 kbps
}

define interface eth0 {
comment “100 Mbps ethernet”
use 8000 kbps
}

-------8<----------/var/lib/amanda/.amandahosts----------8<-----
localhost amanda
mozart amanda amindexd amidxtaped
localhost root amindexd amidxtaped
ronnie amandabackup
vivaldi amandabackup

      ----------8&lt;--------------------8&lt;----------

amandapass provided passwords associated with Samba shares on PCs:
----------8<-----------/etc/amandapass---------8<----------
//ronnie/300d_00000 amandabackup%ronnie_amanda_password
[etc etc]
//vivaldi/users amandabackup%vivaldi_amanda_password
[etc etc]

      ----------8&lt;--------------------8&lt;----------
  1. Installation of amanda on the WinXP and Vista system was achieved
    using zmanda community edition packages from:
    Download Amanda Network Backup - Pre Packaged and Tested
    of ZWC-Community-2.6.1-32bit.zip and ZWC-Community-2.6.1-64bit.zip
    respectively. During installation this automatically sets up a user
    amandabackup, and asks for the associated password. It all seemed to
    work without fuss.

  2. One final point: for some reason, to get amrestore working properly,
    on the SuSE server I had to:

chown amanda:amanda /dev/nst0

Hope all this is helpful — it may look obvious, but some of the
documentation ambiguities meant a lot of trial and error!