Documentation & Recovery Guides

Master the command line interface and recover your data safely with our step-by-step tutorials.

Getting Started

TestDisk is a portable application, meaning no installation is required. This is a critical feature that prevents overwriting data on the drive you are trying to recover.

Important Warning

NEVER download or run TestDisk on the same partition you are trying to recover data from. Always run it from a separate drive or USB stick.

Navigating the Interface

TestDisk uses a command-line interface. Use the Arrow Keys to navigate, Enter to confirm/select, and q to go back or quit.

TestDisk Main Menu

How to Recover a Lost Partition

  1. 1
    Select Log File Choose "Create" to create a new log file (recommended for tracking).
  2. 2
    Select Drive Choose the hard drive containing the lost partition. Do NOT select the partition itself, but the physical disk.
  3. 3
    Select Partition Table Type TestDisk usually detects this automatically (e.g., Intel/PC partition). Press Enter.
  4. 4
    Analyze Select "Analyse" to search for lost partitions.
  5. 5
    Quick Search TestDisk will list current partitions. Select "Quick Search" to find deleted ones.
  6. 6
    Write Structure Once the correct partition is found (files are listed correctly), select "Write" to save the partition structure back to the disk.

Undelete Files

TestDisk can recover deleted files from FAT, NTFS, and exFAT filesystems.

  1. Select Advanced in the main menu.
  2. Select the partition that held the lost files.
  3. Choose Undelete at the bottom of the screen.
  4. Navigate to the file you want to recover. Deleted files are often displayed in red.
  5. Press c to copy the file.
  6. Select a destination folder (on a different drive!) and press C (capital) to save.

Fix Boot Sector

If your partition is visible but not accessible (e.g., asking to format), the boot sector might be damaged.

  1. Select Advanced in the main menu.
  2. Select the partition.
  3. Choose Boot.
  4. Check the status:
    • If Boot sector: Bad and Backup boot sector: OK, select Backup BS.
    • If both are Bad, select Rebuild BS.
  5. Select Write to confirm changes.

Common Troubleshooting

"Disk not found"

Ensure you are running TestDisk with Administrator privileges (Right-click -> Run as Administrator on Windows, or use `sudo` on Linux).

"Partition read error"

This may indicate physical drive failure. Stop immediately and consider professional data recovery services to avoid permanent data loss.

Antivirus Warning

Antivirus may flag TestDisk due to its ability to modify low-level disk sectors. It is a false positive. Temporarily disable AV if necessary.

RAW Filesystem

If your drive shows as RAW, the boot sector is likely damaged. Use the "Advanced" menu -> "Boot" -> "Rebuild BS" option.