Discussion:
Question about bzip2 and bzip2recover and tar
(too old to reply)
Paul E Condon
2006-07-27 15:10:10 UTC
Permalink
I have a big .tbz file that I need to unzip and read, but I got a
error message that suggested I try bzip2recover. So I ran
bzip2recover and it produced 4282 files named:
rec0nnnncarols051011x.tbz.bz2
where nnnn is the numbers 0001 through 4282.

I am in the process of unzipping these files, but I don't know
what to do next. These are pieces of a tar file. Should I extract
them separately, or concatenate them and extract the concatenated
file, or is there some other process step?

Is there a HOW TO on this problem? Where?
--
Paul E Condon
***@mesanetworks.net
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Larry Irwin
2006-07-27 16:10:10 UTC
Permalink
If you can successfully extract each bz2 file, then you should be able to
cat the results sequentially into a tar file or stream and then extract....
If this listing script works, you should be OK...
for i in *.bz2
do
cat $i | bunzip2 || {
echo "Error. Exiting."
exit 1
}
done | tar tvf -
Later,
Larry Irwin

----- Original Message -----
From: "Paul E Condon" <***@mesanetworks.net>
To: <debian-***@lists.debian.org>
Sent: Thursday, July 27, 2006 10:34 AM
Subject: Question about bzip2 and bzip2recover and tar
Post by Paul E Condon
I have a big .tbz file that I need to unzip and read, but I got a
error message that suggested I try bzip2recover. So I ran
rec0nnnncarols051011x.tbz.bz2
where nnnn is the numbers 0001 through 4282.
I am in the process of unzipping these files, but I don't know
what to do next. These are pieces of a tar file. Should I extract
them separately, or concatenate them and extract the concatenated
file, or is there some other process step?
Is there a HOW TO on this problem? Where?
--
Paul E Condon
--
with a subject of "unsubscribe". Trouble? Contact
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Paul E Condon
2006-07-27 18:00:26 UTC
Permalink
Post by Larry Irwin
If you can successfully extract each bz2 file, then you should be able to
cat the results sequentially into a tar file or stream and then extract....
If this listing script works, you should be OK...
for i in *.bz2
do
cat $i | bunzip2 || {
echo "Error. Exiting."
exit 1
}
done | tar tvf -
Later,
Larry Irwin
Thanks.
I didn't use your script, but I was able to unzip all but one of the files.
File 3029, of the 4282 files, had unrecoverable errors.
All the others were turned into:
rec0nnnncarols051011x.tbz
I concatenated these into file xxx.tar and ran a extract.
It worked, mostly. But it died at the place where there was a missing
piece. I think I need some kind of filler that allows tar to get
past the glitch and keep going. Or maybe I just have to be
satisfied with only 3/4 recovery.

Are there any known approaches that recover the data following the
bad spot?
Post by Larry Irwin
----- Original Message -----
Sent: Thursday, July 27, 2006 10:34 AM
Subject: Question about bzip2 and bzip2recover and tar
Post by Paul E Condon
I have a big .tbz file that I need to unzip and read, but I got a
error message that suggested I try bzip2recover. So I ran
rec0nnnncarols051011x.tbz.bz2
where nnnn is the numbers 0001 through 4282.
I am in the process of unzipping these files, but I don't know
what to do next. These are pieces of a tar file. Should I extract
them separately, or concatenate them and extract the concatenated
file, or is there some other process step?
Is there a HOW TO on this problem? Where?
--
Paul E Condon
--
with a subject of "unsubscribe". Trouble? Contact
--
with a subject of "unsubscribe". Trouble? Contact
--
Paul E Condon
***@mesanetworks.net
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Larry Irwin
2006-07-27 18:50:06 UTC
Permalink
I use "bvi" to fix things like that...
If you would like to skype back and forth on how to use it to clip binary
files for recovery, let me know...
You have to explore the files and determine where to delete at the end of
the last good file and at the beginning of the first good file after the
glitch....
Then cat them together essentially clipping out cleanly the header, bad
section and trailer...
Then tar can get everything except the bad section and a little bit before
and after the bad section...
bvi is a great recovery tool when the only copy you have left has
problems...

----- Original Message -----
From: "Paul E Condon" <***@mesanetworks.net>
To: <debian-***@lists.debian.org>
Sent: Thursday, July 27, 2006 1:45 PM
Subject: Re: Question about bzip2 and bzip2recover and tar
Post by Paul E Condon
Post by Larry Irwin
If you can successfully extract each bz2 file, then you should be able to
cat the results sequentially into a tar file or stream and then extract....
If this listing script works, you should be OK...
for i in *.bz2
do
cat $i | bunzip2 || {
echo "Error. Exiting."
exit 1
}
done | tar tvf -
Later,
Larry Irwin
Thanks.
I didn't use your script, but I was able to unzip all but one of the files.
File 3029, of the 4282 files, had unrecoverable errors.
rec0nnnncarols051011x.tbz
I concatenated these into file xxx.tar and ran a extract.
It worked, mostly. But it died at the place where there was a missing
piece. I think I need some kind of filler that allows tar to get
past the glitch and keep going. Or maybe I just have to be
satisfied with only 3/4 recovery.
Are there any known approaches that recover the data following the
bad spot?
Post by Larry Irwin
----- Original Message -----
Sent: Thursday, July 27, 2006 10:34 AM
Subject: Question about bzip2 and bzip2recover and tar
Post by Paul E Condon
I have a big .tbz file that I need to unzip and read, but I got a
error message that suggested I try bzip2recover. So I ran
rec0nnnncarols051011x.tbz.bz2
where nnnn is the numbers 0001 through 4282.
I am in the process of unzipping these files, but I don't know
what to do next. These are pieces of a tar file. Should I extract
them separately, or concatenate them and extract the concatenated
file, or is there some other process step?
Is there a HOW TO on this problem? Where?
--
Paul E Condon
--
with a subject of "unsubscribe". Trouble? Contact
--
with a subject of "unsubscribe". Trouble? Contact
--
Paul E Condon
--
with a subject of "unsubscribe". Trouble? Contact
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Loading...