In a few amrecover tests I did yesterday I ran into this problem:
(amanda-2.5.2-20070523) on irix-6.5
amrecover> pwd
/bigdisk
amrecover> add sylvain/Stereopsis/pet/campagna_francois_-BG1_199903260955.mnc
File sylvain/Stereopsis/pet/campagna_francois_-BG1_199903260955.mnc
doesn't exist in directory
amrecover> cd sylvain/Stereopsis/pet/
/bigdisk/sylvain/Stereopsis/pet
amrecover> add campagna_francois_-BG1_199903260955.mnc
amrecover> cd /bigdisk/
/bigdisk
amrecover> ls
2007-05-28-17-33-20 sylvain/
2007-05-28-17-33-20 greg/
2007-05-28-17-33-20 anthonin/
2007-05-28-17-33-20 1/
2007-05-28-17-33-20 0/
2007-05-28-17-33-20 .
Is this normal?
jf
* Dustin J. Mitchell <dustin AT zmanda DOT com> [20070530 14:46]:
> On Wed, May 30, 2007 at 01:41:17PM -0400, McGraw, Robert P. wrote:
> > > amrecover> cd jflack
> > > amrecover: regex "/jflack/$/": unknown regex error
> > >
> > > ... and amrecover exits out to the shell.
>
> Interesting -- I get the same regex, but my regex library (in libc) doesn't
> complain about it. I haven't heard of anyone else having this problem,
> either.
> Do your local modifications include any sort of funny business with the regex
> library? Remind me what OS you're running again?
>
> I get:
>
> amrecover> setdisk /tmp/amanda/prefix/etc
> 200 Disk set to /tmp/amanda/prefix/etc.
> amrecover> cd amanda
> regex: ^amanda$
> regex_path: amanda/$
> path_on_disk: /amanda/$
> path_on_disk_slash: /amanda/$/
> /tmp/amanda/prefix/etc/amanda
>
> With the following patch applied:
>
> Index: recover-src/set_commands.c
> ===================================================================
> --- recover-src/set_commands.c (revision 385)
> +++ recover-src/set_commands.c (working copy)
> @@ -324,6 +324,7 @@
> amfree(regex);
> return;
> }
> + fprintf(stderr, "regex: %s\n", regex);
> /*
> * glob_to_regex() anchors the beginning of the pattern with ^,
> * but we will be tacking it onto the end of the current directory
> @@ -336,6 +337,7 @@
> regex_path[strlen(regex_path) - 1] = '\0';
> strappend(regex_path, "/$");
> }
> + fprintf(stderr, "regex_path: %s\n", regex_path);
>
> /* convert path (assumed in cwd) to one on disk */
> if (strcmp(disk_path, "/") == 0)
> @@ -345,6 +347,7 @@
> path_on_disk = vstralloc(clean_disk_path, "/", regex_path, NULL);
> amfree(clean_disk_path);
> }
> + fprintf(stderr, "path_on_disk: %s\n", path_on_disk);
>
> cd_dir(path_on_disk, uqglob);
>
> @@ -404,6 +407,7 @@
> DIR_ITEM *ditem;
>
> path_on_disk_slash = stralloc2(path_on_disk, "/");
> + fprintf(stderr, "path_on_disk_slash: %s\n", path_on_disk_slash);
>
> nb_found = 0;
>
>
> --
> Dustin J. Mitchell
> Storage Software Engineer, Zmanda, Inc.
> http://www.zmanda.com/
--
<° ><
|