[Cialug] Tar file corruption
Jeffrey Ollie
jeff at ocjtech.us
Tue Apr 30 14:18:45 CDT 2013
On Tue, Apr 30, 2013 at 10:58 AM, David Bierce <david at bierce.org> wrote:
> I have a tar file that was bzip2 compressed and had a few blocks to bad in media transfer, After pulling out the bad blocks, the reconstituted tar file appears to only function until the place in the file where the first block was corrupted. After the first block it just doesn't read the rest of the data. I've tried to read the file ignoring zero data, which just pulls a bunch of junk metadata and file names after the empty block. I've tried to extract it using CPIO, which has the same problem after the empty block.
>
> Does anyone know of a tool that can repair tar files, or at least, try. Or it is time time to go digging deep into the file or give up :)
The problem isn't the tar file, the problem is the bzip2 compression.
bzip2 compresses things as a stream of blocks, with successive blocks
being compressed dependin on what was in previous blocks, so if one or
more blocks is corrupted, all subsequent blocks are corrupt.
At least on linux, there's a bzip2recover program which might be able
to recover some data, but you'll want to start with the original
corrupted file, not the one you edited.
--
Jeff Ollie
More information about the Cialug
mailing list