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.
My inner product manager is screaming.
I think the key point is that cameras don't write the video files in one long contiguous block on disk. They internally split it up and write in an interleaved fashion. It even mentions low-level tricks like manipulating the FAT table so the moov atom which is written last appears at the beginning of the file.
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.
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.
https://security.stackexchange.com/questions/264642/are-andr...
brudgers•1w ago
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.
geerlingguy•1w ago
philipwhiuk•2h ago
jonhohle•2h ago
Then they moved to iCloud or manual sync and your forced to manage individual files again. Delete in iCloud, it’s gone everywhere. Want to keep your bad shots, but not have them on every device? Figure out how to move photos between multiple libraries while only being allowed to have one open at a time.
entropie•2h ago
Yeah, a kind of rotating workflow seems necessary when you doing professional camera stuff.
Of course, something like this can always happen; however, it's just as likely that an SD card will fail at some point.
The camera should record redundantly, and many semi-pro cameras already do this if you want them to. Then you can leave the second card untouched and have a spare one and rotate only the spares.
zten•2h ago
That hypothesis is certainly getting tested these days in specific niches. With high megapixel sensors, pre-capture, and cameras capable of pushing between 30fps and 120fps worth of compressed raws or high quality JPEGs, you can obliterate your camera's write buffer and CFExpress write bandwidth. You can make many bad photos of an animal, bird, or athlete with extreme ease -- and hopefully find that one winner in the haystack.
I would say the line between movies and photos is getting blurred, but it's unlikely you're using a shutter speed that allows for motion blur with these bursts of photos!
BuildTheRobots•2h ago
I'm a big believer in thinking you have backups being worse than knowing you don't, so anything that encourages people to believe $(flash memory) is suitable as long-term cold storage is actually, really bad.
I agree there's no need to copy & wipe cards immediately, but treating them as "film" is inherently flawed and setting yourself up for failure. The amount of people that turn up in data recovery forums unable to access old, important, "backed up" (memory card/ssd on a shelf) photos is depressingly high.
Zak•2h ago
I photograph birds in flight at 25 or 50 FPS.
Even if I didn't do something that demands fast cards and fills them up quickly, I don't see much reason to keep photos on SD cards rather than my laptop's SSD with an external HDD as backup. I import and cull the photos, run a backup, and reformat the cards.
Arainach•1h ago
There are tons of good reasons.
When downloading images off the card, software has to read all the files on it - which can take a very long time if the card is full of photos you've already processed in a previous session.
Then there's that you shouldn't be keeping most of the shots you take. Unless you're a still life artiste, most people (including professionals) take multiple pictures to account for blinking, moving objects, slightly different angles, etc. You should keep the best shots and delete the rest - storage is cheap but having to go back through all the garbage to find the good shots in the future is pointless.
Modern cameras have large sensors that produce large files. It's wasteful to keep buying more and more SSD cards. Just build a NAS or pay for cloud storage.
BolexNOLA•1h ago