corrupted tar.gz archive - I lost my backups :)/:(

Lowell Gilbert freebsd-questions-local at be-well.ilk.org
Tue Feb 14 14:54:59 UTC 2012


"Pegasus Mc Cleaft" <ken at mthelicon.com> writes:

>> It recreates something, but the most important files, which reside in
>> subfolders of the given tar.gz archives are gone, i.e. the subfolders
>> are empty.
>> The gunzip strategy you mentioned yields the same as a regular tar -xvf
>> file.tar.gz.
>> 
>> Pegasus, I have yet to try the pax(1) approach. I will let you know
>> about how that went.
>
> Hummmmm.. I'm not sure if pax will be able to help in this case. From the
> looks of it, somehow the compressed data got corrupted - I don't think pax
> will be able to deal with this any better than tar did. 

Probably correct; the right data isn't there, no tool is going to be
able to recover it. Data compression makes this more fragile (i.e., lose
the rest of the archive as opposed to only the files in which the data
corruption occurs.

> I wonder if there was a change in gzip (like maybe libarchive) between the
> two versions of BSD that might be causing the problem. If I were attacking
> the problem, I might try booting up off a 7.x bootcd and see if I can gzip
> --test the archive from the usb stick. 

It's easy enough to try, but it seems awfully unlikely to help; lots of
us have .tar.gz files going back a couple of decades, and if there were
ever new implementations that couldn't understand the old ones, some old
hand would have noticed by now.

Media errors happen, and preparing for them involves noticing them
before you try to use the data, as well as recovering if they go bad. 
The user seems to have knowingly only had one copy of the valuable data, 
which makes the word "backup" a bit of an unusual usage of the term...

--Lowell


More information about the freebsd-questions mailing list