bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] Robustness of tar.gz files?


From: Jan-Benedict Glaw
Subject: Re: [Bug-tar] Robustness of tar.gz files?
Date: Wed, 3 Oct 2007 12:22:21 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

On Wed, 2007-10-03 10:56:01 +0300, Sergey Poznyakoff <address@hidden> wrote:
> Juhana Sadeharju <address@hidden> ha escrit:
> 
> > Hello. I have large tar.gz packages in archive DVDs.
> > What if the file gets corrupted? Is the whole file
> > useless? For example, what happens if one byte is
> > altered short after the begin?
[...]
> If your compressed archive gets corrupted, you should first try
> to recover it using appropriate tool (bzip2recover for bzipped files,
> for example) and then to extract it using tar. In any case, you will
> have to recover it manually, tar won't do it for you.

Just to add: recovering a tar archive is actually quite easy.

1- Extract the tarball up to the point where you get some error
2- Find the next file header. (This starts with the file's name.)
3- Copy all the part starting off the position you found in (2)
   to a new file, or alternatively zero out all the prepending
   part.
4- Extract the reminder (in case you zeroed out the first part,
   add the `-i' option to the command line.)

Other archive formats (eg. broken ZIP files) are similar to recover,
maybe even easier in case when there's corruption in a compressed
file, since the ZIP format compresses each file individualy, instead
of the whole archive's stream.

MfG, JBG

-- 
      Jan-Benedict Glaw      address@hidden              +49-172-7608481
Signature of:         Alles wird gut! ...und heute wirds schon ein bißchen 
besser.
the second  :

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]