It’s probably every photographer’s worst nightmare. You’ve shot gigabytes worth of images, ready to be imported for post-processing, when suddenly: card is unreadable. Your captures are all gone. All that time and effort lost to a corrupted card. It happened to me, and this is how I got them back.
A while back, I shot a few hundred pictures of a couple of live band performances. Later that night, I stuck the 16GB SD card into my laptop, started the Lightroom import, and went to bed. The next morning I checked the laptop to find that there were only 50 files imported, plus an ominous message that most of the files were unreadable. I opened the Finder to peek at the files directly, and they were all seemingly there, but couldn’t be previewed or opened — again, “unreadable.”
Being on a Mac, I tried Disk Utility to verify the integrity of the card. It found a number of the files were several MB in size, but “should only be ~32KB” (much smaller). At this point, I held my breath, and tried the Repair Disk option. In retrospect, I should have realized it would only truncate those files, which it did. All the pics were now 32KB instead of several MB and consisted of one thin, horizontal line of color and a lot of gray.
Lesson Learned: If you’re going to try to recover your files, you should NOT do this. I’m pretty sure I was unable to recover a handful of my files solely because of this action.
Frantic Googling ensued. I came across several non-free recovery programs, but being that a) This wasn’t a paid gig, and b) I didn’t know if it would still work after my failed repair disk attempt, I kept looking. Then I found Photorec: a free, open-source file recovery program. It’s also multi-platform, so it works on OS X, Linux, BSD, DOS, Sun Solaris, and virtually every version of Windows made going back to Windows 95 and NT 4.0. I downloaded the latest stable version, 6.14, and cranked it up.
The interface is a fairly primitive text-based style that runs in Terminal on Mac, or Command Prompt if you’re using Windows, but it’s easy enough to use.
First, you choose the disk you wish to recover — in my case the SD card — then you choose a folder on your local drive to put the recovered files, and finally, you let it run. It’s important to note that the destination should be at least as big as the disk you are trying to recover, because Photorec will copy everything it finds there. The app operates in read-only mode, meaning it only reads the data on the corrupted disk, writing all the data back to the folder you designated, so that no further damage can be done to the corrupted media.
It took about 90 minutes to recover my entire 16GB card. A handful of files were still lost — nothing but colorful lines that I attribute to my ill-advised attempt to use standard disk utilities — but it not only recovered everything from that night, but some files from previous outings that had been imported and “deleted” from the card months ago, going back to the last time I had reformatted the card. I culled the excess stuff, imported my photos in Lightroom, and all was well with the world.
In the aftermath of my experience I got several other tips, pointers and recommendations. A few people pointed out that a utility like this would come in handy in the event a police officer or security guard makes you delete your pictures for whatever reason. I am not a lawyer, and can’t speak to the legalities involved, but I’ll only tell you that it had recovered previously-deleted photos on my card (the dog photo at the top is an example).
Further, while it’s primarily aimed at photos, Photorec recognizes a huge number of file formats including multimedia, archival, office, database and various other formats. There is a comprehensive list on the Photorec website. It also recognizes a wide variety of disk formats, and can be used many different types of media, such as memory cards, hard disks, CD-ROMs, USB drives and more.
Finally, several people praised similar software solutions of varying prices and platforms. While I can’t personally speak to the effectiveness or usability of most of them, they are:
- Zero Assumption Recovery (Windows)
- Recuva (Windows)
- ddrescue (Linux)
- Image Rescue 4 (Windows, Mac,)
- Rescue Pro (Windows, Mac)
- GetDataBack (Windows)
About the author: Scott Daveley is an Internet Software Architect in the Midwest. His hobbies include photography and guitar, his primary weapons being a Canon 60D and a Gibson Les Paul Standard. He likes to speak of himself in the third person, and his Flickr account is here.