Post by APseudoUtopiaPost by _Hi,
Before making the move from 7.0 to 8.2, I ran a little script that did a
backup of selected files
and folders.
Trying to recover these files on 8.2, I found that some of the archives -
unfortunately those with
the files that are dear to me - are corrupted.
In other words, I just wanted to ask if there's anyone on here, who knows
of a good repair
utility for corrupted tar.gz archives?
Thanks
pancakeking79
Hrm....What command/script did you run to create the archive? How did
you transfer it over to the new system? What command are you using to
attempt to extract it, and what error is it giving?
gunzip < archive.tar.gz > archive.partial.tar
Which may or may not giving you some of the files into the
archive.partial.tar file.
What does gzip --test archive.tar.gz give?
I don't have the script anymore. It is among the files lost, but it was pretty
much straight forward, making use of:
tar -czf backupfile.tar.gz folders/ of/ my/ choice/.
After creating the backups I just cp(1)ed them to an msdosfs formated
usb stick and got them onto 8.2 this way, so the famous ascii/binary
trap shouldn't be
an issue here.
Here are some of the outputs I get:
# ls
setcd12292011.tar.gz su12292011.tar.gz
sr12292011.tar.gz
# tar -xvf sr12292011.tar.gz
x root/
[snipped]
tar: Error exit delayed from previous errors.
# tar -xvf su12292011.tar.gz
x usr/home/user/
[snipped]
tar: Damaged tar archive
tar: Retrying...
tar: Damaged tar archive
tar: Retrying...
tar: Damaged tar archive
tar: Retrying...
tar: Damaged tar archive
tar: Retrying...
tar: Damaged tar archive
tar: Retrying...
tar: gzip decompression failed
tar: Error exit delayed from previous errors.
# gzip --test sr12292011.tar.gz
gzip: data stream error
gzip: sr12292011.tar.gz: uncompress failed
# gunzip < sr12292011.tar.gz > archive.partial.tar
gunzip: data stream error
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.