Recovering files from beyond the grave using PhotoRec
lost-number.bearblog.dev
lost-number.bearblog.dev
I even recovered a card that had been off to professional recovery and deemed unrecoverable. I think half the memory chips in the card were fried so I used DD rescue to recover what data I could and then photorec to sift the wreckage. The owner was delighted to receive some of the photos.
If you ever have to do this, use DD rescue to image the source media as a first step. Sometimes you don't get a second read!
As another commenter noted, create an exact dupe/image of the volume as the very first thing you do.
Also: if it doesn't successfully retrieve files on the first go, try another configuration. I think it took me 3 attempts to get it right.
A fun perk, also noted in the article: you may get back some surprises along with the files you expect - older files revealed in the sediment!
One time a customer brought their computer in. She had wiped and reloaded the system through the recovery partition and didn't understand the big red text stating that all of her data would be removed.
I let her know we might be able to recover some of the data. She agreed that only the photos were important, so I let PhotoRec do its thing.
A few hours later, a panicked husband called worried his wife would find porn in the recovery. We charged him extra to clean up what was basically junk from the Internet Explorer cache. Not an extortionate amount, but extra. I think we could have asked for anything at that moment.
When discarding storage, I do a random pass (even if the drive has always been part of an encrypted-at-rest arrangement, if only for the sake of habit), then a zero sweep, then it gets a filesystem created and filled with many copies of a few cat photos/videos¹² to give anyone running something like photorec a treat, then the partition table is emptied.
--------
[1] With filenames to suggest a bumper collection of photo/video backups from several people's phones/cameras, with some porn accidentally mixed in.
[2] If I'm in an evil mood the “treat” filesystem is filled with shock images and Rick Astley instead.
[1] https://www.cgsecurity.org/testdisk_doc/photorec_custom_sign...
I have also created my first dockerhub image, as the plan is to run it as container on top of a zfs in Truenas.
I'm basically on a hunt for all data, I have 7 disks and some USB that I have imaged and I need to get data out, and I will need to organised all that data (this part is still a work in progress), ideas welcomed.
This reminds me to try it again.