Photographers nowadays need solid IT skills for their job. How to run a computer. How to install, update and uninstall software. How to do backups. Know your operating system (Windows, MacOS, Linux) and the relevant file-systems. Each photographer hoards huge piles of valuable data (the images) on his or her computer disks. They need a strategy to recover the images after a disaster i.e. computer theft, hard disk failures or SSD corruptions (you know, each cell in flash storage has a limited lifetime because the cells die after a certain number of write cycles). Sometimes one is faced with an empty storage card because of an unintentional re-formatting. So, what can you do?
First of all, be prepared! Here you can find information on how to recover such lost files. Get the necessary software now and practice with test data to know the steps when it comes to such a disaster.
In the past, Microsoft brought us FAT as the filesystem. In 1977 it appeared first in MS-DOS. Since then it was developed further and got more features. Because of the ease of organizing data (especially when it comes to sequential writes), it’s still popular for storage cards used by smartphones and cameras.
The computers itself use usually more sophisticated filesystems like NTFS, HPFS, HFS, HFS+, APFS, ext2, ext3, ext4, xfs, btrfs and more. Unfortunately, these modern filesystems are organizing data very differently to FAT and its ascendants like vFAT, exFAT or FAT32. So, recovery data from disks using one of the modern filesystems looks like a game of hazard or spinning a huge wheel of fortune where only one winning chance is set randomly. When using data recovery software you might have luck recovering recently deleted files. On FAT the chance is much higher because of the different principles the data is organized.
Now you might remember having read some reports of found data on thrown-away disks. Yes, that’s true. Forensics are able to recover the blocks of destroyed disks and scratch tiny pieces of data from the disk and reassemble it. Data is organized in blocks. The size of each block is about 512 or 2048 byte, depending on the used filesystem. For getting information like names, account data, credit card information or so, that’s enough. But, look at your images. Each image uses several MB on the disk. To recover your image, it’s a necessity to have ALL blocks and they must be in the right order. A single corrupt byte is tolerable but a couple of bytes can result in a complete loss.
In more than 20 years of handling digital photos, I never lost a complete card. But, 2 or 3 times I deleted a couple of files from the cards unintentionally. In the past, photorec was the tool of my choice. It’s an open-source tool. You can download and use it for free. But, you have to understand, how it works.
First, you have to avoid any further writings on the disk from where you want to recover data. That’s essential for successfully recover files.
Photorec (part of the open-source product testdisk)
The installation of photorec is easy. Linux users can install it usually by using their packet manager, while Windows users need to download it from the developer’s homepage and unpack the zip-file. MacOS users can install it via brew
$ brew install testdisk
Now you open a console (Terminal on Mac or Linux, and CMD on Windows). Next, you start photorec by telling it, where to search
MacOS / OS X
$ photorec /Volume/SD-card (or whatever name the card has)
# photorec /media/SD-card (or whatever name the card has; mountpoint also might vary i.e. /mnt/)
C:\> photorec d: (or whatever drivename the device has, where you want to recover files. Check it with the Windows Exporer)
If photorec recognizes an already started recovery, it asks you if you want to continue the session or start a new one. Next, it tries to read the directory and offers you to browse where the lost data was stored. Photorec can recover several types of data, not only jpg images. It can also recover lost partitions, if necessary. But that’s beyond the subject of this post.
When you’re fine with the position, photorec needs a location on a different disk to copy the recovered data to. After that, it only needs time.
FAT filesystems don’t delete the data on the disk when files are deleted. Instead, only the first letter of the filename in the directory is replaced by a ‘?’ which makes the file invisible and marks the occupied space as reusable. So, the magic is, photorec reads the directory and scans for filenames starting with ‘?’. Then it looks up each filename and checks based on the location information (block numbers) stored along with the filename if the relevant file is completely available (all blocks from the chain of blocks ’til the end-of-file mark). If so, the blocks are copied to the chosen target destination. But, the filename is lost. Instead, the name of the first data block, where the file was stored, is used to keep filenames unique.
As photorec runs in the console, not everyone feels skilled enough to use it.
Disk Drill by Cleverfiles
Recently, I got a review version of a newer data recovery software: Disk Drill by CleverFiles. It’s available for Windows and for MacOS and has a visual GUI to be handled with the mouse. On MacOS the current version needs at least the latest version of Mavericks. But older versions are also available for download, in case your MacOS is still running an older version of OS X for whatever reason. Disk Drill comes as an app to be pulled in the Applications folder only, to get installed.
I installed Disk Drill on my Macbook, which I’m also using for developing my images.
So, I have a lot of images on my disk (raw data), which I process and delete after processing them. Thus, I should have a lot of files potentially being recoverable on my disk. It’s a 512 GB SSD formated with APFS. The deep scan has run for about 40 minutes. But, as expected, Disk Drill found nearly nothing! No raw-file, no jpgs, no text documents or spreadsheets. The only files Disk Drill found were a couple of files I have had in my trash bin, which was emptied just before installing Disk Drill.
My other tests were on a disk formatted with Windows NTFS and an SDcard from my camera formatted with FAT.
Recovering files (raw data written by my digital camera) from the SDcard was very successful, just like expected. A 256 GB drive was scanned in a couple of minutes and offered tons of recoverable files.
I also run Disk Drill on a 1 TB NTFS hard disc formatted by Windows. The scan lasted nearly 3 hours while the well-equipped computer got a lot of stress and the fans run at a high level for certain times. But, I was able to work with it as usual for the whole time. In the end, the so-called deep scan found a reasonable number of recoverable files of different types. Unfortunately, all of them lost their names and were offered to me for recovery grouped by file type. Hard to find the file you accidentally deleted 😦
So, the result is not much different from the outcome of photorec.
Similar to photorec, Disk Drill also works with sessions. But, differently to photorec I was unable to make Disk Drill forget the saved session and do a re-scan after i.e. running a cleanup (I tried to wipe out some files I don’t want to be able to get recovered and check if they are unable to be recovered)
Disk Drill has a couple of further functions.
You can open a backup of an iOS device (as long as you know the recovery passcode) stored on your computer and recover files from iOS backup (iTunes). Works great. You can get contacts, appointments, reminders, photos, and even files.
There’s also a cleanup function. It seems it is to wipe out unused space. But, in fact, I was unable to find any result. So, I can’t say, what this function is doing.
Next, there is a function suggesting it could duplicate the boot disk, but instead it only creates a boot media similar to the recovery boot mechanism you always have on your mac. So, I have to stay with Carbon Copy Cloner for this feature.
After finishing my tests I uninstalled Disk Drill. Unfortunately, a not-quitable tool survived in the menubar. I had to dig through my applications folder and my Library folders to find where this tool resides to delete the files. After a reboot, it was finally gone!
Now it’s up to you to decide, how often you have to recover lost files and on which filesystems they are stored. I was very interested if a professional tool is better than the open-source tool. The lack of a GUI is a point against photorec. But, in my opinion (as an IT pro for more than 30 years), that’s not so dramatic. I even found the text interface much more straight forward and clearer than the GUI of Disk Drill. On the other hand, I guess, Disk Drill is even more complicated than photorec.
Nevertheless, I repeat my statement from above: be prepared for the disaster because the disaster situation isn’t a good time for such a complicated topic. Get a tool and make yourself familiar with it to avoid making a disaster situation worse.