DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I just migrated my Documents folder contents to a new installation on a desktop computer from a laptop. Disc drive on the laptop went out so I had to send it in for recycling.
In the process of migrating the contents, I created (out of ignorance, by the way) a gzip file that became corrupt in the process of getting it to my desktop hard drive.
Read around and tried a gzrecover utility, which did not work. I have tried many other things and have spent hours on it, getting to what seems to be nowhere.
Does anybody out there have a surefire way to uncorrupt the file or get out the remaining contents of the file that are still intact?
The tables used for compression are built using data previously encountered. Some of the files after the corruption won't be recovered correctly as a result. I think a sliding window is used so after so many bytes of corrupted files, you may start getting correct output.
If the file was truncated, you will be out of luck, as there is nothing to recover.
The cpio method is used because tar can't handle the region of file corruption from gzrecover.
Success in recovery depends on just how the corruption occurred. If the problem is due to an FTP ASCII-mode transfer from a Linux machine to Windows machine, then the corruption was non-destructive (inserting a CR character ahead of each LF character), and there is a program called fixgz that has a good chance of repairing the file. If the transfer was in the reverse direction (Windows to Linux), then the corruption was destructive (removal of every CR immediately followed by LF) and recovery may be impractical (not impossible, but probably beyond what is reasonable for data that wasn't important enough to be backed up).
I have done some reading around and have decided to give up on the effort of trying to extract my good data from the archive. Thanks anyway for your help, but for now, it is not needed.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.