Archive contains obsolescent base-64 headers (or how hard can it be to read a tape then!)

“Archive contains obsolescent base-64 headers” – thats what I was getting when reading a tape on a drive that should be backward compatible with the drive that created the tape in the first place.

    Some background


The tape was created on a Redhat 4 ES server – in “tar” format (thats what we are told). We are attempting to read it on an external Ultrium 3 drive connected to another Redhat 4 ES server. The internal drive on the original is an Ultrium 2. The two servers are Dell poweredge servers.

    So what happens


tar -tvf /dev/st0 gives the error

so checking what we have attached

cat /proc/scsi/scsi gives confirmation that the drives are seen by the OS okay.

At this point I suspect some block size issue might be at play between the two servers / tape drives – so how do you work out what block size the tape is in ?

# dd if=/dev/st0 of=/tmp/test.file ibs=64 count=1
dd: reading `/dev/st0′: Cannot allocate memory
0+0 records in
0+0 records out

If you get an error message, ‘Cannot allocate memory‘, try next blocksize as selected blocksize (64k) is too small:

# dd if=/dev/st0 of=testfile ibs=256 count=1
1+0 records in
512+0 records out

So 256k is correct block size for this scsi tape device.

in this case it turned out to be be 10240. However this still did not allow reading from tape with a tar command specifying the block size as 10240 so what else could be wrong ?

At this point I queried the real format of the tape and discovered the real answer it was created using a

gtar cvzf /dev/tape command – so the real answer for restoration is

gtar xvzf /dev/tape

note that the /dev/tape device appears to be the key.

I also had to issue a

mt -f /dev/tape rewind

command before the restore would work – and I ran it in a directory I had created below to / root folder. Although the answer was easier once the original method of creation was confirmed – it is usefult to know how to identify the block size of an unknown tape – or to confirm it when you have written a tape for someone else.

Just a tip – write it on the tape along with the command used to create it – and the os version and drive type if you know it.