Bug 666968 - amrestore should restore one file when outputting to a pipe
Summary: amrestore should restore one file when outputting to a pipe
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: amanda
Version: 14
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Jan Görig
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-03 20:44 UTC by Ed Friedman
Modified: 2011-02-09 20:21 UTC (History)
1 user (show)

Fixed In Version: amanda-3.1.3-2.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-09 20:21:12 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ed Friedman 2011-01-03 20:44:56 UTC
Description of problem:
Amrestore does not work

Version-Release number of selected component (if applicable):
amanda-server-3.1.3-1.fc14.x86_64

How reproducible:
Always

Steps to Reproduce:
1.Put an amanda-server 3.1.3 or 2.6 tape in the tape drive
2.Run "amrestore -p /dev/nst0 machinename partitionname | restore ivf -"
3.
  
Actual results:
Tape error on first record

Expected results:
amrestore should position to the tape file corresponding to the machinename and partitionname

Additional info:
amrestore version 2.6 positions properly both on 2.6 tapes and 3.1.3 tapes

Comment 1 Jan Görig 2011-01-12 16:33:34 UTC
Thank you for your bug report. The amrestore is completely rewritten in amanda 3.1, so finding regression isn't so simple.
Could you attach complete error message, please?

Comment 2 Ed Friedman 2011-01-26 21:04:40 UTC
I've replaced amanda 3.1 with amanda 3.2, and the problem still persists. After much debugging, what I have discovered is that for both of these versions, if amrestore is called with the -p flag, then amrestore aborts after the first tape record. If the result is piped to the restore program, then the error reads: "restore: Tape read error on first record". If the -p flag is invoked without piping to any other program, then there is no error message and amrestore simply stops after the first record.

However, if the -p flag is not invoked, then the dumpfile is transferred from tape to the directory in which the amrestore command was restored, although amrestore continues reading all of the files on the tape instead of stopping after finding the correct file, which was the behavior in the past. This file on the disk can then be access with the restore command to get access to its contents.

Needless to stay, prior to amanda 3.1, the -p flag worked flawlessly.

Comment 3 Jan Görig 2011-01-28 11:33:21 UTC
Thank you for your informations. It helps me much. I was able to write patch that hopefully fixes this issue. Fixed version will be early available in updates-testing for Fedora 14. Please test this update. If it works I will commit patch to Rawhide and upstream.

Comment 4 Fedora Update System 2011-01-28 11:33:53 UTC
amanda-3.1.3-2.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/amanda-3.1.3-2.fc14

Comment 5 Ed Friedman 2011-01-28 17:34:13 UTC
I've tested this update and it fixes the amrestore -p problem - at least as far as I can tell.

Comment 6 Fedora Update System 2011-01-28 19:22:40 UTC
amanda-3.1.3-2.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update amanda'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/amanda-3.1.3-2.fc14

Comment 7 Fedora Update System 2011-02-09 20:21:07 UTC
amanda-3.1.3-2.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.