Recover your data and partitions deleted by mistake with testdisk

The best way to avoid losing our most important files is by making a backup copy. If something goes wrong, be it due to a virus, human error or mechanical failure of the disk, thanks to this backup we will be able to recover our files without headaches. However, realistically, most users don’t usually back up their most important data. And therefore, when something goes wrong, it is necessary to have specialized software on hand that allows us to recover our data, such as TestDisk .

TestDisk is a completely free and open source program designed to help users recover lost or mistakenly deleted partitions and make disks that have stopped booting for whatever reason (as long as it is not a physical disk problem ), get back to work with all your data intact.

What TestDisk can do

TestDisk seeks to allow any user to recover their deleted data and partitions without any difficulty. Although this program does not have a graphical interface (it runs from terminal or CMD), it has sections and very easy-to-use options that we can select through its wizard.

Thanks to this program we will be able to:

  • Repair the partition table of any disk.
  • Recover deleted or erased partitions.
  • Recover boot sectors from a FAT32 or NTFS drive.
  • Rebuild the FAT12, FAT16, and FAT32 sectors.
  • Repair boot tables of FAT drives.
  • Rebuild the NTFS boot sectors.
  • Repair the MFT.
  • Locate and restore the EXT2, EXT3, and EXT4 Superblock.

In addition, TestDisk also has functions to recover deleted files from drives, as well as to copy files from other deleted partitions and create new partitions. However, beyond recovering partitions, if what we need is to recover data it is much better to resort to PhotoRec.


TestDisk is compatible with the following operating systems:

  • TWO.
  • Windows (up to Windows 10).
  • Linux.
  • BSD.
  • SunOS.
  • macOS.

And it is also compatible with practically any file system. We can work with the most common file systems, such as FAT, exFAT, NTFS, HFS, APFS and EXT, and with other much more complex and specialized systems, such as BeFS, BSD, CramFS, RAID systems, LVM and ReiserFS, among many others. formats.

In the case of PhotoRec, the program is compatible with the same operating systems, although the compatibility of formats is drastically reduced to the most common ones, such as FAT, NTFS, exFAT, EXT and HFS. In return, it specializes in data recovery from devices, such as iPOD, and a large number of cameras.

Of course, both programs are compatible with conventional hard drives (HDD), solid state drives (SSD), USB sticks and memory cards.

PhotoRec, the data recovery software

PhotoRec is one of the components that are included with TestDisk. This program is also free and open source and specializes in forensic data recovery. PhotoRec was originally designed to help us recover deleted photos from memory cards or mobile phones, although today it is capable of recovering almost any type of file.

Unlike other data recovery programs, PhotoRec loads the drive from which we are going to recover files in “read-only” mode. This means that the program will be able to recover the data but it will not be able to write to the source drive, avoiding overwriting this or other data stored on it.

When to use TestDisk

This program is one of the most effective when it comes to recovering, especially, partitions that have been modified or deleted from the computer. Whether due to an accidental formatting, and a change in the partition table, or even due to malware, this software will be able to detect partitions with data and recover the original partition table.

Thanks to PhotoRec, we will also be able to recover all kinds of files that have been deleted, or lost, from our hard drive. However, here the program does lag a bit, since this is not its strong point. It can get us out of trouble, but if this program does not detect the deleted data, it is better to opt for a more advanced professional solution.

Recover a deleted partition in few steps

The fact that this program does not have a graphical interface can put some users back. However, it is actually a very simple software to use. Once downloaded, we open TestDisk in our operating system and we can see the main screen of the program, where we will have to choose if we want to create a new log of the work we are going to do, open an existing log or simply continue without log. We recommend using the “Create” option .

The program will analyze our computer and show us all the hard drives and all the units that we have connected to the PC. In this step what we must do is choose the drive from which we want to recover the partition.

Next we will have to choose the type of partition table of the unit. Most commonly, you use an Intel- like Partition Table (MBR), or GPT. If the program detects the type of partition table (something that happens often) it will show it to us, so we will have no doubt when choosing whatever unit it is.

In the next step we will have to choose what we want to do with the partition. Although TestDisk offers us a large number of options and advanced tools, to recover partitions it is best to select the “Analyze” option with which the program will analyze the selected disk, recognize all partitions and detect any deleted partition. We will use the « Quick Search » option to analyze the structure.

The program will find and show us all the partitions that have been created on the PC. If everything is correct, we can continue. If we want, we can create new partitions from here. The normal thing will be to continue with what appears. In case we still miss a partition, then we can do a deep search in the next step.

If everything is correct, we can only choose the “Write” option so that the program saves the recovered partition table to the hard disk. And ready. If the partition had data, it will still be there.

Download TestDisk

As we have already said, this program is completely free for all users. We can download the latest version of it without having to pay anything from the following link . All we have to do is make sure we download the version that corresponds to our operating system in order to run and use it.

We can find two different versions. The first one that appears is the beta, the most advanced edition of the program, and the second is the stable version, somewhat older but more stable.

Other programs to recover data

TestDisk, together with PhotoRec, offer us a collection of outstanding tools to recover deleted or lost data from our computer. But not all users like this type of program, and there are others who want to use another type of forensic software to recover their files.

Of course, on the web we can find a good number of alternatives that allow us to recover deleted or erased data from a hard drive.


From the creators of CCleaner, this free software also allows us to recover all kinds of files from our computer easily, through a step-by-step guided interface, with very good results.

From here we can download Recuva .

Disk Drill

Although it is not a partition recovery software as such, it is one of the best alternatives to recover data. We can use it in both Windows and macOS, although its specialty is the Apple operating system.

We can download this program from the Disk Drill page .

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button