Recover your (very) deleted files

Yesterday I did something stupid. Ok, that’s not the very first time it happens to me, but I believe this specific time it was something worth sharing.

My RaspberryPi did run out of space and all the files I was sharing through the attached 2TB USB hard drive were unreachable. I took the opportunity to perform a “system upgrade” I had planned for a while: run the entire system off an USB hard drive, another 350GB I had laing around.

So I hooked up the new drive and issued what I knew was an unsafe command, but without using the necessary caution:

dd if=dev/mmcblk0 of=/dev/sdc bs=4M

I realized sdc was my storage hard drive only when the process did end and I wasn’t able to access it locally… WTF!

I was speechless, my face became angry and I started looking at the wall in search of a nice spot where some red splash would have looked nice.

I started searching for backups, but I knew I had recently performed a nice cleanup recently in order to re-organize my archives.

After two hours spent in vain searching through my 4 USB hard drives I was so upset with myself I moved my storage hardrive onto Windows and formatted it NTFS.

I knew there are some tools to scan your hardrive and guess the sector contents, but I knew they would have taken ages to scan a 2TB drive attached via USB and what I would have got at the end would have probably been a bunch of sector backups with no significance…

Then I stumbled upon this super easy and super smart piece of free software called Recuva: with a few clicks and with no need for a degree in hard drive construction I was able to recover a huge amount of my files (well, I didn’t even try to recover those that got even just a sector overwritten by my smart command) and it took about 12 hours from installation to a directory full of files.

And all this after a sector by sector overwrite (dd) and a Windows fast format!!

Well, it’s not what I call an happy ending, but it’s better than nothing and it’s definitely worth sharing: don’t be stupid like me!

Advertisements