Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Feb 2012 04:38:22 +0100
From:      _ <pancakeking79@gmail.com>
To:        APseudoUtopia <apseudoutopia@gmail.com>
Cc:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: corrupted tar.gz archive - I lost my backups :)/:(
Message-ID:  <CAKnE0Ztzy2Wk0Cq5VyNYLfyiceXOyJPW4z9-bcxnAm1%2BsD86qw@mail.gmail.com>
In-Reply-To: <CAKOHg=MYuajQPogdu8nHnJE1D%2BmN6tWs%2BRMacXXwhNeY3PrjMA@mail.gmail.com>
References:  <CAKnE0ZvaPK=uF7Lg2NepVsHbnDLQhedpVddVMg4vkFBfm%2B4%2Bsw@mail.gmail.com> <CAKOHg=MYuajQPogdu8nHnJE1D%2BmN6tWs%2BRMacXXwhNeY3PrjMA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
2012/2/14, APseudoUtopia <apseudoutopia@gmail.com>:
> On Mon, Feb 13, 2012 at 8:56 PM, _ <pancakeking79@gmail.com> wrote:
>> 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?
>
> You can try:
> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAKnE0Ztzy2Wk0Cq5VyNYLfyiceXOyJPW4z9-bcxnAm1%2BsD86qw>