Amanda-Users

Re: recover data from tape

2003-07-17 03:53:47
Subject: Re: recover data from tape
From: Paul Bijnens <paul.bijnens AT xplanation DOT com>
To: Moliere Christian <christian.moliere AT wanadooportails DOT com>
Date: Thu, 17 Jul 2003 09:49:45 +0200
Moliere Christian wrote:

Hello,


   I'd like to see what are there as data on a tape but not in using
amanda commands. I tried with tar and dd command without result. Does
someone know how I could do that ?


From the docs/RESTORE file:

#!/bin/sh
TAPEDEV=</dev/nrtape>
while mt -f $TAPEDEV fsf 1 ; do
  dd if=$TAPEDEV bs=32k count=1 | head -1
  sleep 1
done

Is this what you're looking for?
tapedev must be the no-rewind device.
head -1 gives the contents;  head -3 gives the command to restore too.

Or do you want the index of contents of one particular file on tape,
then:
  mt -f $TAPEDEV rewind
  mt -f $TAPEDEV fsf <somenumber>
and read the file, skipping over the first 32k amanda header,
with a suitable command (gnutar or restore, with gzip in between
if needed) e.g. for a compressed gnutar image:
  dd if=$TAPEDEV bs=32k skip=1 | gzip -d | gtar -tvf -

--
Paul Bijnens, Xplanation                            Tel  +32 16 397.511
Technologielaan 21 bus 2, B-3001 Leuven, BELGIUM    Fax  +32 16 397.512
http://www.xplanation.com/          email:  Paul.Bijnens AT xplanation DOT com
***********************************************************************
* I think I've got the hang of it now:  exit, ^D, ^C, ^\, ^Z, ^Q, F6, *
* quit,  ZZ, :q, :q!,  M-Z, ^X^C,  logoff, logout, close, bye,  /bye, *
* stop, end, F3, ~., ^]c, +++ ATH, disconnect, halt,  abort,  hangup, *
* PF4, F20, ^X^X, :D::D, KJOB, F14-f-e, F8-e,  kill -1 $$,  shutdown, *
* kill -9 1,  Alt-F4,  Ctrl-Alt-Del,  AltGr-NumLock,  Stop-A,  ...    *
* ...  "Are you sure?"  ...   YES   ...   Phew ...   I'm out          *
***********************************************************************



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