Jump to content

recovery data ext3..


linux_noob

Recommended Posts

yesterday i had a bad superblock erro on my ubuntu machine, i did my search tried many ways to put the system up and running again but i made a mistake e used "mke2fs /dev/sda1" witch formated my drive. . . . what i wanted to know is if its possible to get back the hole partition even if it has the bad superblocks beacuse then i could backup every thing. . . and i already tried foremost and it's not what i want. . .

thanks in advance,

( sorry if i wrote something wrong)

Link to comment
Share on other sites

the only thing you did wrong was post this in the wrong section, apart from that there are many options to recovering the EXT3 data, i personly use GetDataBack EXT, though this is a corparate application and im sure there are OS / Freeware apps out there.

Best bet would be to google: "EXT3 Data Recovery", this will turn up many of resaults. Sorry im rather tired and am heading out the door, so i dont have time to find you a like to an application.

Link to comment
Share on other sites

i did search that allready and i got 2 or 3 progs running to get data back but that's not what i expected...they only get me garbage files images some mp3 that i already got backed-up but i was expecting a full restoration of the directories or at least get some mysql databases and scripts that i made...but i only get files from windows ( a lot before i stick with ubuntu i got all major linux distributions...)... :-(

I was wondering if i format the partition to ext3 has it was before i formated it, would it be easier to get the files that i want or i'm rly screwed??

sorry bad english

Link to comment
Share on other sites

From what I can tell, ext3 makes it very hard to recover deleted data. for more info you should read the specs sheet but you maybe out of luck here. People always slate ntfs but it really is very resiliant to data loss, to the point where I could recover the odd file from a machine which had been re-imaged 9 times. 

Link to comment
Share on other sites

yesterday i had a bad superblock erro on my ubuntu machine, i did my search tried many ways to put the system up and running again but i made a mistake e used "mke2fs /dev/sda1" witch formated my drive. . . . what i wanted to know is if its possible to get back the hole partition even if it has the bad superblocks beacuse then i could backup every thing. . . and i already tried foremost and it's not what i want. . .

Did you try 'fsck.ext3 /dev/sda1'?

Link to comment
Share on other sites

I think you are pretty hosed in relation to recovering your data as you have reformatted the partition. This will have blown away the journal and build a new clean one. Though here are the steps I would have tried to recover your File System before you did your mkfs.ext3 over it accidently.

1. Find a backup sperblock: # mkfs.ext3 -n <partition>

This will display the backup supreblocks that it would have use to create the File System. I keep a copy of these for all of my servers.

2. Run fsck using a backup super block: # fsck.ext3 -b <superblock> device

When you run this it will ask you questions and require your interaction you can add a -y and it will answer yes to all of the questions. Or use the -p to preen or repair the file system.

3. Reboot 

This will have placed you File System back to a clan stats or fsck will run again and reboot and this will fix it if it is able to be repaired.

You could try this against the parttion that you did a mkfs against though I dont see it working as the journal and backup superblocks will have been nuked and rebuilt clean.

Link to comment
Share on other sites

befor, what did it report?

like i said...bad superblock the disk only could have superblocks util it reaches a certain number but there were superblocks with numbers bigger than the possible ones...something like that.. i couldn't boot but i could access the fs with a live cd...but does it rly matter? it's possible to get my stuff back? :?

I think you are pretty hosed in relation to recovering your data as you have reformatted the partition. This will have blown away the journal and build a new clean one. Though here are the steps I would have tried to recover your File System before you did your mkfs.ext3 over it accidently.

1. Find a backup sperblock: # mkfs.ext3 -n <partition>

This will display the backup supreblocks that it would have use to create the File System. I keep a copy of these for all of my servers.

2. Run fsck using a backup super block: # fsck.ext3 -b <superblock> device

When you run this it will ask you questions and require your interaction you can add a -y and it will answer yes to all of the questions. Or use the -p to preen or repair the file system.

3. Reboot 

This will have placed you File System back to a clan stats or fsck will run again and reboot and this will fix it if it is able to be repaired.

You could try this against the parttion that you did a mkfs against though I dont see it working as the journal and backup superblocks will have been nuked and rebuilt clean.

i will try to do that but if that don't work means that i cant get all my data or at least my databases back?do u think i should backup the filesystem has it is now to maybe try difrent things later or it's useless?

I would post the same thing in the Ubuntu forums, some smart cookies their regarding linux.  They might be better at solving your problem.

Ubuntuforums.org

yeah i already had done that..

Link to comment
Share on other sites

2. Run fsck using a backup super block: # fsck.ext3 -b <superblock> device

When you run this it will ask you questions and require your interaction you can add a -y and it will answer yes to all of the questions. Or use the -p to preen or repair the file system.

a big noob question do i have to do that comand to every superblock...jus one...ore keep trying until i find the one or that none of them work?

Link to comment
Share on other sites

Just one of them they are all backups of the FS meta data.

but i made a mistake e used "mke2fs /dev/sda1" witch formated my drive

Though because yo have formatted you drive what I said is most likely going to work as at the time of running the mke2fs it shoudl rewrite the superblocks, journal and meta data so that makes recovering it very unlikely, though I am not an expert in the field.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...