Re: Please tell me this is curable...

2000-01-25 Thread Patrick Kirk
Success!  The ones that were put up in ascii and taken down in binary are
recovered.  The others need to be downloaded again but at least the most
important documents are recovered.

Many thanks!

My old mailbox is still in a tar-ball - did you get back about the beer
sometime?

Patrick

- Original Message -
From: "Philip Hands" <[EMAIL PROTECTED]>
To: "Patrick Kirk" <[EMAIL PROTECTED]>
Cc: "rick" <[EMAIL PROTECTED]>; 
Sent: Tuesday, January 25, 2000 11:08 AM
Subject: Re: Please tell me this is curable...


> "Patrick Kirk" <[EMAIL PROTECTED]> writes:
>
> > Can you recall the name of any of these Windows utilities?  Or has
nayone
> > done this in the past and have the awk script lying about?
> > > The problem is the lf -> crlf switch.  Just reverse it.  There
> > > will be posts saying this won't work but it will.  You'd think
> > > it doesn't work because what about valid crlf pairs in the
> > > original data.  But they get changed to crcrlf by the ascii
>
> Ah, good point.  Assuming it's true:
>
>   perl -ne 's/\r\n/\n/g; print;'  broken.tar > fixed.tar
>
> should do the trick.
>
> Cheers, Phil.
>


Re: Please tell me this is curable...

2000-01-25 Thread Colin Watson
[EMAIL PROTECTED] (Colin Watson) wrote:
>[EMAIL PROTECTED] (rick) wrote:
>>The problem is the lf -> crlf switch.  Just reverse it.  There
>>will be posts saying this won't work but it will.  You'd think
>>it doesn't work because what about valid crlf pairs in the
>>original data.  But they get changed to crcrlf by the ascii
>>transfer and back to crlf by the fix.  It would be a problem
>>if you were hitting the data recursively but you're just doing
>>one pass.
>
>ASCII transfer isn't clever enough to spot CRLFs, then? (Can't test this
>just at the moment, so I'll take your word for it.)
>
>>I know there are little windows utils to do this but someone
>>can cobble up an awk one-liner or something.  I did it with rexx.
>
>awk '{ print "\r" $0 }' seems to do it, though this is only lightly
>tested.

... as long as I read the problem the wrong way round. I of course
meant:

  awk '{ gsub(/\r$/, ""); print }'

-- 
Colin Watson   [EMAIL PROTECTED]


Re: Please tell me this is curable...

2000-01-25 Thread Philip Hands
"Patrick Kirk" <[EMAIL PROTECTED]> writes:

> Can you recall the name of any of these Windows utilities?  Or has nayone
> done this in the past and have the awk script lying about?
> > The problem is the lf -> crlf switch.  Just reverse it.  There
> > will be posts saying this won't work but it will.  You'd think
> > it doesn't work because what about valid crlf pairs in the
> > original data.  But they get changed to crcrlf by the ascii

Ah, good point.  Assuming it's true:

  perl -ne 's/\r\n/\n/g; print;'  broken.tar > fixed.tar

should do the trick.

Cheers, Phil.


Re: Please tell me this is curable...

2000-01-25 Thread Colin Watson
[EMAIL PROTECTED] (rick) wrote:
>In article
><[EMAIL PROTECTED]> you
>wrote:
>> Maybe you transferred it in ASCII mode.  Hopefully you didn't transfer it
>> in ASCII mode when you sent it to the NT box because then you'll never get
>> it back.  If you did it in ASCII mode sending it back to the Linux system
>> then you must simply resend it in binary.
>
>The problem is the lf -> crlf switch.  Just reverse it.  There
>will be posts saying this won't work but it will.  You'd think
>it doesn't work because what about valid crlf pairs in the
>original data.  But they get changed to crcrlf by the ascii
>transfer and back to crlf by the fix.  It would be a problem
>if you were hitting the data recursively but you're just doing
>one pass.

ASCII transfer isn't clever enough to spot CRLFs, then? (Can't test this
just at the moment, so I'll take your word for it.)

>I know there are little windows utils to do this but someone
>can cobble up an awk one-liner or something.  I did it with rexx.

awk '{ print "\r" $0 }' seems to do it, though this is only lightly
tested.

-- 
Colin Watson   [EMAIL PROTECTED]


Re: Please tell me this is curable...

2000-01-25 Thread Dänzer


--- rick <[EMAIL PROTECTED]> wrote:

> I know there are little windows utils to do this but someone
> can cobble up an awk one-liner or something.  I did it with rexx.

Am I missing something, or should dos2unix/unix2dos from the sysutils pckage
do the job?


Michel


=
"Software is like sex; it's better when it's free"
 -- Linus Torvalds

"If you continue running Windows, your system may become unstable."
 -- Windows 95 BSOD
__
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com


Re: Please tell me this is curable...

2000-01-25 Thread Patrick Kirk

Can you recall the name of any of these Windows utilities?  Or has nayone
done this in the past and have the awk script lying about?
> The problem is the lf -> crlf switch.  Just reverse it.  There
> will be posts saying this won't work but it will.  You'd think
> it doesn't work because what about valid crlf pairs in the
> original data.  But they get changed to crcrlf by the ascii
> transfer and back to crlf by the fix.  It would be a problem
> if you were hitting the data recursively but you're just doing
> one pass.
>
> I know there are little windows utils to do this but someone
> can cobble up an awk one-liner or something.  I did it with rexx.
>
> Rick
>
>
> --
> Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED] <
/dev/null
>
>


Re: Please tell me this is curable...

2000-01-24 Thread aphro
im no data recovery expert but chances are good that the files are gone,
tar doesnt have good(if any) file recover capabilities .. gzip does but
recovering data from a gzip file is a long and boring process, usually it
just writes the blocks of data to individual files leaving it up to you to
sort it out..which can be VERY complicated

if the data is _that_ important, and nobody else on the list can help it
may be possible to contact a commercial agency to assist in the recovery
of the data(costs could go into the thousands easy though)

nate

On Mon, 24 Jan 2000, Patrick wrote:

patric >On Mon, Jan 24, 2000 at 02:16:38PM -0800, aphro wrote:
patric >> try using the command:
patric >> 
patric >> file 
patric >> 
patric >> to determine what kind of file it is..
patric >> 
patric >> it may be curropted..
patric >
patric >Thanks.  The big q is what's the recovery procedure?
patric >> 
patric >> nate
patric >> 
patric >> On Mon, 24 Jan 2000, Patrick wrote:
patric >> 
patric >> patric >Over the weekend, I took my trusty server which had multiple 
partitions and swap files for RH, SuSE, NT and Debian and turned the whole 
thing over to Debian.
patric >> patric >
patric >> patric >Naturally, I backed up 4 Gigs of data first using tar czvf.  
Did a few tests and all seemed to work as tar xzvf recreated the files.
patric >> patric >
patric >> patric >Now its not working as when I ftp the data in from NT, I get 
this:
patric >> patric >
patric >> patric >[EMAIL PROTECTED]:~$ tar xzvf datstore
patric >> patric >tar: This does not look like a tar archive
patric >> patric >tar: Skipping to next header
patric >> patric >
patric >> patric >gzip: stdin: invalid compressed data--format violated
patric >> patric >tar: Child returned status 1
patric >> patric >tar: Error exit delayed from previous errors
patric >> patric >[EMAIL PROTECTED]:~$
patric >> patric >
patric >> patric >
patric >> patric >There's several thousand important files at stake here...can 
anyone tell me how to recover them?
patric >> patric >
patric >> patric >Please...
patric >> patric >
patric >> patric >Patrick
patric >> patric >
patric >> patric >
patric >> patric >
patric >> patric >
patric >> patric >-- 
patric >> patric >Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED] < 
/dev/null
patric >> patric >
patric >> 
patric >> [mailto:[EMAIL PROTECTED] ]--
patric >>Vice President Network Operations   http://www.firetrail.com/
patric >>   Firetrail Internet Services Limited  http://www.aphroland.org/
patric >>Everett, WA 425-348-7336
http://www.linuxpowered.net/
patric >> Powered By:
http://comedy.aphroland.org/
patric >> Debian 2.1 Linux 2.0.36 SMPhttp://yahoo.aphroland.org/
patric >> -[mailto:[EMAIL PROTECTED] ]--
patric >> 2:15pm up 158 days, 2:21, 1 user, load average: 1.10, 1.04, 1.01
patric >> 
patric >> 
patric >> -- 
patric >> Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED] < /dev/null
patric >> 
patric >

[mailto:[EMAIL PROTECTED] ]--
   Vice President Network Operations   http://www.firetrail.com/
  Firetrail Internet Services Limited  http://www.aphroland.org/
   Everett, WA 425-348-7336http://www.linuxpowered.net/
Powered By:http://comedy.aphroland.org/
Debian 2.1 Linux 2.0.36 SMPhttp://yahoo.aphroland.org/
-[mailto:[EMAIL PROTECTED] ]--
3:31pm up 158 days, 3:37, 1 user, load average: 1.22, 1.11, 1.02


Re: Please tell me this is curable...

2000-01-24 Thread Henrique M Holschuh
On Mon, 24 Jan 2000, Patrick wrote:
> Thanks.  The big q is what's the recovery procedure?

Fixing by hand or writing a tool do to so. But hunt the net first, someone
might have done it already.

Let's supose your file got corrupted by a ASCII upload from UNIX -> NT.

First, you must guarantee that you're downloading the file back to UNIX in
BINARY mode so as not to make matters worse. Then you use some clues to get
the bytes right again. Sometimes it can be automated, but most of the time
not. And you WILL have to write the code to do so.

If you uploaded stuff from Unix to M$dog-like systems (NT, Win9x...) in
ASCII mode, AFAIK the corruption is that every 0A0D pair in the input stream
(the corrupted file) *might* be either 0A0D or 0A only.

You could write code that uses heuristics to read in the tar file, use the
offsets, file size, headers and CRC (if there is one) from the tar file
itself (as long as it does not contain a 0A0D in there... :-( ) to extract
the corrupted chunk which should be one file, then apply all possible
transformations (reduced by the heuristicts. E.g.: if you have the original
file size, you know how many bytes were corrupted, and that reduces the set
of possible valid 'fixes') and use the CRC to verify if the 'fixed' file is
correct.

Text files are trivial to fix. They're not even too badly screwed up, just
tar can't find them because the offsets in the tar headers are wrong. A
program to repair this kind of damage probably exists already.

If your data is very important and this type of data recovery is a bit above
your current time/knowledge constrains, you'll find someone who can do that
for you, but it may not come cheap.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh 


Re: Please tell me this is curable...

2000-01-24 Thread Patrick
On Mon, Jan 24, 2000 at 02:16:38PM -0800, aphro wrote:
> try using the command:
> 
> file 
> 
> to determine what kind of file it is..
> 
> it may be curropted..

Thanks.  The big q is what's the recovery procedure?
> 
> nate
> 
> On Mon, 24 Jan 2000, Patrick wrote:
> 
> patric >Over the weekend, I took my trusty server which had multiple 
> partitions and swap files for RH, SuSE, NT and Debian and turned the whole 
> thing over to Debian.
> patric >
> patric >Naturally, I backed up 4 Gigs of data first using tar czvf.  Did a 
> few tests and all seemed to work as tar xzvf recreated the files.
> patric >
> patric >Now its not working as when I ftp the data in from NT, I get this:
> patric >
> patric >[EMAIL PROTECTED]:~$ tar xzvf datstore
> patric >tar: This does not look like a tar archive
> patric >tar: Skipping to next header
> patric >
> patric >gzip: stdin: invalid compressed data--format violated
> patric >tar: Child returned status 1
> patric >tar: Error exit delayed from previous errors
> patric >[EMAIL PROTECTED]:~$
> patric >
> patric >
> patric >There's several thousand important files at stake here...can anyone 
> tell me how to recover them?
> patric >
> patric >Please...
> patric >
> patric >Patrick
> patric >
> patric >
> patric >
> patric >
> patric >-- 
> patric >Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED] < /dev/null
> patric >
> 
> [mailto:[EMAIL PROTECTED] ]--
>Vice President Network Operations   http://www.firetrail.com/
>   Firetrail Internet Services Limited  http://www.aphroland.org/
>Everett, WA 425-348-7336http://www.linuxpowered.net/
> Powered By:http://comedy.aphroland.org/
> Debian 2.1 Linux 2.0.36 SMPhttp://yahoo.aphroland.org/
> -[mailto:[EMAIL PROTECTED] ]--
> 2:15pm up 158 days, 2:21, 1 user, load average: 1.10, 1.04, 1.01
> 
> 
> -- 
> Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED] < /dev/null
> 


Re: Please tell me this is curable...

2000-01-24 Thread aphro
try using the command:

file 

to determine what kind of file it is..

it may be curropted..

nate

On Mon, 24 Jan 2000, Patrick wrote:

patric >Over the weekend, I took my trusty server which had multiple partitions 
and swap files for RH, SuSE, NT and Debian and turned the whole thing over to 
Debian.
patric >
patric >Naturally, I backed up 4 Gigs of data first using tar czvf.  Did a few 
tests and all seemed to work as tar xzvf recreated the files.
patric >
patric >Now its not working as when I ftp the data in from NT, I get this:
patric >
patric >[EMAIL PROTECTED]:~$ tar xzvf datstore
patric >tar: This does not look like a tar archive
patric >tar: Skipping to next header
patric >
patric >gzip: stdin: invalid compressed data--format violated
patric >tar: Child returned status 1
patric >tar: Error exit delayed from previous errors
patric >[EMAIL PROTECTED]:~$
patric >
patric >
patric >There's several thousand important files at stake here...can anyone 
tell me how to recover them?
patric >
patric >Please...
patric >
patric >Patrick
patric >
patric >
patric >
patric >
patric >-- 
patric >Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED] < /dev/null
patric >

[mailto:[EMAIL PROTECTED] ]--
   Vice President Network Operations   http://www.firetrail.com/
  Firetrail Internet Services Limited  http://www.aphroland.org/
   Everett, WA 425-348-7336http://www.linuxpowered.net/
Powered By:http://comedy.aphroland.org/
Debian 2.1 Linux 2.0.36 SMPhttp://yahoo.aphroland.org/
-[mailto:[EMAIL PROTECTED] ]--
2:15pm up 158 days, 2:21, 1 user, load average: 1.10, 1.04, 1.01


Re: Please tell me this is curable...

2000-01-24 Thread Patrick Kirk
Strange...by a stroke of pure genius, you've hit on the answer I feared
most.

Sigh.

Thanks.

Patrick
 - alone with thoughts of what to tell the taxman.


Re: Please tell me this is curable...

2000-01-24 Thread Gary Hennigan
Patrick <[EMAIL PROTECTED]> writes:
> Over the weekend, I took my trusty server which had multiple
> partitions and swap files for RH, SuSE, NT and Debian and turned the
> whole thing over to Debian.
> 
> Naturally, I backed up 4 Gigs of data first using tar czvf.  Did a
> few tests and all seemed to work as tar xzvf recreated the files.
> 
> Now its not working as when I ftp the data in from NT, I get this:
> 
> [EMAIL PROTECTED]:~$ tar xzvf datstore
> tar: This does not look like a tar archive
> tar: Skipping to next header
> 
> gzip: stdin: invalid compressed data--format violated
> tar: Child returned status 1
> tar: Error exit delayed from previous errors
> [EMAIL PROTECTED]:~$
> 
> 
> There's several thousand important files at stake here...can anyone
> tell me how to recover them?
> 
> Please...

How are you transferring the file from NT to Linux? If you're pushing
it from NT to linux via ftp you might not be in binary mode and a
translation is being done to change CR/LF pairs to CR, as expected on
Unix systems. Make sure you're using binary mode, as in:

NT$ ftp debianbox
login: myname
password: mypass
ftp> bin
200 Type set to I.
ftp> put datstor


This also hold true if you're using some types of serial-to-serial
transfer method. Whatever method you're using make sure it's a
binary-mode transfer.

Of course if you didn't transfer it to the NT box in binary mode in
the first place you might be in trouble.

Gary


Re: Please tell me this is curable...

2000-01-24 Thread William T Wilson
On Mon, 24 Jan 2000, Patrick wrote:

> Now its not working as when I ftp the data in from NT, I get this:
> 
> [EMAIL PROTECTED]:~$ tar xzvf datstore
> tar: This does not look like a tar archive
> tar: Skipping to next header

Maybe you transferred it in ASCII mode.  Hopefully you didn't transfer it
in ASCII mode when you sent it to the NT box because then you'll never get
it back.  If you did it in ASCII mode sending it back to the Linux system
then you must simply resend it in binary.

> There's several thousand important files at stake here...can anyone
> tell me how to recover them?

>From tape? :}


Please tell me this is curable...

2000-01-24 Thread Patrick
Over the weekend, I took my trusty server which had multiple partitions and 
swap files for RH, SuSE, NT and Debian and turned the whole thing over to 
Debian.

Naturally, I backed up 4 Gigs of data first using tar czvf.  Did a few tests 
and all seemed to work as tar xzvf recreated the files.

Now its not working as when I ftp the data in from NT, I get this:

[EMAIL PROTECTED]:~$ tar xzvf datstore
tar: This does not look like a tar archive
tar: Skipping to next header

gzip: stdin: invalid compressed data--format violated
tar: Child returned status 1
tar: Error exit delayed from previous errors
[EMAIL PROTECTED]:~$


There's several thousand important files at stake here...can anyone tell me how 
to recover them?

Please...

Patrick