« The wheels of justice grind slowlyAT&T U-Verse Fail »

Recovering a corrupted tar file

02/23/14

  19:33:00 by Joe, Categories: General, Open Source, Linux

This probably has happened to a lot of people:
You think you have backed up your files with tar, but when disaster strikes, and you need to restore the files, you find that your tar archive is corrupted...
This happened to me this weekend, and seeing the dreaded "bzip2: Data integrity error when decompressing" error (the tar file was compressed with bzip2,) I had pretty much resigned myself to an hour or two of hex editing to skip the damages files and stitch the tar file back together...

But the Internet to the rescue &#59;)
It turns out somebody already did the hard work, and has a handy Perl script on his website to find the next file header in the tar archive.
So, all that needed to be done was to run the Perl script and then tail to skip the broken parts. The details are on the aforementioned website.
I had the good files out of the tarfile in a few minutes. This is why I love Open Source :)

Update: the author of the Perl script I used now has made available an even easier tool: repair corrupt tar archives ? the better way.

No feedback yet


Form is loading...

Posts about whatever I find worthy of posting...
April 2024
Mon Tue Wed Thu Fri Sat Sun
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30          
 << <   > >>

Search

  XML Feeds

powered by b2evolution