> Jerlique Bahn wrote: > >>> I have recently configured Amanda to backup our data. I am now trying > >> to > >>> restore some of the data that I have backed up, and I am having > problems > >>> doing so. The client and server are the same machine. I have chg- > manual > >>> configured so that the first and last slot are both 1. I am running > >>> amrecover as root. I am guessing that its because the changer think > that > >> it needs a different tape, but I cannot work out why. > >>> # ammt -f /dev/nsa0 status > >>> /dev/nsa0 status: ONLINE ds == 0x0001 er == 0x0000 > >>> > >>> # amtape backup reset > >>> changer: got exit: 0 str: 1 /dev/nsa0 > >>> amtape: changer is reset, slot 1 is loaded. > >>> > >>> ## this is from /tmp/Amanda/amidxtaped.... > >>> Looking for tape backup-1... > >>> changer: got exit: 0 str: 0 1 1 > >>> changer_query: changer return was 1 1 > >>> changer_query: searchable = 0 > >>> changer_find: looking for backup-1 changer is searchable = 0 > >>> changer: got exit: 2 str: /usr/local/amanda/libexec/chg-manual: cannot > >>> create /dev/tty: Device not configured > >> I'm not very familiar with the chg-manual script, but as a wild guess > >> you might have the wrong console device specified for your OS. > > > > I don't think so, because the commands that are failing from within > > chg-manual work if I type them in eg: > > > > SRV# echo "insert tape into slot $1 and press return" >/dev/tty > > insert tape into slot and press return > > SRV# read ANSWER </dev/tty > > > > SRV# > > > >>> amidxtaped: could not load slot /usr/local/amanda/libexec/chg-manual:: > >>> cannot create /dev/tty: Device not configured > >>> amidxtaped: time 0.186: could not load slot > >>> /usr/local/amanda/libexec/chg-manual:: cannot create /dev/tty: Device > >> not > >>> configu > >>> red > >>> amidxtaped: time 0.186: pid 5948 finish time Mon Jul 10 23:01:39 2006 > >>> > >>> > >>> ## This is from the changer.debug > >>> MT -> /usr/local/amanda/sbin/ammt -f > >>> DD -> /usr/local/amanda/sbin/amdd > >>> Args -> -slot next > >>> -> rewind /dev/nsa0 > >>> /dev/nsa0 rewind failed: Permission denied > >> Looks like this is your main problem, you don't have permissions to > >> the tape drive. Odd, since you say you are running amrecover as > >> root. Is the tape actually loaded in the drive? Can you (from the > >> command line) run 'mt -f /dev/nsa0 rewind' successfully? > > > > I agree, however from the command line I have full access: > > On poking around my installation, the changer scripts are all > owned by my Amanda user, not root. Can you 'su -' to your Amanda > user and still run these commands?
Ahh very good point!! I've been running it as root, and this is what is in the Amanda.conf file but I compiled with user=backup. In inetd I'm running the services as user root. SRV# su backup -c "/usr/local/amanda/sbin/ammt -f /dev/nsa0 rewind" /dev/nsa0 rewind failed: Permission denied SRV# la /usr/local/amanda/sbin/ammt -rwxr-xr-x 1 backup backup 14857 Jul 10 14:13 /usr/local/amanda/sbin/ammt SRV# la /usr/local/amanda/sbin/amdd -rwxr-xr-x 1 backup backup 13153 Jul 10 14:13 /usr/local/amanda/sbin/amdd What do you think I should do? JB
