Amanda-Users

RE: amrestore problems, could not stat file

2003-12-29 17:06:33
Subject: RE: amrestore problems, could not stat file
From: "Josh Welch" <jwelch AT buffalowildwings DOT com>
To: "Frank Smith" <fsmith AT hoovers DOT com>, <jblackburn AT hirzel DOT com>
Date: Mon, 29 Dec 2003 16:03:23 -0600
Frank Smith said

<snip>

> > tapedev "file:/backup/" # the no-rewind tape device to be used
>
> I've never used the file driver in production, only played with it
> a little, but I think  this needs to be a file, not a directory. Perhaps
> someone else can clarify this. More comments way below.

Looking at my config, I actually have no tapedev in there. This is probably
not the recomended practice, but I've had to restore files from this system
a number of times, so its working.

> > changerfile "/etc/amanda/DailySet1/chg-multi.conf"
> > changerdev "/dev/null"

I don't have a changer dev either. What's your chg-multi.conf say?

> > tapetype HARD-DISK              # what kind of tape it is (see tapetypes
> > below)
> > define tapetype HARD-DISK{
> >         comment "20GB Hard disk"
> >         length 20000 mbytes
> > }

The taptype looks similar to mine

> > labelstr "^DailySet1[0-9][0-9]*$"       # label constraint regex: all
> > tapes must match
> >
> > holdingdisk hd1 {
> >     comment "main holding disk"
> >     directory "/var/tmp"        # where the holding disk is
> >     use 290 Mb
> >  chunks
> >
> >     }
> >
> >
> > infofile "/var/lib/amanda/DailySet1/curinfo"    # database filename
> > logdir   "/var/lib/amanda/DailySet1"            # log directory
> > indexdir "/var/lib/amanda/DailySet1/index"      # index directory
> >
> >

<snipped rest of config>

> >
> >
> > On Thu, 2003-12-11 at 19:29, Frank Smith wrote:
> >> --On Thursday, December 11, 2003 15:21:19 -0500 jessica
> blackburn <jblackburn AT hirzel DOT com> wrote:
> >>
> >> > I am very new to this amanda system and am trying to run amrecover.
> >> > here is what I start with:
> >> >
> >> > [root@hccweb RECOVER]# /usr/sbin/amrecover -C DailySet1 -s hccweb
> >> > AMRECOVER Version 2.4.3. Contacting server on hccweb ...
> >> > 220 hccweb AMANDA index server (2.4.3) ready.
> >> > 200 Access OK
> >> > Setting restore date to today (2003-12-11)
> >> > 200 Working date set to 2003-12-11.
> >> > 200 Config set to DailySet1.
> >> > 200 Dump host set to hccweb.
> >> > Trying disk / ...
> >> > Trying disk rootfs ...
> >> > Can't determine disk and mount point from $CWD '/var/tmp/RECOVER'
> >> > amrecover> sethost hccweb
> >> > 200 Dump host set to hccweb.
> >> > amrecover> setdisk /etc
> >> > Scanning /var/tmp...
> >> >   RECOVER: skipping cruft directory, perhaps you should delete it.
> >> > 200 Disk set to /etc.
> >> > amrecover> add syslog.conf
> >> > Added /syslog.conf
> >> > amrecover> extract
> >> >
> >> > Extracting files using tape drive file:/backup/ on host localhost.
> >> > The following tapes are needed: DailySet109
> >> >
> >> > Restoring files into directory /var/tmp/RECOVER
> >> > Continue [?/Y/n]? Y
> >> >
> >> > Extracting files using tape drive file:/backup/ on host localhost.
> >> > Load tape DailySet109 now
> >> > Continue [?/Y/n/t]? Y
> >> > EOF, check amidxtaped.debug file on localhost.
> >> > amrecover: short block 0 bytes
> >> > UNKNOWN file
> >> > amrecover: Can't read file header
> >> > extract_list - child returned non-zero status: 1
> >> > Continue [?/Y/n]? n
> >> > amrecover> exit
> >> > 200 Good bye.
> >> >
> >> > When I check the amidxtaped debug file this is what I get:
> >> >
> >> > [root@hccweb amanda]# cat amidxtaped.20031211145718.debug
> >> > amidxtaped: debug 1 pid 3715 ruid 33 euid 33: start at Thu Dec 11
> >> > 14:57:18 2003
> >> > amidxtaped: version 2.4.3
> >> > amidxtaped: time 0.000: > SECURITY USER root
> >> > amidxtaped: time 0.000: bsd security: remote host hccweb
> user root local
> >> > user amanda
> >> > amidxtaped: time 0.000: amandahosts security check passed
> >> > amidxtaped: time 0.000: > 6
> >> > amidxtaped: time 0.000: amrestore_nargs=6
> >> > amidxtaped: time 0.000: > -h
> >> > amidxtaped: time 0.000: > -p
> >> > amidxtaped: time 0.000: > file:/file1
> >> > amidxtaped: time 0.000: > ^hccweb$
> >> > amidxtaped: time 0.000: > ^/etc$
> >> > amidxtaped: time 0.000: > 20031210
> >> > amidxtaped: time 0.000: Ready to execv amrestore with:
> >> > path = /usr/sbin/amrestore
> >> > argv[0] = "amrestore"
> >> > argv[1] = "-h"
> >> > argv[2] = "-p"
> >> > argv[3] = "file:/file1"
> >> > argv[4] = "^hccweb$"
> >> > argv[5] = "^/etc$"
> >> > argv[6] = "20031210"
> >> > amrestore: could not stat file:/file1
> >> > amidxtaped: time 0.004: amrestore terminated normally with status: 2
> >> > amidxtaped: could not stat file:/file1
> >> > amidxtaped: time 0.004: could not stat file:/file1
> >> > amidxtaped: time 0.004: pid 3715 finish time Thu Dec 11 14:57:18 2003
>
> I'm not sure where amrestore is pickup up the/file1 name from.  I think,
> with the file driver, tapedev needs to be a link to the proper file (the
> DailySet109 file in this case), which I understood to be a manual process
> unless the changer scripts have now been updated to do it for you.  If
> you can find where the /file1 path is being set, you should be able to
> point it to the correct file.
>
> Frank

I think that your chg-multi.conf file might shine some light on this matter.
That's where you should be defining the file location that acts as your
"tape".

Josh


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