LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-23-2006, 03:36 PM   #1
Ictus
Member
 
Registered: Jan 2005
Location: Germany
Distribution: Fedora Core 4
Posts: 32

Rep: Reputation: 15
Unhappy FTP ascii mode messed up my files! :-(


Hello everyone!

I have a serious problem.
When i installed Windows on my laptop it overwrote the boot sector,
which is why i couldn't boot Fedora Core 4 anymore.
So i tried some things to fix the boot sector or boot FC4 somehow.
I didn't succeeded, unfortunately. :-(

So i downloaded Fedora Core 5, which just released Monday. I wanted to install it and clear the whole old Linux partition. But of course i needed an Backup of all important data!
So i burned the FC5 rescue disc and bootet it. Unable to rescue "GRUB", the bootmanager, or boot Fedora at all, i started making a backup.

For some reason i couldn't mount anything, "fstab couldnt be found...".
So i put the data into several tar archives and send them vie FTP to my "big" computer to store them as a backup. Unfortunately i forgot to type "binary" at first, so all the data was send in ascii mode!

And now none of the archives can be opened! The data somehow got messed up. Is there any chance to fix the files so that they work again!?

This is very important, since the backup contains some very important data.

Thanks a lot for any help in advance!!

Last edited by Ictus; 03-23-2006 at 03:38 PM. Reason: Forgot somethin
 
Old 03-23-2006, 03:56 PM   #2
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 53
I'm afraid I don't think it's possible, having done some research on google.
 
Old 03-23-2006, 10:07 PM   #3
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 542

Rep: Reputation: 33
Any way you can resend the data in binary mode?
 
Old 03-24-2006, 01:00 PM   #4
Ictus
Member
 
Registered: Jan 2005
Location: Germany
Distribution: Fedora Core 4
Posts: 32

Original Poster
Rep: Reputation: 15
No, that's exactly my problem. :-(
 
Old 03-29-2006, 12:00 PM   #5
Ictus
Member
 
Registered: Jan 2005
Location: Germany
Distribution: Fedora Core 4
Posts: 32

Original Poster
Rep: Reputation: 15
Even after hours of searching i only found people saying it was impossible to recover a binary file, that was destroyed by sending it via FTP ascii mode.

Luckily i'm kind of stubborn.
I just wrote a tiny cpp application myself to fix the files,
and what shall i say - it works!

Now my only problem is to implement a good-looking progress bar for the program in console mode, since it takes quite some minutes to fix files of several hundred megabytes.
 
Old 03-29-2006, 12:46 PM   #6
Dragineez
Member
 
Registered: Oct 2005
Location: Annapolis
Distribution: Ubuntu
Posts: 275

Rep: Reputation: 32
Good Job

You should post the code somewhere, I'm sure someone else will find it equally as useful one day.

I wouldn't bother with a "good-looking" status bar - I'd think the "I'm working" propeller would be just fine {-\|/-\|/-}. Of if you're bothering to calculate completion percentages, provide output or a hook for integration with other utilities.
 
Old 03-30-2006, 12:40 PM   #7
Ictus
Member
 
Registered: Jan 2005
Location: Germany
Distribution: Fedora Core 4
Posts: 32

Original Poster
Rep: Reputation: 15
I ended up doing it very simple.
It just says "repairing... x/y" now. Where y is the total number of chunks (1 MB each),
and x the currenty processed one.
I tried implementing a ETA display as well. But it wasn't very precise, so i let it off.

Where could i post the code, anyway?
 
Old 03-31-2006, 06:40 AM   #8
carambar
LQ Newbie
 
Registered: Dec 2005
Location: Swindon, UK
Distribution: Debian
Posts: 26

Rep: Reputation: 15
Wow, I'm impressed - I didn't think it would be possible, so kudos to you for getting it to fix the files

I'd agree that this is undoubtedly something that others could find useful. As far as where to release it... Have you thought about starting a project at Sourceforge? Even though you've got a working version, I'm sure that some others might suggest some possible improvements. Let us know the name of the project, if you do decide to release this.
 
Old 03-31-2006, 08:45 AM   #9
Dragineez
Member
 
Registered: Oct 2005
Location: Annapolis
Distribution: Ubuntu
Posts: 275

Rep: Reputation: 32
Second The Motion

I was going to suggest SourceForge as well - but I don't know what is involved in starting a project there and whether or not there is any cost involved.

This would be a good question to ask in the Programming forum.
 
Old 03-31-2006, 03:19 PM   #10
Ictus
Member
 
Registered: Jan 2005
Location: Germany
Distribution: Fedora Core 4
Posts: 32

Original Poster
Rep: Reputation: 15
Thanks.
I posted the project on SourgeForge.
It will take a few days till the project gets rejected...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux/UNIX differences with vi and ftp ascii transfers KenMadsen Linux - Newbie 2 06-20-2005 09:51 AM
floppy files messed up Trio3b Linux - Hardware 1 04-25-2005 10:02 AM
window-linux ftp messed up unicode? doublefailure Linux - Networking 0 03-12-2003 12:28 PM
how can I restrict ftp users listing files from a pure-ftp server adrianmak Linux - Networking 2 12-31-2002 08:23 AM
ASCII mode in Xwindow... Red Guy Linux - Newbie 4 06-01-2002 09:21 PM


All times are GMT -5. The time now is 12:32 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration