How to Recover Photos From a Memory Card Without Overwriting the Originals

Stop using the memory card as soon as you notice photos are missing. Power the camera off, remove the card, and switch to a spare if you need to finish the shoot. Cancel any prompt to format, initialize, or repair the affected card. For a card that reads consistently, the safest DIY workflow is to keep the source read-only, make a sector-by-sector image on a separate drive, and scan that image. Send recovered files to a folder on the separate drive. A deleted photo may still occupy blocks the camera now considers free, so the next burst or video clip could overwrite it.
This guide uses GNU ddrescue on Linux to capture a raw image and PhotoRec to recover files from that image. You can open the image with PhotoRec on Linux, macOS, or Windows. A raw image captures the data the card exposes to the reader, including areas that a normal copy of the photo folder leaves behind. That gives you a fixed starting point if you need to try a different scan. If the card repeatedly disconnects, reports the wrong capacity, or has visible damage, stop before a scan. The same goes for a card holding the only copy of a critically important shoot. A professional recovery service can assess the original before you use up more read attempts.
Decide whether to image the card
Rule out a missing import first. Search your working drive, backup drive, and catalog for the shoot date and a known filename. If the camera used two slots, check the other card with write protection in place. The EOS R5 manual, for example, distinguishes stills recorded to both cards at the same quality from overflow recording, which switches cards only when one fills. Separate recording can leave a JPEG on one card and a RAW on the other. A verified original on the second card can save an entire recovery session.
Accidental deletion is a good candidate for an image-based attempt when the reader consistently reports the expected capacity. A format prompt alone can indicate a damaged file system, even if the reader sees the physical card. If the card has no visible damage and the data is replaceable, one check with a known-good compatible reader can rule out a connection problem. Stop if the card still drops offline, returns a zero or implausible capacity, or develops persistent input/output errors. Set a wet, cracked, bent, or unusually hot card aside without powering it again. For irreplaceable work, make that decision before testing readers.
Use a reader that matches the actual card in the slot. The memory card reader guide for photographers covers reader formats. Check the Canon EOS R5 reader guide if you need to connect cards from both slots on that camera.
Prepare the source and destination
Set up a Linux computer with GNU ddrescue, a compatible reader, and a healthy destination drive. On a full-size SD card, engage the lock tab before insertion. The SD Association’s physical-layer specification assigns enforcement of the mechanical switch to the host, so the tab only helps when the reader honors it. A compatible hardware write blocker adds protection when the reader ignores the tab or the media lacks one. Set Linux up to leave removable media unmounted before insertion. For this workflow, verify that the source shows as read-only and that no volume on it is mounted.
Budget space using the card’s full reported byte size. A mostly empty 128 GB card still needs room for an image roughly the size of the whole card. For that example, about 300 GB of free space is a reasonable starting budget for the image, extracted files, and some headroom. A second full image or additional recovery passes may need more. Use a destination file system that can store a single file larger than 4 GB. Create a new job folder there for the image and mapfile, plus an empty output folder for recovered files.
Make a raw image with GNU ddrescue on Linux
The command example assumes the card appears as /dev/sdX and the destination is mounted at /mnt/recovery. Those are placeholders. Identify your actual paths before entering anything, and check which physical drive backs the destination folder. A directory can exist even when the intended drive is disconnected. The GNU manual advises imaging with the source unmounted and using a mapfile to record which areas have been read.
- Identify the whole card. Run lsblk -b -o NAME,PATH,TYPE,SIZE,MODEL,RO,MOUNTPOINTS before and after connecting it. Match the new whole-device entry to the reader and the expected card capacity, and record the exact byte size. Pick the entry marked disk, such as /dev/sdb, so you capture the partition layout as well as the photo volume.
- Check that the card and its partitions have blank mount-point entries, and that the source reports RO of 1. If the source was mounted read-write or reports RO of 0, stop and correct the setup with automount disabled and effective write protection before continuing. Verify that /mnt/recovery or its replacement is the mounted destination, and confirm the job folder has enough free space.
- Image to two fresh files in the job folder. With the paths confirmed, run sudo ddrescue –ask –no-scrape /dev/sdX /mnt/recovery/card.dd /mnt/recovery/card.map, substituting your actual source and destination paths. The first path is the card, the second is the image, and the third is the progress map. Both output paths must be regular file paths on the separate drive. Review the confirmation before proceeding.
- Watch the read status. The no-scrape option skips the scraping phase, and this command requests no retry passes. If the card starts dropping out, stops making progress, or produces repeated read errors, end the attempt with Ctrl+C and allow ddrescue to save its mapfile. Keep that file with the image and avoid repeated reads of unstable media.
- Check the image against the recorded source size and the final ddrescue status. Run stat -c %s /mnt/recovery/card.dd to check the image byte count. A complete capture should match the size of the whole device and show 100 percent rescued with no unfinished or bad areas in the map. File size alone is insufficient because an image can span unread regions. Once the process has finished, disconnect and label the original card.
Scan the image with PhotoRec
If the intact directory can be browsed safely from a read-only image, copy visible files into a separate folder first to retain their names and structure. PhotoRec is for finding missing content by looking for byte patterns associated with file formats. This approach is called file carving. CGSecurity documents support for a single raw .dd image. PhotoRec can recover files when folder data is damaged, but its output may lose the original filenames and folder structure.
- Leave the original card disconnected and start the command-line version of PhotoRec with the image path. For example, run photorec /mnt/recovery/card.dd if the program is on your path. Otherwise use the path to the installed executable. Confirm the input shown is the image and that its size is plausible.
- Highlight the camera’s data partition if it can be identified. If the old partition layout is missing, use the whole-image entry if your build offers it. Keep the default file types for the first scan if you are unsure how your camera’s RAW files or clip containers are grouped. CGSecurity notes that disabling too many types can cause some recovered files to run past their original boundaries.
- Choose Search, then select Other for a FAT or exFAT camera card. For simple deletion on an intact FAT volume, you can search unallocated space when PhotoRec offers that option. Choose the whole partition for a reformatted or corrupt volume, or when an unallocated-space scan is unavailable or misses the files.
- Select the empty recovered-files folder on the healthy drive. Check the full path before confirming. Review the generated recup_dir folders and run each later scan into its own empty folder so you can compare results without mixing outputs.
Verify the photographs and clips before reusing media
Start with the must-have frames. Sort by type, and use capture time when the file still has reliable camera metadata. Open JPEGs at full size and render RAW files in a compatible editor. Compare dimensions with those expected from the camera and inspect the entire image for color bands, blank rows, or an abrupt cutoff. A visible thumbnail can survive inside a damaged RAW, and CGSecurity documents that PhotoRec can save embedded JPEG thumbnails as separate files. A thumbnail may be a usable last resort for reference, but record it separately from a full-resolution recovery.
Check each important video for the expected duration, audio, and clean playback. Scrub beginning, middle, and end, then play critical clips through or run a full decode check. File carving can leave a container present even when parts of the clip are missing, especially when the original occupied noncontiguous areas. Files that reuse a generic recovered name can also be duplicates. Compare actual contents before renaming or deleting anything.
If you get no usable files, confirm the input size, partition, scan scope, and expected file types. Repeat on the image with the whole partition selected if the first scan searched free space only. For a partial image, keep the matching mapfile and treat the files as provisional. If an important file is still missing or broken, preserve the original and ask a recovery specialist to assess it. A complete image confirms that the exposed storage was read, while the usability of a deleted file depends on what survived before imaging.
Close the recovery and back up the next shoot
Make a second copy of the verified results on another physical drive. Reopen the critical files from that copy before clearing the job from your working drive. Keep the image and mapfile together until you have checked the final deliverables. Keep any card that showed read errors out of production and hold the original untouched if additional recovery remains possible.
Before the next shoot, confirm which slots are actually recording duplicates and use a fresh spare when an incident occurs. Afterward, make two copies of the card contents and verify key frames and clips before formatting media for reuse.
For higher-volume shoots, use the Panasonic LUMIX GH7 card capacity guide to plan how much data a session can generate. Confirm the ingest station has a compatible reader using the Panasonic LUMIX S9 reader guide or the Sony a7 V reader guide for the corresponding kit.
Related Articles
- Best Photo Recovery Tools for Formatted and Corrupted Memory Cards in 2026
- How to Set Up Verified Camera Card Offloads and Backups on Location
- Best Card Readers for Mixed SD and CFexpress Camera Kits in 2026
- Best microSD Cards for Action Cameras, Drones, and Loop Recording in 2026
- Best Hard Drives for Photo Backup in 2026
- Best SD Cards for Long Video Takes by Recording Bitrate in 2026