Paul
The -overlooked- hyphen of dd was the culprit.
I now get the desired response from the drive.
Thanks
Gerrit Hommersom
Hommersom, Gerrit (G) wrote:
> For emergency testing I want to read the amanda files with standard
> Unix/Linux tools
>
> W Curtiss preson's book suggests that amanda tapes can be read with
> the command dd -if=/dev/nst0 bs=32k count=1
Note that dd does not take options with a hyphen, at not on any OS that I have
access to.
>
> Attempting to move it to the next file with
> mt /dev/nst0 fsf 1
> dd -if=/dev/nst0 bs=32k count=1
> persistingly returned the amanda header, nothinbg else
Which amanda header? There are two kinds: an amanda tapeheader and one
amandaheader for each archivefile on tape.
>
> This returns indeed the Amanda header but not the backup software used
> (tar in my case)
Show us the header...
> Forcing a listing with dd -if=/dev/nst0 bs=32k skip=x | tar -t -
> returned either not output or the message "not a tar file"
Was it compressed archive? If yes then you also need the "-z" flag. Also you
need to skip exactly 1 block (the amanda archive header), not "x" blocks. Also
reading from stdin is accomplished by the "-f -" combination. Without the "-f"
tar takes the argument as the file to extract from the archive. (The
amandaheader in each archive even contains the commandline!)
That said, it probably boils down to:
mt -t /dev/st0 rewind
mt -t /dev/nst0 fsf 1
dd if=/dev/nst0 bs=32k count=1
This gives the amanda archive header of the first archive. Take a look at the
commandline that amanda suggests for you.
mt -t /dev/st0 rewind
mt -t /dev/nst0 fsf 1
dd if=/dev/nst0 bs=32k skip=1 | gtar -ztvf -
now you get a listing (omit the -z flag if the archive was not compressed).
--
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, *
* init 0, kill -9 1, Alt-F4, Ctrl-Alt-Del, AltGr-NumLock, Stop-A, ... *
* ... "Are you sure?" ... YES ... Phew ... I'm out *
***********************************************************************
|