Data Recovery on Linux?

Fouchey

Honorable
Jun 26, 2013
198
0
10,760
I'm looking for software to recover data on an old SATA HDD; I just barely brought back from being dead. I was able to get it mounted finally and opened up some directories that contain data and they are empty? I know the data is there and it even says the space is used up. I'm wondering if I took a complete backup/system image of the drive would work or used data recovery software I could get the data back? I currently have Mint 15 on my main HDD(still pretty new to Linux though) and was thinking about trying Photorec when I get back home. Thanks for any suggestions!
 
Solution

mdmcaf

Honorable
Aug 20, 2012
14
0
10,510
Photorec or Testdisk would work just fine for your purposes. Just make sure that you have another volume with enough free space on it to be able to recover all of the data off of.

Photorec is really for recovering pictures from dead/dying HDDs but I've had it work for other file types as well. I usually use both Photorec and Testdisk (they come packaged in the same download) when I recover data from a drive. Just be warned that it'll change the names of the files to something completely unhelpful, so you'll have a huge pile of files to open and rename once you get done with the recovery.

I don't believe that a system image would work (for instance using dd) as that would just copy over corrupt data. Sometimes you'll have to format the drive in order to get it to work properly in PhotoRec/Testdisk.
 

Fouchey

Honorable
Jun 26, 2013
198
0
10,760


Perfect! I am just helping a friend out and they just want the pictures. I'm fine with the file names changed as long as I can get them off. Wasn't sure if a system image would work because the pictures were never deleted it just cannot seem to find them but photorec was my first choice anyway. I'll be back to let you know how it goes later tonight. Thanks for your help so far.
 

stillblue

Honorable
Nov 30, 2012
1,163
0
11,660


Unless you want photorec to recover ALL files be sure and limit the files recovery in (File Options). Learned that the hard way.

 

Fouchey

Honorable
Jun 26, 2013
198
0
10,760
Unfortunately I was unable to mount the drive last night. It showed it as connected but I could not open/mount it. I ran photorec anyway(All files) and only recovered temporary internet files,thumbnails,txtfiles etc.. None of the pictures were there.
 

stillblue

Honorable
Nov 30, 2012
1,163
0
11,660


You don't need to mount it for photorec to work. Before you give up on it try testdisk as well to see if you can find the files you want.

Sudo testdisk
choose device
analyse
Y for vista
quick search
choose partition
P for list files

Hopefully you'll see your files listed and can then c for copy.
 

Fouchey

Honorable
Jun 26, 2013
198
0
10,760


Does it only recover deleted files then or something? Never had the need to recover data but only 3GB of data was recovered. I did "Whole disk" also and every file extension.
 

stillblue

Honorable
Nov 30, 2012
1,163
0
11,660
Does it only recover deleted files then or something? Never had the need to recover data but only 3GB of data was recovered. I did "Whole disk" also and every file extension.

It'll show you anything deleted or erased it can find, even missing partitions. Erased files are red in the listing and can be copied. Can't hurt to try.
 

Fouchey

Honorable
Jun 26, 2013
198
0
10,760


Yeah that is true thanks I will try it! What about files that weren't deleted or erased? I know the pictures are on the HDD they weren't erased. I think photorec only searched for deleted files..
 

stillblue

Honorable
Nov 30, 2012
1,163
0
11,660


photorec looks for files by extension/format, erased or not, no matter but if not on the list of things to find, no go. testdisk looks for anything. Photorec usually gives you more but not always.

 

Fouchey

Honorable
Jun 26, 2013
198
0
10,760


Ah that is interesting it only found 3GB when searching for all files and the entire disk then. I'll try testdisk tonight or tomorrow and let you know how it goes thanks again for your help!
 

Fouchey

Honorable
Jun 26, 2013
198
0
10,760
Okay I was able to get the drive mounted and see the directories inside. When I navigate to where the pictures are located(inside "Owner" directory) an error says..

Sorry, could not display all the contents of "Owner": Error when getting information for the file /media/user/Owner/intuser.ini": Input/Output error
 

mdmcaf

Honorable
Aug 20, 2012
14
0
10,510
It really sounds like the corrupt disk is getting the best of you. How exactly did you raise the HDD from the dead as you mentioned in your original post? Of the research I've done on the issue it seems as though running fsck or dosfsck (if the file system is an MS-DOS/Windows partition) would be your best bet. I know that the drive needs to be unmounted for you to perform an fsck and I assume that it would be the same for dosfsck.

If that fails, I entrust HDD Regenerator 2011 to fix bad sectors/blocks on a file system most often. Though the Ultimate Boot CD http://www.ultimatebootcd.com/ has plenty of free utilities that will repair bad sectors, often times specific to the type of hard drive that it is.
 

Fouchey

Honorable
Jun 26, 2013
198
0
10,760


Thanks for the reply, I'll let you know how it goes. Can't this end up removing data though?
 

mdmcaf

Honorable
Aug 20, 2012
14
0
10,510
No, scanning the disk won't remove any data explicitly. HDD Regerator 2011 (and I believe most other sector-by-sector scanning software) moves the data on a particular sector to another known good empty sector, scans it, possibly repairs it, and then moves the bits back to the original sector. Sometimes it'll move it to a brand new sector and keep it there if the particular sector is un-repairable.

I've never had a HDD lose data while doing such a scan, I suppose it's possible given the nature of working with hard drives that are bad/going bad (but that's just when you get to the point that every minute you use the drive is one less minute that you have to be able to recover data off of it). But I think that you're at the point where a sector-by-sector scan that successfully recovers the bad sectors of the drive is your only hope of getting the information that you need off of the drive.
 

stillblue

Honorable
Nov 30, 2012
1,163
0
11,660


Sorry, tried to answer yesterday but the generator cut out. Input/output error means it's unable to read anything there. Could be a a physical problem or a virus that decided to change the parameters of that folder. Still, your best bet is to try and open with testdisk as I mentioned earlier and see if it tells you what is going on and maybe even recover individual files (could be just the folder itself is messed up and not the contents). 5 minutes could save you hours.

 
Solution