Re: corrupted tar.gz archive - I lost my backups :)/:(

2012-02-14 Thread Lowell Gilbert
Pegasus Mc Cleaft k...@mthelicon.com writes:

 It recreates something, but the most important files, which reside in
 subfolders of the given tar.gz archives are gone, i.e. the subfolders
 are empty.
 The gunzip strategy you mentioned yields the same as a regular tar -xvf
 file.tar.gz.
 
 Pegasus, I have yet to try the pax(1) approach. I will let you know
 about how that went.

 Hum.. I'm not sure if pax will be able to help in this case. From the
 looks of it, somehow the compressed data got corrupted - I don't think pax
 will be able to deal with this any better than tar did. 

Probably correct; the right data isn't there, no tool is going to be
able to recover it. Data compression makes this more fragile (i.e., lose
the rest of the archive as opposed to only the files in which the data
corruption occurs.

 I wonder if there was a change in gzip (like maybe libarchive) between the
 two versions of BSD that might be causing the problem. If I were attacking
 the problem, I might try booting up off a 7.x bootcd and see if I can gzip
 --test the archive from the usb stick. 

It's easy enough to try, but it seems awfully unlikely to help; lots of
us have .tar.gz files going back a couple of decades, and if there were
ever new implementations that couldn't understand the old ones, some old
hand would have noticed by now.

Media errors happen, and preparing for them involves noticing them
before you try to use the data, as well as recovering if they go bad. 
The user seems to have knowingly only had one copy of the valuable data, 
which makes the word backup a bit of an unusual usage of the term...

--Lowell
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: corrupted tar.gz archive - I lost my backups :)/:(

2012-02-14 Thread Mike Kelly

 I don't have the script anymore. It is among the files lost, but it was
 pretty
 much straight forward, making use of:
 tar -czf backupfile.tar.gz folders/ of/ my/ choice/.

 After creating the backups I just cp(1)ed them to an msdosfs formated
 usb stick and got them onto 8.2 this way, so the famous ascii/binary
 trap shouldn't be
 an issue here.

 Just a thought... how large were the tar.gz files? Are you maybe hitting
on a file size limit and the .tar.gz files are getting truncated? Not sure
what the limit is for msdosfs.

--
Mike Kelly
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: corrupted tar.gz archive - I lost my backups :)/:(

2012-02-14 Thread Waitman Gobble
On Feb 14, 2012 7:37 AM, Mike Kelly mdke...@ualr.edu wrote:

 
  I don't have the script anymore. It is among the files lost, but it was
  pretty
  much straight forward, making use of:
  tar -czf backupfile.tar.gz folders/ of/ my/ choice/.
 
  After creating the backups I just cp(1)ed them to an msdosfs formated
  usb stick and got them onto 8.2 this way, so the famous ascii/binary
  trap shouldn't be
  an issue here.
 
  Just a thought... how large were the tar.gz files? Are you maybe hitting
 on a file size limit and the .tar.gz files are getting truncated? Not sure
 what the limit is for msdosfs.

 --
 Mike Kelly
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
freebsd-questions-unsubscr...@freebsd.org

or perhaps pulled the drive before unmounting... with pending writes. just
a thought.

Waitman Gobble
San Jose California USA
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: corrupted tar.gz archive - I lost my backups :)/:(

2012-02-14 Thread C. P. Ghost
On Tue, Feb 14, 2012 at 2:56 AM, _ pancakekin...@gmail.com wrote:
 Trying to recover these files on 8.2, I found that some of the archives -
 unfortunately those with
 the files that are dear to me - are corrupted.

Do you have MD5, SHA256 etc... checksums of the
.tar.gz files somewhere? Do they still match, or do
they differ now?

(If they match, you have a software problem with tar
or gzip; try reading the files under Linux (Knoppix?)
just to be sure. If they don't match, either the media
is corrupt (very likely), or something's wrong on the
code path that reads your backup device (a lot less
likely))

-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: corrupted tar.gz archive - I lost my backups :)/:(

2012-02-14 Thread krad
Just another silly thought try the tar j flag rather than the z flag, as
you might have got your compression algorithms confused. Try the xz one as
well just in case
On Feb 14, 2012 3:37 PM, Mike Kelly mdke...@ualr.edu wrote:

 
  I don't have the script anymore. It is among the files lost, but it was
  pretty
  much straight forward, making use of:
  tar -czf backupfile.tar.gz folders/ of/ my/ choice/.
 
  After creating the backups I just cp(1)ed them to an msdosfs formated
  usb stick and got them onto 8.2 this way, so the famous ascii/binary
  trap shouldn't be
  an issue here.
 
  Just a thought... how large were the tar.gz files? Are you maybe hitting
 on a file size limit and the .tar.gz files are getting truncated? Not sure
 what the limit is for msdosfs.

 --
 Mike Kelly
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 freebsd-questions-unsubscr...@freebsd.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: corrupted tar.gz archive - I lost my backups :)/:(

2012-02-14 Thread Lowell Gilbert
krad kra...@gmail.com writes:

 Just another silly thought try the tar j flag rather than the z flag, as
 you might have got your compression algorithms confused. Try the xz one as
 well just in case

The system tar (based on libarchive) will figure all of this out for
you, regardless of which flag you give it.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


RE: corrupted tar.gz archive - I lost my backups :)/:(

2012-02-13 Thread Pegasus Mc Cleaft
Hi, 

It would depend, I think, on how the file is corrupted.  Is it the
compressed data that is corrupted or the uncompressed tar stream?  You might
want to try the pax(1) utility to see if it is able to push through the
errors (if its in the tar stream). 

I was able to recover data from a corrupted cpio file that I created
(I was using huge file lengths and didn't realize that cpio had a file size
limit). 

Peg

 -Original Message-
 From: owner-freebsd-questi...@freebsd.org [mailto:owner-freebsd-
 questi...@freebsd.org] On Behalf Of _
 Sent: 14 February 2012 01:57
 To: freebsd-questions@freebsd.org
 Subject: corrupted tar.gz archive - I lost my backups :)/:(
 
 Hi,
 
 Before making the move from 7.0 to 8.2, I ran a little script that did a
 backup of selected files and folders.
 
 Trying to recover these files on 8.2, I found that some of the archives
 - unfortunately those with the files that are dear to me - are
 corrupted.
 
 In other words, I just wanted to ask if there's anyone on here, who
 knows of a good repair utility for corrupted tar.gz archives?
 
 Thanks
 
 pancakeking79
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-
 unsubscr...@freebsd.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: corrupted tar.gz archive - I lost my backups :)/:(

2012-02-13 Thread APseudoUtopia
On Mon, Feb 13, 2012 at 8:56 PM, _ pancakekin...@gmail.com wrote:
 Hi,

 Before making the move from 7.0 to 8.2, I ran a little script that did a
 backup of selected files
 and folders.

 Trying to recover these files on 8.2, I found that some of the archives -
 unfortunately those with
 the files that are dear to me - are corrupted.

 In other words, I just wanted to ask if there's anyone on here, who knows
 of a good repair
 utility for corrupted tar.gz archives?

 Thanks

 pancakeking79

HrmWhat command/script did you run to create the archive? How did
you transfer it over to the new system? What command are you using to
attempt to extract it, and what error is it giving?

You can try:
gunzip  archive.tar.gz  archive.partial.tar
Which may or may not giving you some of the files into the
archive.partial.tar file.

What does gzip --test archive.tar.gz give?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: corrupted tar.gz archive - I lost my backups :)/:(

2012-02-13 Thread _
2012/2/14, APseudoUtopia apseudouto...@gmail.com:
 On Mon, Feb 13, 2012 at 8:56 PM, _ pancakekin...@gmail.com wrote:
 Hi,

 Before making the move from 7.0 to 8.2, I ran a little script that did a
 backup of selected files
 and folders.

 Trying to recover these files on 8.2, I found that some of the archives -
 unfortunately those with
 the files that are dear to me - are corrupted.

 In other words, I just wanted to ask if there's anyone on here, who knows
 of a good repair
 utility for corrupted tar.gz archives?

 Thanks

 pancakeking79

 HrmWhat command/script did you run to create the archive? How did
 you transfer it over to the new system? What command are you using to
 attempt to extract it, and what error is it giving?

 You can try:
 gunzip  archive.tar.gz  archive.partial.tar
 Which may or may not giving you some of the files into the
 archive.partial.tar file.

 What does gzip --test archive.tar.gz give?


I don't have the script anymore. It is among the files lost, but it was pretty
much straight forward, making use of:
tar -czf backupfile.tar.gz folders/ of/ my/ choice/.

After creating the backups I just cp(1)ed them to an msdosfs formated
usb stick and got them onto 8.2 this way, so the famous ascii/binary
trap shouldn't be
an issue here.

Here are some of the outputs I get:

# ls
setcd12292011.tar.gzsu12292011.tar.gz
sr12292011.tar.gz
# tar -xvf sr12292011.tar.gz
x root/
[snipped]
tar: Error exit delayed from previous errors.
# tar -xvf su12292011.tar.gz
x usr/home/user/
[snipped]
tar: Damaged tar archive
tar: Retrying...
tar: Damaged tar archive
tar: Retrying...
tar: Damaged tar archive
tar: Retrying...
tar: Damaged tar archive
tar: Retrying...
tar: Damaged tar archive
tar: Retrying...
tar: gzip decompression failed
tar: Error exit delayed from previous errors.
# gzip --test sr12292011.tar.gz
gzip: data stream error
gzip: sr12292011.tar.gz: uncompress failed
# gunzip  sr12292011.tar.gz  archive.partial.tar
gunzip: data stream error

It recreates something, but the most important files, which reside in
subfolders of the given tar.gz archives are gone, i.e. the subfolders
are empty.
The gunzip strategy you mentioned yields the same as a regular tar
-xvf file.tar.gz.

Pegasus, I have yet to try the pax(1) approach. I will let you know
about how that went.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


RE: corrupted tar.gz archive - I lost my backups :)/:(

2012-02-13 Thread Pegasus Mc Cleaft


 -Original Message-

SNIP

 tar: Damaged tar archive
 tar: Retrying...
 tar: gzip decompression failed
 tar: Error exit delayed from previous errors.
 # gzip --test sr12292011.tar.gz
 gzip: data stream error
 gzip: sr12292011.tar.gz: uncompress failed # gunzip  sr12292011.tar.gz
  archive.partial.tar
 gunzip: data stream error
 
 It recreates something, but the most important files, which reside in
 subfolders of the given tar.gz archives are gone, i.e. the subfolders
 are empty.
 The gunzip strategy you mentioned yields the same as a regular tar -xvf
 file.tar.gz.
 
 Pegasus, I have yet to try the pax(1) approach. I will let you know
 about how that went.

Hum.. I'm not sure if pax will be able to help in this case. From the
looks of it, somehow the compressed data got corrupted - I don't think pax
will be able to deal with this any better than tar did. 

I wonder if there was a change in gzip (like maybe libarchive) between the
two versions of BSD that might be causing the problem. If I were attacking
the problem, I might try booting up off a 7.x bootcd and see if I can gzip
--test the archive from the usb stick. 

Peg


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: corrupted tar.gz archive - I lost my backups :)/:(

2012-02-13 Thread Adam Vande More
On Mon, Feb 13, 2012 at 7:56 PM, _ pancakekin...@gmail.com wrote:

 Before making the move from 7.0 to 8.2, I ran a little script that did a
 backup of selected files
 and folders.


I think it's IT tip #2 You don't have a backup unless it's tested.  #1 is
Make a backup.

You could try archivers/gzrecover

Good luck,

-- 
Adam Vande More
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: corrupted tar.gz archive - I lost my backups :)/:(

2012-02-13 Thread _
2012/2/14, Adam Vande More amvandem...@gmail.com:
 On Mon, Feb 13, 2012 at 7:56 PM, _ pancakekin...@gmail.com wrote:

 Before making the move from 7.0 to 8.2, I ran a little script that did a
 backup of selected files
 and folders.


 I think it's IT tip #2 You don't have a backup unless it's tested.  #1 is
 Make a backup.

If I am not mistaken, I did test my backups and they worked fine.
After all, one of the four files that I have unpacks with no problems
so I don't see where things could have gone wrong.

 You could try archivers/gzrecover

After gzrecover and cpio, the process stops at the same point where
the tar(1) command stops. It simply doesn't make it beyond the
boundary where the file is corrupted.

 Good luck,

 --
 Adam Vande More



Here is what pax(1) gave me:

# pax -rzf su12292011.tar.gz
pax: Invalid header, starting valid header search.
gzip: data stream error
pax: End of archive volume 1 reached

ATTENTION! pax archive volume change required.
Ready for archive volume: 2
Input archive name or . to quit pax.
Archive name  .
Quitting pax!
#

Nothing new here. It seems like pax simply invokes gzip(1) internally.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org