LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Hard disk Recovery data (https://www.linuxquestions.org/questions/linux-newbie-8/hard-disk-recovery-data-927192/)

aneel434 02-02-2012 10:44 AM

Hard disk Recovery data
 
Hi All,

I formatted my hard disk by mistake .

So How to recovery my data please help me.

Thanks & Regards

Anil.V

theNbomr 02-02-2012 11:10 AM

From your backups, of course. Otherwise, you will need to hire data-recovery experts.
--- rod.

melons-mell 02-02-2012 11:12 AM

Quote:

Originally Posted by aneel434 (Post 4591831)
Hi All,

I formatted my hard disk by mistake .

So How to recovery my data please help me.

Thanks & Regards

Anil.V

The System Rescue Cd may help. Good luck!

pljvaldez 02-02-2012 11:16 AM

There's a couple of things you can do. First off is if possible, make a bit by bit copy of the drive using dd onto another drive. Then perform all your operations on that image.

Next, there's two types of formatting - quick and low level. If you just formatted the disk accidentally with your OS, chances are it just deleted the partition table that tells the OS where all the files are. For this, you can try using a tool called testdisk (from a Live CD) to recover the partition table. This has worked many times for me.

Now if you did a low level format or secure format using something like shred or DBAN, you're hosed since those tools overwrite the entire hard drive with random strings of 1's and 0's, destroying the data on each hard disk sector.

If testdisk fails, you can usually recover lots of the files by running a tool called photorec (which is part of the testdisk suite). It will search the hard disk for common file type headers and then copy all those files off to the location you choose. However, the downside is that you lose all your filenames and have to look through each document manually to figure out what it was. They'll have names like "001203981031.mp3" or "132179812309.doc". And some of it will be garbage. Some will be internet cache history, etc.

Testdisk and photorec are also available for Windows if you're more comfortable in that environment.

ceantuco 02-02-2012 12:49 PM

Hi,

I use Testdisk and Photorec. A few months ago, I was reinstalling Windows and I accidentally formatted my external hard drive data which had all my data. I ran Testdisk to repair the partition table but it did not work. Then, I ran photorec and it recovered all my files. As pljvaldez said, the file names will be numbers with the extensions. I ran a quick script to separate all files by extensions, then organize by size and I deleted files that were too small (Mostly cache and temporary files)I was able to recover at least 80% of my data. Not too bad. I think 80% of something is better than 100% of nothing. Good luck!


All times are GMT -5. The time now is 11:27 PM.