Results 1 to 10 of 10

Thread: Extract files from corrupt gzipped tar

  1. #1
    Join Date
    Apr 2007
    Beans
    Hidden!

    Angry Extract files from corrupt gzipped tar

    Hi,

    I have a .tar.gz file that has all my settings from my previous Ubuntu install in it. I want to unzip it but it seems to be corrupted in some way and I can't extract any of the files.

    The error I get is:
    Code:
    gzip: stdin: unexpected end of file
    tar: Unexpected EOF in archive
    tar: Error is not recoverable: exiting now
    Can anyone help me recover the files?

    Thanks,
    Erland.

  2. #2
    Join Date
    Jan 2007
    Location
    $here ? $here : $there
    Beans
    3,717
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Extract files from corrupt gzipped tar

    Are you certain that you are using the command correctly? To me that looks like the command is trying to read from stdin and not a file.

    Edit:
    Read a little closer. Try:

    Code:
    tar xvf the_file.tar.gz
    Don't try to make something "fast" until you are able to quantify "slow".

  3. #3
    Join Date
    Apr 2007
    Beans
    Hidden!

    Re: Extract files from corrupt gzipped tar

    Thanks. I was just doing it through the GUI, by opening or extracting it from Nautilus. After issuing your command in the terminal however, I get the same problem. It prints lots of files that are extracted then gets to
    Code:
    howden/.mozilla-thunderbird/1ke0b5qv.default/Mail/Local Folders/Sent
    and prints:
    Code:
    gzip: stdin: unexpected end of file
    tar: Unexpected EOF in archive
    tar: Unexpected EOF in archive
    tar: Error is not recoverable: exiting now

  4. #4
    Join Date
    Aug 2008
    Beans
    71
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Extract files from corrupt gzipped tar

    Is it too late to resurrect this thread and see if there was ever a fix? I have the same problem and one of the folders I backed up is photos from a customer shoot and I *need* them!

    I don't want to extract the entire backup since it may cause some problems with my current install... Just need the photos! Help!

    gzip: stdin: unexpected end of file
    tar: Unexpected EOF in archive
    tar: Error is not recoverable: exiting now

  5. #5
    Join Date
    Aug 2009
    Beans
    2

    Re: Extract files from corrupt gzipped tar

    Did anyone ever resolve this issue? I have a similar problem. I used sbackup to backup about 75 gigs of info. There were five or so files created as part of the backup. sbackup restore does not like the file. It complains that the backup was in a earlier format. And choosing to proceed didn't appear to work. At least I can't tell that it did anything. A peak of the first hundred lines or so in files.tgz appear to be gibberish. Also looking at the ver file which should be text but it also looks like three or fous characters of gibberish. I wonder if the file is really corrupt or if I'm looking at compressed data that somehow gunzip or tar or something else can't work with. Anyway else seeing something similar?

  6. #6
    Join Date
    Sep 2005
    Beans
    6

    Re: Extract files from corrupt gzipped tar

    I have the exact same problem.

    sbackup can no more restore my files. And when trying to extract manually the files.tgz archive.
    It gives me the answer :

    Code:
    gzip: stdin: unexpected end of file
    tar: Unexpected EOF in archive
    tar: Error is not recoverable: exiting now
    So so so uncool

  7. #7
    Join Date
    Aug 2008
    Beans
    50

    Re: Extract files from corrupt gzipped tar

    I have this same problem. I have seen a post that says Fat32 filesystems typical of most USB/external HDs can't handle files larger than 4GB and creates a silent error, making you think you backed up your files instead of making a corrupted piece of crap.

  8. #8
    Join Date
    Aug 2009
    Beans
    2

    Re: Extract files from corrupt gzipped tar

    Yep uncool for sure. In my case I had formatted a USB drive with the EXT3 filesystem before running the backup. I tested a smaller file, 35 gig, and that appeared to be okay. It's when I added in someother including copies of virtual machines (many gigs) when I started having the problem. Anyone seen a fix yet? I'm holding onto my files.tgz in hope that someone has some magic for it.

  9. #9
    Join Date
    Mar 2012
    Beans
    1

    Lightbulb Re: Extract files from corrupt gzipped tar

    Been looking for how to recover files from a corrupt tar file (compressed or not) and haven't found any answers yet aside from "transfer it again in binary mode" (no help) or "make it again correctly this time" (no help).

    Have two ideas:

    untar the file to recover the files up to the corrupted part, at least those should be good.

    Try uncompressing the file to get a regular tar file, with a little luck that might skip over the corrupt part and uncompress the rest of the files (But the "unexpected EOF" suggests that there's no other files past this). After that, either try to untar the plain tar file, or try file/data carving tools to extract files, like using testdisk/photorec or similar. Some of the data carving tools might be able to uncompress the tar.gz file directly too so that's worth a try on it's own. Actually try that first, probably easier
    Actually, if your tar.gz/tgz storage medium is the problem and it's giving the "unexpected EOF", then definitely try photorec on the whole disk, it should ignore the filesystem and read the disk directly and might be able to recover the tar.gz file or it's data better.

    I'm surprised there aren't easy to find/working tar recovery programs, or if there are it's a well kept secret.
    Last edited by xen2050; August 23rd, 2012 at 11:40 AM.

  10. #10
    Join Date
    Jan 2008
    Location
    Manchester UK
    Beans
    13,573
    Distro
    Ubuntu

    Re: Extract files from corrupt gzipped tar

    Please start a new thread giving as much detail about your problem, what you have tried, and any errors you get.
    This thread is old.

    Closed.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •