DevHeads.net

gzip failing to unzip

To find a low frequency failure in a production system I have
been taking periodic dumps (using phymyadmin-export) specifying
that the file be gzipped. It appears to have worked just fine.

Today I went to unzip one of the files to use it as a mysql
source on the development system so I could dig into the problem
and..

gunzip reported:
gzip: IS-2016-12-31.sql.gz: decompression OK, trailing garbage
ignored

The "trailing garbage" is the last 3/4 of the file. The gzipped
file is 17MB.

Anybody have any ideas what is going wrong and or suggestions
that I can try to recover the data.

--bill

Comments

Re: gzip failing to unzip

By silver.bullet at 03/22/2017 - 14:31

On Wed, 22 Mar 2017 14:06:33 -0400, william drescher wrote:
No, I don't have an explanation or idea, but Google found this:
<a href="http://unix.stackexchange.com/questions/295702/how-to-get-trailing-data-of-gzip-archive" title="http://unix.stackexchange.com/questions/295702/how-to-get-trailing-data-of-gzip-archive">http://unix.stackexchange.com/questions/295702/how-to-get-trailing-data-...</a>

I don't know if this works, I even don't know perl. If you also
shouldn't understand it, simply test it in a container using a copy.

Regards,
Ralf

Re: gzip failing to unzip

By bill at 03/24/2017 - 07:55

On 3/22/2017 2:31 PM, Ralf Mardorf wrote:
-bill

Re: gzip failing to unzip

By Xen at 03/22/2017 - 14:30

william drescher schreef op 22-03-2017 19:06:
I have only sometimes 'got' that when the downloaded file (over http)
was bigger than the actual file, ie. it was some download error through
erroneous size reporting of the server, I believe.

But you seem to suggest that the file is actually _meant_ to be 17MB
big, right? Well not actually. Oh yeah, I'm mistaken. If 75% of the time
is garbage that is a tad much :p. But it sounds to me that the file
ended correctly, there was just more data that was not actually data.
Are you completely sure the resulting file is corrupted?

Regards.

Re: gzip failing to unzip

By bill at 03/24/2017 - 07:56

On 3/22/2017 2:30 PM, Xen wrote:
-bill