Recover files from accidentally formatted SD cardPosted: August 27, 2011
Ever experienced that cold sweat panic attack after realising that you actually have NOT transferred to computer your vacation photos from the SD card you formatted in your camera just half a second ago?
Don’t panic! The data is still all there!
- Immediately extract the SD card and write-protect it (slide the knob at the side of the SD card). That way it will be safer against your unwise actions and possible equipment malfunction in the future.
- Go to the download site for the wonderful TestDisk software (available for Linux, Windows and Mac under GPL) made by Christophe Grenier (cgsecurity.org).
- Download the latest version and extract it from its ZIP archive. (Important! The new version can do things the older versions would not).
- Sudo or login as root and run the photorec_static program included in the package (if you do not have root privileges, you may not see your SD drive).
- Input program options in the text GUI:
- select the disk being your SD card
- select the right partition (in case if there are several, which is not so often)
- select the type of file system (FAT32 in typical situation)
- tell the program if you want to scan the whole partition or only the part which is not overwritten with new files yet (as the case may be if you had already copied something new onto it)
- browse for the directory where you want your recovered files to be stored and press “c”
- Wait and let the program do its job while watching your valuable photographs spring back to life.
This is not an “unformat” utility in that it does not change the source data (which is good). It instead analyses the data structure still accessible on the SD card and copies the files to a safe place.
Again, for your own safety, do not forget to write-protect the SD card before attempting the recovery, it may save you a great deal of embarrassment.
Even if you already had started to use the formatted SD card, you still may be able to extract the old data from that part of the file system, which is not yet overwritten with the new data.