help-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-tar] Can't extract - get "Archive contains obsolescent base-64


From: Jean Delvare
Subject: Re: [Help-tar] Can't extract - get "Archive contains obsolescent base-64 headers"
Date: Wed, 2 Feb 2005 15:22:29 +0100 (CET)

Hi Alexis,

> Hi, I've got a DAT tape I tarred stuff onto about 18 months ago, and I'd
> really like to get it back! It was created with GNU tar (don't know what
> version) and I'm trying to extract it with GNU tar (1.13.93).
>
> I couldn't remember what block size I used, so I did the 'dd bs=bignum
> count=1' trick to read as much as possible off, but limiting it to one
> block. This produced a file of size 10240. Fine. I guess I did 'tar cbf
> 20 $TAPE $STUFF'.

I didn't know that trick (bs=bignum), that's a nice one. I'll try to
remember it :)

It's quite reasonable to assume a block size of 10240 bytes, since this
is the default for any gnu tar I have seen so far. "tar --help" tells
you. That said I think that what dd really tests is the tape driver
block size, which isn't necessarily the same as the tar file block size
(although it definitely works better when the value is the same).

> However, when I try to untar it I get:
>
>       dione$ tar tvbf 20 /dev/st0
>       drwx------ alexis/alexis     0 2003-08-04 21:49:51 ./
>       tar: Skipping to next header
>       tar: Archive contains obsolescent base-64 headers
>       tar: Error exit delayed from previous errors
>
> I dd'ed off about 10Mb with bs=10k to a file and tried the 'tar t' command
> on that. The result was of course the same.
>
> Next I did a hexdump of the file to verify that it was a tar file and not
> a compressed tar file or a cpio or anything else, and, to my inexpert eye,
> it looks fine (see below).
>
> I googled and found some stuff about a recent buggy tar and wondered if
> my 'tar t' was suffering from this. So I went to the oldest tar I could
> find on the FTP site (1.11.8), but I got the same results.
>
> I presume that this means that it was the *creation* of the tar file which
> was flawed? Can anybody confirm this?

That's one possibility, right, and the most probable one IMHO.

> Is there any way I can extract my data from the tar file? I mean, looking
> at the hex dump, it appears that the *entire dump* does not have a header,
> but that each file (or each block???) does.

No surprise here, this is how tar archives work as far as I know.

> Presumanly somewhere buried inside
> this is something indicating the size of the file? Assuming I can locate
> the beginning of this, will the entire file's contents follow
> contiguously? So I could just use to 'dd skip=startoffset bs=1
> count=filesize' extract it, right?

It probably would, let alone (I guess) the block boundaries, but
hopefully we can find an easier way.

> Any help/advice much appreciated!  Thanks!
>
> Oh, probably not relevent, but this is a Linux 2.6 system with a DDS3 tape
> drive.

I see two reasons why you are unable to extract your archive (let alone
the possibility that the data stored on your tape got corrupted over
time).

The first one would be wrong settings on your DDS3 drive. There are
usually a few things that can be configured on these drives, such as the
compression and the block size. I know that I do have to set the block
size to match tar's for mine to work correctly, and I also have to
disable compression (all using stinit(8)).

So I would invite you to try and remember which settings the drive was
using when you wrote the archive on the tape in the first place.

However, I suspect that wrong compression (hardware or software) would
cause a completely different dump than the one you attached, so I doubt
this is the problem.

The second one would be that the tar file was created using an old
archive format. My gnu tar (1.14) offers a --format option, which lets
the user select an archive format. It's not exactly clear whether it
applies on archive creation only or extraction too, but this is
certainly worth giving a try in your situation. I would try "--format
v7", "--format oldgnu" and "--format ustar". "ustar" appears in
the dump, as you might have noticed, so that might be an indication.

While you're at it, you should really try to run "file" on the dump
file you extracted from the tape. That might give you a hint at what
exactly the format is.

Hope that helps,
--
Jean Delvare




reply via email to

[Prev in Thread] Current Thread [Next in Thread]