I suddenly needed to recover an old
tar.gz file, but as soon as I execute so:
tar -zxvf filename.tar.gz
I get this:
gzip: stdin: invalid compressed data--format violated tar: Child returned status 1 tar: Error is not recoverable: exiting now
What you should try is the following:
Depending on the nature of corruption, you might or might not be able to recover your data.
Are you sure this is compressed with gzip? It might be complaining because it doesn't understand the format...
Some info about how recovery works can be found at Recovering a damaged .gz file
There also is a tool that helps you doing this: gzip Recovery Toolkit aka gzrecover