PhotoRec Saved My Butt

So my reckless typing really got me into trouble this time. I was attempting to zero-out a usb drive when I managed to put the wrong device in the dd command – I automatically typed sda1 (the primary HD) out of habit instead of sdb1 – the usb drive. I caught my mistake and gave it a solid control + c but I had still wiped out the first 60 MBs of the drive.

PhotoRec

At first I was confused because the system seemed to still be running just fine, then… eh dreaded full lock up. Of course on reboot I got a grub error and from there it was “so, what exactly was on that drive?…” Turns out that my coworker had a few months worth of work in Blender files in his home directory, WHY he didn’t ever think to backup to the RAID 1 NAS we have, I have no idea…

So my dilemma was that I had wiped out the partition structure, making it a bit hard to rescue data. Besides that I had totally forgotten how his partitions were laid out in the first place. After messing up the superblock further by screwin’ around with jfs_debug I decided to give PhotoRec a go at the drive. PhotoRec by CGSecurity is an absolutely amazing tool. If the files you wish to recover are supported by it (and they have a huge list) then you are in good shape – and holy crap! .blends are supported! PhotoRec is cross-platform and cross-filesystem unlike nearly any other tool out there. The great thing is that I was able to select the whole disk to search (not just the two partitions that were supposedly both swap) and PhotoRec ignored the filesystem – perfect for my situation.

I was so glad to see the # of found .blends growing steadily… until it got to about 900. Oh yeah, bad thing about file recovery software is that it not only finds the files that were last written to the drive but the deleted and reformatted ones as well, (it’s that good) and due to the nature of the recovery process file names aren’t preserved. So my buddy has a lot of files to look through, a lot better then nothing!

BTW I originally started using PhotoRec on failed customer hard drives – again a bit a of a chore because you get lots of files you don’t want, but this is sort of the curse of file recovery, and it really is great when you dig out the files you need.

Leave a Reply

Your email address will not be published. Required fields are marked *