[Gllug] Slurp an entire tape to file with dd

Mike Brodbelt mike at coruscant.demon.co.uk
Wed Aug 31 22:11:51 UTC 2005


On Wed, 2005-08-31 at 16:58 +0100, Tom Schutzer-Weissmann wrote:
> On Wed, 2005-08-31 at 16:55 +0100, Robert Newson wrote:
> 
> > $ info dd
> > ...
> > `ibs=BYTES'
> >       Read BYTES bytes at a time.
> > ...
> > `count=BLOCKS'
> >       Copy BLOCKS `ibs'-byte blocks from the input file, instead of
> >       everything until the end of the file.
> > 
> > any use?
> 
> doh! I tried that but I used bs instead of ibs...
> 
> I'll just go and wipe the egg off and then get back to things.

I doubt it'll make much difference. The man page says:-


       bs=BYTES
              force ibs=BYTES and obs=BYTES


So if you set bs, then you should effectively have set ibs.

You may have to match the block size to the tape drive, though many
modern drives don't care. I'd try something like:-

dd if=/dev/nst0 of=tape_file_0 bs=1k

It should stop when it hits the EOF marker on the tape. Repeating the
command should then produce the second "file" on the tape. After a
while, you'll have some number of files retrieved. What you do then is
another matter, and depends on how Veritas stores data on the tape, and
whether you have any documentation for the format. <Insert lesson on
evils of proprietary formats here>. Assuming they provide some utility
or other, you should be able to restore from there. On my tapes (done
with Amanda), the first "file" on the tape is a plaintext header which
documents the format of the rest of the tape. Subsequent "files" are
individual filesystem backups, or parts thereof. Amanda's restore
utility will happily read from tape or from a disk directory with the
raw backup data files in it.

Mike.

-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list