Hi Don, Try this patch on the client, it makes a stricker pattern by enclosing it in ^$
Jean-Louis PS. The patch is untested. On Fri, Mar 15, 2002 at 10:35:34AM -0500, Don Potter wrote: > Being that I'm restricted to using only the name since the expresion is > ported to amrestore when I do the "sethost <machine name>" is I can > setup a cname for that machine (can't change the machine name since it > is the mailhost) and adjust my disklist entry to reflect the cname. And > if I'm feeling really "randy" ( I always wanted to use that term in a > email)...I can see about adjusting the code of amrecover to allow > literal patterns as opposed to pattern matches (at least for the host > portion. > > Don > > Don Potter wrote: > > > Whoops .....I forgot..but I think I have found the problem (not the > > solution). I've summized (sp???) that the amidxtaped is spawning an > > amrestore and the host portion does a pattern search as opposed to a > > literal search it fails (follow my thinking): > > > > The machine I'm restoring is chg and the filesystem is /var..and when > > I'm doing the amrecover it ouputs this: > > amrecover> add dpotter > > Added /mail/dpotter > > amrecover> extract > > Extracting files using tape drive /dev/rmt/0cn on host chgsfs. > > The following tapes are needed: Daily_10 > > > > Restoring files into directory /var/adm/amanda/sbin > > Continue? [Y/n]: Y > > > > Load tape Daily_10 now > > Continue? [Y/n]: Y > > ./mail/dpotter is not on volume > > set owner/mode for '.'? [yn] > > > > So at least I know that it is opening the correct index file. Now > > this is where it gets freaky, I'm only cuttin' and pastin'the tail > > portion of the amrecover (since amrecover is working): > > amrecover: stream_client: connected to 152.3.165.105.10083 > > amrecover: stream_client: our side is 0.0.0.0.750 > > amrecover: try_socksize: receive buffer size is 65536 > > Started amidxtaped with arguments "6 -h -p /dev/rmt/0cn chg ^/var$ > > 20020314" > > Exec'ing /usr/sbin/ufsrestore with arguments: > > restore > > xbf > > 2 > > - > > /mail/dpotter > > > > Which then spawns the amidxtaped and then seems to run correctly, but > > never gets past chgsfs (another machine) /var. > > > > more amidxtaped.20020315095725.debug > > amidxtaped: debug 1 pid 19244 ruid 9732 euid 9732 start time Fri Mar > > 15 09:57:25 > > 2002 > > amidxtaped: version 2.4.2p2 > > > SECURITY USER root > > bsd security: remote host chgsfs.mc.duke.edu user root local user amanda > > amandahosts security check passed > > > 6 > > amrestore_nargs=6 > > > -h > > > -p > > > /dev/rmt/0cn > > > chg > > > ^/var$ > > > 20020314 > > Ready to execv amrestore with: > > path = /var/adm/amanda/sbin/amrestore > > argv[0] = "amrestore" > > argv[1] = "-h" > > argv[2] = "-p" > > argv[3] = "/dev/rmt/0cn" > > argv[4] = "chg" <======= Here is the kicker > > argv[5] = "^/var$" > > argv[6] = "20020314" > > amrestore: 0: skipping start of tape: date 20020314 label Daily_10 > > amrestore: 1: skipping primer._export.20020314.1 > > amrestore: 2: skipping intron._intron2.20020314.1 > > amrestore: 3: skipping sibpair._app_oracle_product_8.0.5a.20020314.1 > > amrestore: 4: skipping dnadoc.c0t0d0s0.20020314.1 > > amrestore: 5: skipping pcr._pcr2.20020314.1 > > amrestore: 6: skipping marker._var.20020314.1 > > amrestore: 7: skipping chgsfs.c0t0d0s0.20020314.1 > > amrestore: 8: skipping primer._usr.20020314.1 > > amrestore: 9: skipping mitosis._var.20020314.1 > > amrestore: 10: skipping sibpair._sibpair3.20020314.1 > > amrestore: 11: skipping pcr._var.20020314.1 > > amrestore: 12: skipping linkage._var.20020314.1 > > amrestore: 13: skipping sibpair._app_oracle_product_8.1.7.20020314.1 > > amrestore: 14: skipping wwwchg._usr.20020314.1 > > amrestore: 15: skipping wwwchg.c0t0d0s0.20020314.1 > > amrestore: 16: skipping locus._var.20020314.1 > > amrestore: 17: skipping theta._var.20020314.1 > > amrestore: 18: skipping allele._var.20020314.1 > > amrestore: 19: skipping hybrid._var.20020314.1 > > amrestore: 20: skipping primer._var.20020314.1 > > amrestore: 21: skipping diploid._var.20020314.1 > > amrestore: 22: skipping haldane._var.20020314.1 > > amrestore: 23: skipping exon._var.20020314.1 > > amrestore: 24: skipping weinberg._var.20020314.1 > > amrestore: 25: skipping chimera._var.20020314.1 > > amrestore: 26: skipping ligate._var.20020314.1 > > amrestore: 27: skipping ligate._export_home.20020314.1 > > amrestore: 28: skipping peptide._var.20020314.0 > > amrestore: 29: skipping annotate._var.20020314.0 > > amrestore: 30: skipping hybrid._export.20020314.2 > > amrestore: 31: restoring chgsfs._var.20020314.1 > > > > > > amrestore is my failing point.. > > > > Does all that make sense???? > > > > Don > > > > > > > > > > > > > -- 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
--- recover-src/extract_list.c.1 Fri Mar 15 10:53:00 2002 +++ recover-src/extract_list.c Fri Mar 15 11:02:40 2002 @@ -1067,6 +1067,7 @@ int my_port; int tape_server_socket; char *disk_regex = NULL; + char *host_regex = NULL; char *service_name = NULL; char *line = NULL; char *clean_datestamp, *ch, *ch1; @@ -1137,6 +1138,30 @@ *ch1 = '\0'; + host_regex = alloc(strlen(dump_hostname) * 2 + 3); + + ch = dump_hostname; + ch1 = host_regex; + + /* we want to force amrestore to only match disk_name exactly */ + *(ch1++) = '^'; + + /* We need to escape some characters first... NT compatibilty crap */ + for (; *ch != 0; ch++, ch1++) { + switch (*ch) { /* done this way in case there are more */ + case '$': + *(ch1++) = '\\'; + /* no break; we do want to fall through... */ + default: + *ch1 = *ch; + } + } + + /* we want to force amrestore to only match disk_name exactly */ + *(ch1++) = '$'; + + *ch1 = '\0'; + clean_datestamp = stralloc(dump_datestamp); for(ch=ch1=clean_datestamp;*ch1 != '\0';ch1++) { if(*ch1 != '-') { @@ -1158,14 +1183,15 @@ send_to_tape_server(tape_server_socket, "-h"); send_to_tape_server(tape_server_socket, "-p"); send_to_tape_server(tape_server_socket, dump_device_name); - send_to_tape_server(tape_server_socket, dump_hostname); + send_to_tape_server(tape_server_socket, host_regex); send_to_tape_server(tape_server_socket, disk_regex); send_to_tape_server(tape_server_socket, clean_datestamp); dbprintf(("Started amidxtaped with arguments \"6 -h -p %s %s %s %s\"\n", - dump_device_name, dump_hostname, disk_regex, clean_datestamp)); + dump_device_name, host_regex, disk_regex, clean_datestamp)); amfree(disk_regex); + amfree(host_regex); return tape_server_socket; }