My neighbor just did the exact same thing.
The way FAT filesystems work is they change the first byte of the filename to an invalid character to make them a tombstone.
Since he hadn't used the SD card yet, we were able to restore the files with "TestDisk", a companion tool that ships with PhotoRec. Under "Advanced" there is an "Undelete" tool. This will let you browse the filesystem, find your missing files, and copy them to another drive.
For those old enough to remember, MSDOS came with undelete.exe which worked the same way.
Years ago, I recovered some pics from my honeymoon this way after we accidentally deleted them because I knew FAT worked this way so I just went looking for them.
I've never felt so happy to be a techie.
> For those old enough to remember, MSDOS came with undelete.exe which worked the same way.
Available in MS-DOS >= 5.0. If you had MS-DOS 3.3, you didn't get any cool stuff like that. Couldn't even see hidden files!
Which is why Norton Utilities was so popular.
Disk Drill saved me last year when file corruption hit one of my SDs.
I also have a policy where I don’t delete the files on the SD card until the very last moment when new files need to be written again. This gives me a window of time in which there is an extra backup in case of issues with replication from my initial local storage on my computer, to an external drive, to the RAID array, or to the cloud.
rm -rf after the initial copy from the SD card onto the computer is a bad idea, especially if the card isn’t immediately needed for new footage.
For convenience, I like to still have the files somehow marked 'already imported', so I've since modified my script to move the files on the card into an 'imported' folder. Then after the card gets full, I'll format it if I'm finished with the main project I'm working on.
I really wish modern cameras could stream over WiFi 6 or 7 (since it's just H.265 compressed, 50-100 Mbps) so I could either do NDI or a video stream off to my NAS. Still save to the card in the body, but also record over the network directly in-body!
Oof, so free software didn’t do the job despite a ton of effort and leveraging a boatload of past experience, and the paid software gave a misleading impression of success before accepting Jeff’s money, only for the actual fix to be buried in a submenu somewhere.
My inner product manager is screaming.
Fairly unsatisfying conclusion. I’d be interested in knowing what that proprietary program does, how it works so well, how Sony stores video files, etc.
I had never seen Jeff's posts pop up on HN prior to this year and only learned of him via YouTube r/homelab content. Scrolling through the hn search his domain has had plenty of posts over the years, but his content has now become stickier and/or the audience has changed?
I think the main problem here was that there wasn't a single script that:
1. Accepts no parameters.
2. Looks for an SD card with a bunch of Sony-structured folders.
3. Copies the media from that to the NAS folder directly and fsyncs.
4. Checks that the files are there and look ok.
5. Maybe triggers a ZFS snapshot? Why not.
6. Only then deletes the files from the source.
My advice is to have "some fair number" of SD cards and when you are done with the card in the camera, put it aside and install another card that hasn't been used in awhile.
Because managing files is not only error prone, deleting files should be avoided to the extent your budget allows...
...and if you are shooting still (and not video) there's really no good reason to ever delete an image off an SD card because SD cards are cheap (because photos don't require highest speed cards). SD cards can be used as "film" in a digital camera.
Fun and useful fact - if you ever buy a Sandisk SD card, there is a license key for RescuePRO Deluxe inside if you peel apart the two pieces of the cardboard that make the packaging! The software works for any type of drive and I have had great luck with it recovering some of my students projects.
Camera makers: please just use Android and allow us to sync photos automatically.
Honestly hat read for me as "Disk Drill" ad.