View previous topic :: View next topic |
Author |
Message |
Danstroem n00b
Joined: 14 Jun 2004 Posts: 62 Location: Recklinghausen, Germany
|
Posted: Fri Jul 07, 2006 6:49 pm Post subject: broken bytes destroy whole tar archive? |
|
|
I recently made a system-backup with:
Code: | tar --wildcards --wildcards-match-slash --exclude 'sys/*' --exclude 'proc/*' --exclude 'mnt/d/Download/*' -cvzO / |
Yes I know, this is not perfect. My problem is a different:
I burned the archive to a DVD+RW media and some days later, i tried to restore it: Bad blocks on the media!
I copied the image with dd_rescue. About 120kB of data from the 4.0GB archive were gone. I was still happy, because I read that corrupted data in tar archives is just ommited, and I loose only some sectors (64kB per sector for gzip compressed tars) of data. But I had to realise, that tar did NOT continue to extract the archive. I got
Code: | tar -xzf archive.tar.gz
gzip: stdin: invalid compressed data--format violated
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now |
I read the manpage and tried various options which sounded helping, but I did't get it working. I also tried to copy the image with
Code: | dd_rescue -A archive.tar.gz /mnt/d/archive.tar.gz |
which fills the broken sectors with zeros, so that the size of the file stays the same, but tar didn't care.
Do you have an idea how to convince tar from continueing? Any hint greatly appreciated!
Thanks in advance!
-Daniel _________________ http://www.stormgarde.com |
|
Back to top |
|
|
nephros Advocate
Joined: 07 Feb 2003 Posts: 2139 Location: Graz, Austria (Europe - no kangaroos.)
|
Posted: Fri Jul 07, 2006 6:59 pm Post subject: |
|
|
It's not the tar format that is breaking (tar basically just concatenates all the files together like -- aehm -- lump of tar) but gzip.
I'm not sure if that can be fixed, but the gzip home page has a guide. It is truly non-trivial though.
HTH and Good Luck!
PS. That is why using compression of the archive is not a good idea for a backup. Small corruptions can destroy the whole backup. Much better to compress the individual files before archiving. _________________ Please put [SOLVED] in your topic if you are a moron. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|