TestDisk PhotoRec

TestDisk PhotoRec is a powerful open-source recovery toolkit designed for partition recovery and deleted file recovery from hard drives, SSDs, USB flash drives, and memory cards. It is widely used by technicians and advanced users when a drive becomes unreadable, a partition disappears, or important files were deleted or lost after formatting.

The package includes two tools that solve different problems. TestDisk focuses on restoring disk structure (partition tables, lost volumes, boot sectors). PhotoRec focuses on extracting files even when the filesystem is damaged beyond repair. Both tools are cross-platform and run on Windows, Linux, and macOS.

What Is the Difference Between TestDisk and PhotoRec?

Even though they ship together, the workflow is different:

  • TestDisk = recover partitions. It can detect lost partitions, rebuild a damaged partition table (GPT/MBR), repair boot sectors, and help make a disk bootable again. If your goal is to restore the original volume (for example, bring back a missing NTFS partition), TestDisk is the right starting point.
  • PhotoRec = recover files. It performs signature-based carving and can recover files from raw disk space even if the directory structure is destroyed. PhotoRec is often used after accidental formatting, severe filesystem corruption, or when the drive mounts but shows empty folders.

In recovery terms: TestDisk tries to restore the “map” (partitions). PhotoRec tries to save the “content” (files) when the map is gone.

When TestDisk PhotoRec Is the Best Choice

  • You lost a partition after resizing, OS reinstall, or partition manager mistakes
  • A disk shows as Unallocated or the partition table is corrupted
  • You formatted a USB/SD card and need to recover photos or documents
  • The filesystem is damaged and the OS cannot mount the volume
  • You need recovery tools that are free, open-source, and work across platforms

Safety Rules Before You Start (Very Important)

Recovery success depends on avoiding additional damage. Follow these rules:

  • Stop writing to the affected drive. New files can overwrite recoverable data blocks.
  • Recover to a different disk. Never save recovered files back to the same drive.
  • Prefer imaging first if the drive is unstable (disconnecting, SMART warnings, strange noises).
  • If you need a full image before recovery, use Clonezilla or Rescuezilla.

Typical Recovery Scenarios

Scenario 1: Lost partition (drive shows Unallocated)
Start with TestDisk. It can scan the disk, detect lost partitions, and propose a safe structure to write back. This is common after partition resizing, dual-boot operations, or sudden power loss.

Scenario 2: Deleted files or formatted USB/SD card
Use PhotoRec. It is strong for recovering photos/videos/documents even if the filesystem metadata is gone. Keep in mind: PhotoRec may not preserve original filenames or folder structure in many cases.

Scenario 3: You need a “clean” partition layout before recovery
Do not rush into resizing/copying. If you need partition management, use GParted Live, but only after you understand what you’re changing.

TestDisk PhotoRec vs Other Tools

  • vs GParted Live: GParted edits partitions; TestDisk recovers lost partitions after damage.
  • vs Clonezilla / Rescuezilla: those are imaging/backup tools; TestDisk PhotoRec is for recovery after loss/corruption.
  • vs DD for Windows: dd is raw copying/imaging; recovery tools help restore partitions/files. See DD for Windows.

Troubleshooting & Tips

Recovered files have random names
This is normal with PhotoRec. It often recovers by file signatures, not directory metadata.

Drive is not detected or disappears
Try another USB port/cable. If the drive is failing, image it first with Clonezilla/Rescuezilla and work from the image.

TestDisk finds partitions but you are unsure
Do not write changes blindly. Re-scan, compare sizes, and confirm you selected the correct disk.

Recovery is slow
Large disks take time. Avoid running other heavy tasks during scanning, and use stable ports (USB 3.0 preferred).

FAQ

Is TestDisk PhotoRec free?
Yes. Both tools are open source and distributed under the GPL license.

Does TestDisk PhotoRec work on Windows?
Yes. The Windows build is portable and can run without installation.

Can TestDisk recover an entire Windows partition?
In many cases, yes. TestDisk can restore lost partitions and repair disk structure so the OS can see the volume again.

Can PhotoRec recover files after formatting?
Often yes, especially on USB drives and memory cards. Results depend on whether data blocks were overwritten.

What should I do first: TestDisk or PhotoRec?
If you lost a partition → start with TestDisk. If you lost files or formatted media → start with PhotoRec.

Download Options

PlatformTypeVersionDownload
Windows x64ZIP Archive7.3-WIP Download
Linux x64Tarball (.tar.bz2)7.3-WIP Download
macOS IntelTarball (.tar.bz2)7.3-WIP Download

Useful Links