One dangerous aspect of tabbed file exploring in konqueror is that the selected folder in the folder tree on the left pane, need not be the one whose contents are listed on the right. A slight oversight, and a ton of mp3s got deleted. Luckily I froze in horror when I realised the mishap and this greatly improved the prospects of getting the data back. I quickly unmounted all concerned partitions to prevent accidental data writes.
The background is important in this case, and it is briefly thus : hda with an ntfs partition and hdb with an ext2 partition were involved. Moving a folder from hdb to hda was interrupted due to lack of space in hda. After clearing additional space, the operation continued from that point onwards, after skipping one file. (This is a great feature missing in Windows, by the way.) Since the file was skipped, the folder structure in hdb was retained partially. Then intending to cleanup the partial folder structure in hdb, I deleted the folder in hda.
The first tool I looked up was testdisk. This great and versatile tool also has an option to recover files. In the ntfs partition, the option to recover files did not show up, so I assume testdisk can do its magic only in ext2 partitions. The partial directory structure left in the ext2 partition probably prevented the deleted files from being displayed, when I trained testdisk on that disk.
Next after googling a bit, I zeroed in on R-Studio. The demo version can scan for recoverable files in many file systems. Though, it is an exe and needs a proper Windows installation to work, since in my case under Wine or Crossover R-Studio had problems in detecting the partitons.
I had to revert to the windows installation which resided in the ntfs partition, and eventhough the page file was turned off, I was sure that Windows would muck up the scene. Running RStudio after installing it, I found, again, that the broken folder structure in ext2 probably acted as a screen, since after a 20 min scan I had no useful results. ( Now, it occurs to me that deleting the remnants of that folder would have helped). In the ntfs partition, I could get about 100 MB of mp3s, when the original folder had 2 GB. I was surprised by the result, since there was no writing operation that had occured in the preceding few minutes.
A little more googling, and Photorec popped up. This is a testdisk twin, since they are distributed bundled. As I already had testdisk installed, I could launch Photorec using that command. The interface and working resembles testdisk.
One feature of Photorec which I found quite useful was it's ability to scan selective areas of the disk, which significantly cut down the scan time. This seems a pretty obvious feature to include, but since I haven't seen it in any other recovery software, I was willing to call it an act of genius.
To elaborate the genius of Photorec, consider the normal "deleted file" situation: A large hard disk chock full of data, and some files get deleted to make room. The bulk of the situations would therefore involve small unallocated disk space where the deleted file exists, and large allocated disk space. Photorec explicitly asks which of these areas - allocated or unallocated - to scan.
The other intelligent trick up Photorec's sleeve, is the ability to fine tune the scan to search for files of a specific type. There are about 50 such file types that Photorec recognises, and can specifically scan for. Since I was only after MP3s I disabled all the rest, which could speed up scan times.
A combination of these two features ensured that in about one fifth the time it took with R-studio, I had results. How much? In all, bits and pieces included, the recovered content from the ntfs partition was close to 1.5 GB. Removing the chaff, I expect close to 1.2 GB of valid MP3s. The scan on the ext2 partition returned about 500 MB of mp3s, a few looked interesting. Does this say something about the suitability of ntfs for file recovery situations?
In the end, I am satisfied with what I have : Not a complete recovery, but substantially better than what I could have got with R-studio.
Ofcourse the file names were a mess, so now I need a media organiser than can batch rename MP3s based on their ID tags.
Photorec, like testdisk, is free.
Blogged with Flock
No comments:
Post a Comment