PDA

View Full Version : amrecover (invalid service)



chuckiecs
September 26th, 2006, 01:44 PM
Hi there

I have been setting up and testing amanda backup. Have successfully carried out several test backup but cannot get amrecover to work. Keep getting the following error

amrecover -C DailySet1 -t kilbirnie.stagecoach.co.nz -s backup.server.com -d /dev/nst0
AMRECOVER Version 2.5.1. Contacting server on backup.server.com ...
NAK: amindexd: invalid service

I am runnning this on a centos server and have servcice setup for the following amandaidx, amidxtape and amanda.

Have looked at the logs (as per below) but am not getting any headway.

Thanks

CS

amandad: debug 1 pid 4268 ruid 10337 euid 10337: start at Wed Sep 27 08:41:03 2006
security_getdriver(name=BSD) returns 0x45a0e0
amandad: version 2.5.1
amandad: build: VERSION="Amanda-2.5.1"
amandad: BUILT_DATE="Tue Sep 5 13:03:24 PDT 2006"
amandad: BUILT_MACH="Linux rocky.zmanda.com 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:13:01 EST 2006 i686 i686 i386 GNU/Linux"
amandad: CC="gcc"
amandad: CONFIGURE_COMMAND="'./configure' '--build=i386-redhat-linux' '--prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--libexecdir=/usr/lib/amanda' '--datadir=/usr/share' '--sysconfdir=/etc' '--sharedstatedir=/var/lib/amanda' '--localstatedir=/var/lib/amanda' '--libdir=/usr/lib' '--includedir=/usr/include' '--infodir=/usr/info' '--mandir=/usr/share/man' '--with-gnutar=/bin/tar' '--with-gnutar-listdir=/var/lib/amanda/gnutar-lists' '--with-dumperdir=/usr/lib/amanda' '--with-index-server=localhost' '--with-tape-server=localhost' '--with-user=amandabackup' '--with-group=disk' '--with-owner=paddy' '--with-fqdn' '--with-bsd-security' '--with-bsdtcp-security' '--with-bsdudp-security' '--with-ssh-security' '--with-assertions'"
amandad: paths: bindir="/usr/bin" sbindir="/usr/sbin"
amandad: libexecdir="/usr/lib/amanda" mandir="/usr/share/man"
amandad: AMANDA_TMPDIR="/tmp/amanda" AMANDA_DBGDIR="/tmp/amanda"
amandad: CONFIG_DIR="/etc/amanda" DEV_PREFIX="/dev/"
amandad: RDEV_PREFIX="/dev/" DUMP="/sbin/dump"
amandad: RESTORE="/sbin/restore" VDUMP=UNDEF VRESTORE=UNDEF
amandad: XFSDUMP=UNDEF XFSRESTORE=UNDEF VXDUMP=UNDEF VXRESTORE=UNDEF
amandad: SAMBA_CLIENT="/usr/bin/smbclient" GNUTAR="/bin/tar"
amandad: COMPRESS_PATH="/bin/gzip" UNCOMPRESS_PATH="/bin/gzip"
amandad: LPRCMD="/usr/bin/lpr" MAILER="/usr/bin/Mail"
amandad: listed_incr_dir="/var/lib/amanda/gnutar-lists"
amandad: defs: DEFAULT_SERVER="localhost" DEFAULT_CONFIG="DailySet1"
amandad: DEFAULT_TAPE_SERVER="localhost" HAVE_MMAP HAVE_SYSVSHM
amandad: LOCKING=POSIX_FCNTL SETPGRP_VOID ASSERTIONS DEBUG_CODE
amandad: AMANDA_DEBUG_DAYS=4 BSD_SECURITY RSH_SECURITY USE_AMANDAHOSTS
amandad: CLIENT_LOGIN="amandabackup" FORCE_USERID HAVE_GZIP
amandad: COMPRESS_SUFFIX=".gz" COMPRESS_FAST_OPT="--fast"
amandad: COMPRESS_BEST_OPT="--best" UNCOMPRESS_OPT="-dc"
amandad: time 0.000: dgram_recv(dgram=(nil), timeout=4632688, fromaddr=0x1)
amandad: (sockaddr_in *)0x46b070 = { 0, 0, 0.0.0.0 }
security_handleinit(handle=0x942b038, driver=0x45a0e0 (BSD))
amandad: time 0.001: accept recv REQ pkt:
<<<<<
SERVICE amindexd
OPTIONS features=fffffeff9ffeffffff7f;auth=bsd;
>>>>>
amandad: time 0.001: amindexd: invalid service
amandad: time 0.001: sending NAK pkt:
<<<<<
ERROR amindexd: invalid service
>>>>>
amandad: dgram_send_addr(addr=0xbfe968d0, dgram=0x45b084)
amandad: (sockaddr_in *)0xbfe968d0 = { 2, 2563, 127.0.0.1 }
amandad: dgram_send_addr: 0x45b084->socket = 0
security_close(handle=0x942b038, driver=0x45a0e0 (BSD))
amandad: time 30.000: pid 4268 finish time Wed Sep 27 08:41:33 2006

ktill
September 26th, 2006, 01:49 PM
Hi,

changes to .amandahosts file and xinetd.conf files are needed for Amanda 2.5.1 server. Please see:
http://wiki.zmanda.com/index.php/2.5.1_features

especially the last two bullet items.


--Kevin Till
Zmanda

chuckiecs
September 26th, 2006, 02:16 PM
Hi Kevin

Have cmade changes as stated (see below) and reloaded xinetd but still the same.
Thanks for your help.

Regards


service amanda
{
only_from = kilbirnie.stagecoach.co.nz
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = amandabackup
group = disk
groups = yes
server = /usr/lib/amanda/amandad
server_args = -auth=bsd amdump
}

ktill
September 26th, 2006, 02:23 PM
the following is needed on the Amanda 2.5.1 server :

-----
Amanda server (tape server) can be also configured to use "bsd" authentication for restore process - amrecover command. The server_args on the xinetd service entry on the server should include amindexd and amidxtaped. The only_from line should include all clients that can do recovery.

Example of xinetd server entry that used bsd and can do both backup as well as recovery

service amanda
{
only_from = amandaserver.company.com amandaclient.company.com
socket_type = dgram
protocol = udp
wait = yes
user = amandabackup
group = disk
groups = yes
server = /usr/lib/amanda/amandad
server_args = -auth=bsd amdump amindexd amidxtaped
disable = no
}

--------

ktill
September 26th, 2006, 02:25 PM
>>server_args = -auth=bsd amdump amindexd amidxtaped
amdump is not required if the Amanda 2.5.1 server is not to be backed up.

chuckiecs
September 26th, 2006, 02:37 PM
Hi KTILL

Thanks, that fixed the problem. Much appreciated for your help.
;)