Amanda-Users

Using amrecover with amgtar has trouble

2009-02-06 07:58:19
Subject: Using amrecover with amgtar has trouble
From: Yoshihiro Ishikawa <chiyotsu AT gmail DOT com>
To: amanda-users AT amanda DOT org
Date: Fri, 6 Feb 2009 21:52:19 +0900
Hello list,
my English is bad, so  I want your amnesty.

I used
-----------------------------
CentOS release 5 (Final)
build: VERSION="Amanda-2.6.1b2"
------------------------------

and I set the "chg-disk" in the amanda.conf.


First of all, I get the next error during extract on amrecover.

--------------------------
Extracting files using tape drive file:/var/amanda/virtualTape3 on
host localhost.
Load tape VTAPE_02 now
Continue [?/Y/n/s/d]? Y
warning: restore program for APPLICATION not available.
amrecover couldn't exec: No such file or directory
 problem executing restore
Extractor child exited with status 1
amrecover>
-------------------------

Second of all, I read the TAPE HEADER on "VTAPE_02".

-------------------
root@centos32 slot2]# dd if="00004.web01._etc.0" count=1 bs=1024
AMANDA: FILE 20090206190917 web01 /etc  lev 0 comp .gz program APPLICATION
APPLICATION=amgtar
DLE=<<ENDDLE
<dle>
  <program>APPLICATION</program>
  <disk>/etc</disk>
  <level>0</level>
  <auth>bsdtcp</auth>
  <compress>FAST</compress>
  <record>YES</record>
  <index>YES</index>
  <backup-program>
    <plugin>amgtar</plugin>
    <property>
      <name>ATIME-PRESERVE</name>
      <value>NO</value>
    </property>
    <property>
      <name>GNUTAR-PATH</name>
      <value>/bin/tar</value>
    </property>
  </backup-program>
</dle>
ENDDLE
To restore, position tape at start of file and run:
        dd if=<tape> bs=32k skip=1 | /bin/gzip -dc |
/usr/libexec/amanda/application/amgtar restore [./file-to-restore]+
1+0 records in
1+0 records out
1024 bytes (1.0 kB) copied, 0.000413526 seconds, 2.5 MB/s
---------------------

I found that there is no "TAPE HEADER" definition for "program
APPLICATION" in "amanda-2.6.1b2/recover-src/extract_list.c".
So, I think that it must add the next line in the "recover-src/extrac_list.c".

------------
[root@centos32 recover-src]# diff -uNr extract_list.c.o extract_list.c
--- extract_list.c.o    2008-12-13 02:59:47.000000000 +0900
+++ extract_list.c      2009-02-06 12:40:52.000000000 +0900
@@ -1755,6 +1755,10 @@
     if (file.program != NULL) {
        if (strcmp(file.program, "BACKUP") == 0)
            dumptype = IS_APPLICATION_API;
+
+        if (strcmp(file.program, "APPLICATION") == 0)
+            dumptype = IS_APPLICATION_API;
+
 #ifdef GNUTAR
        if (strcmp(file.program, GNUTAR) == 0)
            dumptype = IS_GNUTAR;

------------

Is this the correct and simple solution?


Best Regards,
Yoshihiro

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