On Mon, Feb 26, 2001 at 06:24:54PM -0600, Eric Helms wrote:
> 
> Alright, I ran amrestore with the option of piping it to split,
> 
> breaking it down into 500MB pieces, and it started creating the split
> 
> files just fine, and then errored out to the console with gzip: stdout
> 
> cannot find file: /bkup03/amanda/20010213/deepblue.sda5.0.1, even though that
> 
> file was in the directory that I was restoring from and to, actually.  I am 
>wondering if
> 
> amanda expects to see the files in the original directory structure that it was 
>backed up
> 
> with.  If so, this currently will not be possible because of disk space constraints 
>on the
> 
> backup server.  I ran the restore on a Linux box with the 2.4 kernel, hoping that 
>this
> 
> would alleviate the 2GB file size limitation, but so far the output/errors continue.
> 
> Once again, thanks for your help.

Each chunk contains the absolute path of the next chunk, you can
add a symlink in /bkup03/amanda/20010213/ to point to the actual file.

Or you can try this patch (untested) which will look in the current
directory if it doesn't find the file in the appropriate place.

Jean-Louis
-- 
Jean-Louis Martineau             email: [EMAIL PROTECTED] 
Departement IRO, Universite de Montreal
C.P. 6128, Succ. CENTRE-VILLE    Tel: (514) 343-6111 ext. 3529
Montreal, Canada, H3C 3J7        Fax: (514) 343-5834
--- restore-src/amrestore.c.orig        Mon Feb 26 20:40:04 2001
+++ restore-src/amrestore.c     Mon Feb 26 20:44:01 2001
@@ -340,7 +340,14 @@
            close(tapedev);
            if(file->cont_filename[0] == '\0') break; /* no more file */
            if((tapedev = open(file->cont_filename,O_RDONLY)) == -1) {
-               error("can't open %s: %s",file->cont_filename,strerror(errno));
+               char *cont_filename = strrchr(file->cont_filename,'/');
+               if(cont_filename) {
+                   cont_filename++;
+                   if((tapedev = open(cont_filename,O_RDONLY)) == -1) {
+                       error("can't open %s: %s", file->cont_filename,
+                             strerror(errno));
+                   }
+               }
            }
            if(tapedev != save_tapedev) {
                if(dup2(tapedev, save_tapedev) == -1) {

Reply via email to