[Cialug] Tar file corruption
David Bierce
david at bierce.org
Tue Apr 30 14:26:16 CDT 2013
Yeah, I ran bzip2recover which extracted all the readable bzip2 blocks. There were about 5 blocks successive blocks of about 50000 that were bad. Compression was set at 900kB so that is a pretty good chunk of missing data. I uncompressed the readable bzip2 chunks and merged all the pieces files together in order.
I thought bzip2 just looked at a single block of data that was what ever the input blocksize is set to, then compressed it and moved on to the next chunk of data entirely seperate from the previous and next block. Does it really have a container beyond input block size?
On Apr 30, 2013, at 2:18 PM, Jeffrey Ollie wrote:
> 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
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
More information about the Cialug
mailing list