#687312 amanda-client: amrecover fails to handle compressed images from amanda 2.5.2p1-4 over network #687312
- Package:
- amanda-client
- Source:
- amanda
- Description:
- Advanced Maryland Automatic Network Disk Archiver (Client)
- Submitter:
- Christian Hilgers
- Date:
- 2015-06-22 12:09:11 UTC
- Severity:
- normal
Hi, I tried to recover data stored on my Debian 5.0.2 System running amanda 2.5.2p1-4. I was able to recover everything which is stored without compression using amrecover. I felt for the compressed images. In amrecover.debug I see it detects compression but it fails somehow to pipe the data through gzip before it goes into tar Here an excerpt from amrecover.debug Tue Sep 11 12:00:32 2012: thd-0x11a3a00: amrecover: send_to_tape_server: CONFIG=hilgers Tue Sep 11 12:00:32 2012: thd-0x11a3a00: amrecover: send_to_tape_server: LABEL=hilgers-4:15 Tue Sep 11 12:00:32 2012: thd-0x11a3a00: amrecover: send_to_tape_server: FSF=15 Tue Sep 11 12:00:32 2012: thd-0x11a3a00: amrecover: send_to_tape_server: HEADER Tue Sep 11 12:00:32 2012: thd-0x11a3a00: amrecover: send_to_tape_server: DEVICE=file:/amandatapes/hilgers Tue Sep 11 12:00:32 2012: thd-0x11a3a00: amrecover: send_to_tape_server: HOST=^clio3$ Tue Sep 11 12:00:32 2012: thd-0x11a3a00: amrecover: send_to_tape_server: DISK=^/export/software/WindowsMobile$ Tue Sep 11 12:00:32 2012: thd-0x11a3a00: amrecover: send_to_tape_server: DATESTAMP=20120911 Tue Sep 11 12:00:32 2012: thd-0x11a3a00: amrecover: send_to_tape_server: END Tue Sep 11 12:00:32 2012: thd-0x11a3a00: amrecover: read header 1448 => 1448 Tue Sep 11 12:00:32 2012: thd-0x11a3a00: amrecover: read header 1448 => 2896 .... Tue Sep 11 12:00:32 2012: thd-0x11a3a00: amrecover: read header 912 => 32768 Tue Sep 11 12:00:34 2012: thd-0x11a3a00: amrecover: User prompt: 'Continue [?/Y/n]? '; response: '' Tue Sep 11 12:00:34 2012: thd-0x11a3a00: amrecover: image is compressed Tue Sep 11 12:00:34 2012: thd-0x11a3a00: amrecover: Spawning "/bin/gzip /bin/gzip -dc" in pipeline Tue Sep 11 12:00:34 2012: thd-0x11a3a00: amrecover: Exec'ing /bin/tar with arguments: Tue Sep 11 12:00:34 2012: thd-0x11a3a00: amrecover: tar Tue Sep 11 12:00:34 2012: thd-0x11a3a00: amrecover: --ignore-zeros Tue Sep 11 12:00:34 2012: thd-0x11a3a00: amrecover: --numeric-owner Tue Sep 11 12:00:34 2012: thd-0x11a3a00: amrecover: -xpGvf Tue Sep 11 12:00:34 2012: thd-0x11a3a00: amrecover: - Tue Sep 11 12:00:34 2012: thd-0x11a3a00: amrecover: . gzip: stdin: not in gzip format Tue Sep 11 12:14:43 2012: thd-0x11a3a00: amrecover: sending: QUIT^M Whe I transfer the imagefile onto the the testing box and remove the first 32kb using dd it looks fine root@clio4:/tmp# /bin/gzip -dc 00015.clio3._export_software_WindowsMobile.0.tar.gz | tar tvf - drwxr-xr-x chris/users 37 2009-06-19 22:13 ./ drwxr-xr-x chris/users 26 2010-01-26 12:36 ./AFU/ drwxr-xr-x chris/users 19 2009-06-19 22:15 ./PNA_Update/ -rw-r--r-- chris/users 16994 2006-04-07 10:58 ./USBSwitch_PPC.cab -rw-r--r-- chris/users 16971 2005-07-13 17:23 ./AFU/GlowingStraightKey2.tsk -rw-r--r-- chris/users 1612443 2009-06-19 22:15 ./PNA_Update/pna1500image.exe root@clio4:/tmp# I did some test recovery on the old server locally and there its all fine. amrecover.debug does not indicate calling gzip at all.
Hi, I did replace gzip with this wrapper script #!/bin/bash # #save file TMPFILE=/tmp/gzip.save.$$ tee $TMPFILE | gzip.real -dc and saved the file amrevocer sends to gzip. 00015.clio3._export_software_WindowsMobile.0 is the file from the virtual tape lib gzip.save.10612 is the file amrecover sends to gzip root@clio4:/tmp# ls -l 00015.clio3._export_software_WindowsMobile.0 gzip.save.10612 -rw------- 1 root root 1671168 Sep 11 12:22 00015.clio3._export_software_WindowsMobile.0 -rw-r--r-- 1 root root 1658880 Sep 12 11:27 gzip.save.10612 root@clio4:/tmp# file 00015.clio3._export_software_WindowsMobile.0 gzip.save.10612 00015.clio3._export_software_WindowsMobile.0: AMANDA dump file, DATE 20120911 clio3 /export/software/WindowsMobile lev 0 comp .gz p gzip.save.10612: POSIX tar archive (GNU) root@clio4:/tmp# It is already uncompressed. So it seems like amanda server sends incorrect information to amrecover. Christian
Hi, Debian 5.0 is quite old. Are you stilll interested in this bug report. Jose Calhariz
I just ran into the exact same problem using below mentioned versions for server and client. I am using a custom compression script, and the client log for the failed recovery contains the following lines: Mon Jan 19 11:05:59 2015: thd-0x199da00: amrecover: image is compressed /etc/amanda/xz-1 Mon Jan 19 11:05:59 2015: thd-0x199da00: amrecover: Spawning "/etc/amanda/xz-1 /etc/amanda/xz-1 -d" in pipeline This looks as if the name of the custom compression script is inserted twice into the command. I would have expected 'Spawning "/etc/amanda/xz-1 -d" in pipeline' instead. On server: Package: amanda-client Version: 1:2.6.1p2-3
When replacing the custom compression script on the client by a script just calling "cat -", the restore works. Regards, Markus
This is an upstream bug fixed in 3.3.6 (see http://archives.zmanda.com/amanda-archives/viewtopic.php?t=7322&sid=aa51 6467b5baa942a8b4f34dda49eefd). According to the author this is fixed by the following commit: https://github.com/zmanda/amanda/commit/aaae124a5a8819fcdc0136cfb6ad3531 18c2fc4c
This is fixed in 3.3.6; I have successfully tested it using the
following amanda-client package:
# apt-cache showpkg amanda-client
Package: amanda-client
Versions:
1:3.3.6-4
(/var/lib/apt/lists/ftp.de.debian.org_debian_dists_jessie_main_binary-am
d64_Packages) (/var/lib/dpkg/status)
Description Language:
File:
/var/lib/apt/lists/ftp.de.debian.org_debian_dists_jessie_main_binary-amd
64_Packages
MD5: 21af3684379a64cacc51c39152ab1062
Description Language: de
File:
/var/lib/apt/lists/ftp.de.debian.org_debian_dists_jessie_main_i18n_Trans
lation-de
MD5: 21af3684379a64cacc51c39152ab1062
Description Language: en
File:
/var/lib/apt/lists/ftp.de.debian.org_debian_dists_jessie_main_i18n_Trans
lation-en
MD5: 21af3684379a64cacc51c39152ab1062
Reverse Depends:
amanda-common:i386,amanda-client
amanda-client:i386,amanda-client
amanda-server,amanda-client 1:3.3.6-4
amanda-common,amanda-client
amanda-common,amanda-client 1:3.3.6-4
Dependencies:
1:3.3.6-4 - amanda-common (5 1:3.3.6-4) libc6 (2 2.15) libcurl3 (2
7.16.2) libglib2.0-0 (2 2.28.0) libreadline6 (2 6.0) libssl1.0.0 (2
1.0.0) libxml-simple-perl (0 (null)) dump (0 (null)) gnuplot (0 (null))
smbclient (0 (null)) amanda (0 (null)) amanda:i386 (0 (null))
amanda-common (3 1:2.5.2p1-3) amanda-common:i386 (3 1:2.5.2p1-3)
amanda-common (3 1:2.5.2p1-3) amanda-common:i386 (3 1:2.5.2p1-3)
amanda-client:i386 (0 (null))
Provides:
1:3.3.6-4 -
Reverse Provides: