How To Recover Data From a Memory Card

Memory Cards are as much a part of our daily computing as hard disks and RAM is. The Digital cameras that we use everyday, the mobile phones that we rely on and even some of those tiny netbooks that we use, more often than not use some kind of memory card based storage to store data.

Improvements in technology have made memory cards pretty reliable but there are times when even the best technology fails and when that times comes, you’d be glad to have included a¬†memory card data recovery software in your toolkit.

Since, I’m a Mac OS X user, I’ll be talking about data recovery software that you can use on a Mac to recover data from corrupted memory cards, but there are similar software available for almost all platforms and in fact, the open source program that I’m going to walk you through today is available for Windows and Linux also.

To get started, download TestDisk from CGSecurity. Both the tools are distributed in a single tar.bz2 bundle named after TestDisk, so don’t look too hard if you can’t find PhotoRec on the CGSecurity site. I downloaded version 6.12 since I don’t have Rosetta installed on my Mac. If you have Rosetta installed, download the 6.11 stable version and that should also work for you.

Open the archive and since both of these are command line based tools, launch Terminal and browse over to the directory where you extracted the files.

Run the PhotoRec utility from the command line like this

darkstar:testdisk-6.12-WIP sharninder$ ./photorec

Select the disk that you want to recover data from and hit enter.

The next step is to select the type of partition table that the disk/memory card has. If this disk was being used on a regular PC, it’d most likely have an Intel type partition table, or if you like me use an Intel based Mac then you’d have an EFI/GPT type partition table. If the disk that you’re trying to recover data from is a memory card, it’d most likely be using the Intel partition table format. Select the appropriate choice and hit the enter key.

PhotoRec will now search the hard disk for any partitions of the selected type and display them on the next screen. Select a partition from the list and proceed.

The next step is to choose the type of filesystem. For a memory card, this would most likely be FAT, so select “Other” and hit enter. Photorec will now ask you to select a directory on your system where the recovered files will be saved. Use the arrow keys to to move to whichever directory you want and press ‘C’.

Photorec will now start scanning the entire disk and will save any files that it finds to the directory that you selected earlier.

Let me warn you, though, this is a very long process and scanning an entire disk can take anywhere from a few minutes to a few hours depending on the size of the disk.

The process is also not fool proof. Depending on how much the disk has been used after deleting a particular file, you may or may not be able to recover all your deleted files. This is not Photorec’s fault, though. This is just how filesystems on most modern operating systems work.