Amanda-Users

Re: amrecover setup issues -- 2.5.1p3 on Solaris 9

2007-03-13 15:19:36
Subject: Re: amrecover setup issues -- 2.5.1p3 on Solaris 9
From: Jean-Louis Martineau <martineau AT zmanda DOT com>
To: Chris Hoogendyk <hoogendyk AT bio.umass DOT edu>
Date: Tue, 13 Mar 2007 15:11:01 -0400
Read the ReleaseNotes and docs/howto-auth.txt

You can disable the amindexd and amidxtaped services, they are not use by newer amrecover. You must add '-auth=bsd amdump amindexd amidxtaped' as argument to amandad in your inetd.conf file.
Alternatively, you can use amrecover with ssh, read the doc.

Jean-Louis

Chris Hoogendyk wrote:
this is kind of embarrassing -- probably something simple.

I've been running backups successfully for a while and even built a
wrapper for ufsdump with snapshots. Now I need to do a recovery.
Actually, a faculty member deleted an important data folder by mistake;
and, although I'm not officially in production yet, I have a backup of
the lost data. However, when I run amrecover, I get:

# amrecover -C daily AMRECOVER Version 2.5.1p3. Contacting server on mormyrid ...
  NAK: amindexd: invalid service

I am running amrecover on the backup server itself, with the intention
of recovering just the specific folder of data to a local partition and
then scp'ing it back to the server where it is needed after checking it.
The backup server has the full amanda install and backs up its own
system partitions. So everything I am doing for this recover should be
completely contained on the backup server, although the data on the tape
came from a different server. I thought this recovery path would be
simpler than working on completing the client setups on the other
servers (which I have to do at some point soon). By the way, this is all
on a private backside network.

I have, in /etc/services:

  amanda          10080/udp
  amindexd        10082/tcp
  amidxtaped      10083/tcp

I have, in /etc/inetd.conf:

amanda dgram udp wait amanda /usr/local/libexec/amandad amandad amindexd stream tcp nowait amanda /usr/local/libexec/amindexd amindexd amidxtaped stream tcp nowait amanda /usr/local/libexec/amidxtaped amidxtaped

I have, in /usr/local/etc/amanda/.amandahosts:

  mormyrid amanda amdump
  mormyrid.bio.mor.nsm amanda amdump
  mormyrid root amindexd amidxtaped
  mormyrid.bio.mor.nsm root amindexd amidxtaped
  marlin.bio.mor.nsm root amindexd amidxtaped
  snapper.bio.mor.nsm root amindexd amidxtaped
  pilot.bio.mor.nsm root amindexd amidxtaped

(I've tried it both with and without the simple unqualified server name,
in addition to the fully qualified)

I have, in /etc/hosts.allow:

  ALL:localhost
  sshd: 172.30.55.19 172.30.55.22 172.30.55.31 172.30.48.31
  amanda: 172.30.55.19 172.30.55.22 172.30.55.31 172.30.48.31 172.30.52.128
  amindexd: 172.30.55.19 172.30.55.22 172.30.55.31 172.30.48.31
172.30.52.128
  amidxtaped: 172.30.55.19 172.30.55.22 172.30.55.31 172.30.48.31
172.30.52.128

(I added the last IP, which is the backup server itself, to see if it
made any difference, even though, typically, the localhost entry covers
everything.)

I have, in /usr/local/etc/amanda/daily/disklist

  mormyrid.bio.mor.nsm    /       local-dump
  mormyrid.bio.mor.nsm    /usr/local      local-dump

  pilot.bio.mor.nsm       /       ssh-dump
  pilot.bio.mor.nsm       /var    ssh-dump
  pilot.bio.mor.nsm       /usr/local      ssh-dump
  pilot.bio.mor.nsm       /export/home    ssh-dump

  snapper.bio.mor.nsm     /       ssh-dump
  snapper.bio.mor.nsm     /usr/local      ssh-dump
  snapper.bio.mor.nsm     /usr/local/apache/share ssh-dump
  snapper.bio.mor.nsm     /usr/local/apache/logs  ssh-dump
snapper.bio.mor.nsm /usr/local/apache/share/htdocs/genetrack ssh-dump
  snapper.bio.mor.nsm     /usr/local/apache/share/htdocs/courses  ssh-dump
  snapper.bio.mor.nsm     /usr/local/mysql/data   ssh-dump
  snapper.bio.mor.nsm     /u1/home        ssh-dump
  snapper.bio.mor.nsm     /u1/home/bio    ssh-dump
  <snip a gazillion further entries -- ok, maybe 100 ;-) >

Yup, I dumped the gazillion dump types that were in the default
amanda.conf. The above 2 types I defined as:

  define dumptype local-dump {
      comment "Chris standard dump for Solaris servers"
      compress server fast
      index yes
  }
define dumptype ssh-dump {
      local-dump
      comment "Chris standard with ssh connection for Solaris servers"
      auth "ssh"
      ssh_keys "/usr/local/etc/amanda/.ssh/id_rsa_amdump"
  }

I have, in /etc/hosts

  127.0.0.1       localhost       loghost
  172.30.52.128   mormyrid        mormyrid.bio.mor.nsm
  172.30.55.19    marlin  marlin.bio.mor.nsm
  172.30.55.22    snapper snapper.bio.mor.nsm
  172.30.55.31    pilot   pilot.bio.mor.nsm

I have, in /etc/netmasks

  172.30.52.0     255.255.248.0

I'm not seeing any errors in /var/adm/messages, where daemon logging goes.

Amanda generates a bunch of debug stuff, but it doesn't seem to tell me
what's up:

# pwd
/tmp/amanda/amandad
# more amandad.20070313113104.debug

amandad: debug 1 pid 28453 ruid 555 euid 555: start at Tue Mar 13
11:31:04 2007
security_getdriver(name=BSD) returns ff343980
amandad: version 2.5.1p3
amandad: build: VERSION="Amanda-2.5.1p3"
amandad:        BUILT_DATE="Fri Feb 16 14:56:40 EST 2007"
amandad:        BUILT_MACH="SunOS mormyrid 5.9 Generic_118558-35 sun4u
sparc SUNW,Ultra-250"
amandad:        CC="gcc"
amandad:        CONFIGURE_COMMAND="'./configure' '--with-user=amanda'
'--with-group=amanda' '--with-gnutar=/
usr/local/etc/amanda/tools/gtar' '--with-ssh-security'"
amandad: paths: bindir="/usr/local/bin" sbindir="/usr/local/sbin"
amandad:        libexecdir="/usr/local/libexec" mandir="/usr/local/man"
amandad:        AMANDA_TMPDIR="/tmp/amanda" AMANDA_DBGDIR="/tmp/amanda"
amandad:        CONFIG_DIR="/usr/local/etc/amanda" DEV_PREFIX="/dev/dsk/"
amandad:        RDEV_PREFIX="/dev/rdsk/"
amandad:        DUMP="/usr/local/etc/amanda/tools/ufsdump"
amandad:        RESTORE="/usr/sbin/ufsrestore" VDUMP=UNDEF VRESTORE=UNDEF
amandad:        XFSDUMP=UNDEF XFSRESTORE=UNDEF VXDUMP=UNDEF VXRESTORE=UNDEF
amandad:        SAMBA_CLIENT=UNDEF GNUTAR="/usr/local/etc/amanda/tools/gtar"
amandad:        COMPRESS_PATH="/usr/bin/gzip"
amandad:        UNCOMPRESS_PATH="/usr/bin/gzip" LPRCMD="/usr/bin/lp"
amandad:        MAILER="/usr/bin/mailx"
amandad:        listed_incr_dir="/usr/local/var/amanda/gnutar-lists"
amandad: defs:  DEFAULT_SERVER="mormyrid" DEFAULT_CONFIG="DailySet1"
amandad:        DEFAULT_TAPE_SERVER="mormyrid" HAVE_MMAP HAVE_SYSVSHM
amandad:        LOCKING=POSIX_FCNTL SETPGRP_VOID DEBUG_CODE
amandad:        AMANDA_DEBUG_DAYS=4 BSD_SECURITY RSH_SECURITY
USE_AMANDAHOSTS
amandad:        CLIENT_LOGIN="amanda" 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=ff343d70, timeout=0,
fromaddr=ff353d5c)
amandad: time 0.001: (sockaddr_in *)ff353d5c = { 2, 732, 172.30.52.128 }
security_handleinit(handle=285a0, driver=ff343980 (BSD))
amandad: time 0.004: accept recv REQ pkt:
<<<<<
SERVICE amindexd
OPTIONS features=fffffeff9ffeffffff7f;auth=bsd;
amandad: time 0.004: amindexd: invalid service
amandad: time 0.004: sending NAK pkt:
<<<<<
ERROR amindexd: invalid service
amandad: dgram_send_addr(addr=ffbff8c8, dgram=ff343d70)
amandad: time 0.004: (sockaddr_in *)ffbff8c8 = { 2, 732, 172.30.52.128 }
amandad: dgram_send_addr: ff343d70->socket = 0
security_close(handle=285a0, driver=ff343980 (BSD))
amandad: time 30.005: pid 28453 finish time Tue Mar 13 11:31:34 2007

# cd ../client
# ls
daily
# cd daily
# pwd
/tmp/amanda/client/daily
# ls
amrecover.20070313113104.debug
# more amrecover.20070313113104.debug

amrecover: debug 1 pid 28452 ruid 0 euid 0: start at Tue Mar 13 11:31:04
2007
Could not open conf file "/usr/local/etc/amanda/amanda-client.conf": No
such file or directory
Could not open conf file
"/usr/local/etc/amanda/daily/amanda-client.conf": No such file or directory
amrecover: debug 1 pid 28452 ruid 0 euid 0: rename at Tue Mar 13
11:31:04 2007
security_getdriver(name=bsd) returns ff343980
security_handleinit(handle=3d900, driver=ff343980 (BSD))
amrecover: bind_portrange2: Try  port 732: Available   - Success
amrecover: dgram_bind: socket bound to 0.0.0.0.732
amrecover: dgram_send_addr(addr=ffbff978, dgram=ff343d70)
amrecover: (sockaddr_in *)ffbff978 = { 2, 10080, 172.30.52.128 }
amrecover: dgram_send_addr: ff343d70->socket = 4
amrecover: dgram_recv(dgram=ff343d70, timeout=0, fromaddr=ff353d5c)
amrecover: (sockaddr_in *)ff353d5c = { 2, 10080, 172.30.52.128 }
security_close(handle=3d900, driver=ff343980 (BSD))

#


I'm assuming that, since I am on the backup server itself, and it can
access the full amanda.conf in /usr/local/etc/amanda/daily, I therefore
don't need the amanda-client.conf. I do see that error in the amrecover
debug, but I figured it is just letting me know and will then use the
amanda.conf. Anyway, it doesn't seem like that would cause the invalid
service, especially since it does then proceed with what looks like an
attempt to make a connection.

I used the quick setup directions on the zmanda wiki, and have prowled
and searched the rest of the wiki and the web for additional information
as needed.

TIA


---------------

Chris Hoogendyk

-
   O__  ---- Systems Administrator
  c/ /'_ --- Biology & Geology Departments
 (*) \(*) -- 140 Morrill Science Center
~~~~~~~~~~ - University of Massachusetts, Amherst
<hoogendyk AT bio.umass DOT edu>

---------------
Erdös 4




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