Two practical data recovery software in Linux

Source: Internet
Author: User
Tags testdisk photorec

Two data recovery software are introduced: TestDisk and PhotoRec. Among them, TestDisk is mainly used to restore damaged partitions and save unbootable disks, while PhotoRec is mainly used to restore damaged data files, including documents, images, and videos.

Both TestDisk and PhotoRec support execution on Windows, Linux, Unix, Mac OS, and other systems. TestDisk also supports a wide range of file systems, including FAT, NTFS, Ext2, Ext3, ReiserFS, and RAID. PhotoRec can also work on various storage media such as hard disks, optical disks, and USB flash drives.

Although the data recovery software can help us recover the loss as much as possible, we should develop the habit of regular backup. Only when the system is ready for use can it be guaranteed.

If the partition is damaged due to incorrect use of the partition tool, you can use the tool TestDisk to restore the damaged partition. The following describes how to use TestDisk for acute recovery (note ).

Note: TestDisk can be used for restoration, that is, the partition on the hard disk HDD (the partition has the original data records) is damaged. However, if a new partition is created after the partition is damaged, the restoration is less likely and more difficult.

TestDisk can be downloaded from http://www.cgsecurity.org/wiki/photorec( note ). Download the RPM package file corresponding to Fedora Core 6. For example, if you use GNOME's Partition management software "GParted" (Gnome Partition Editor), The/dev/hda5 Partition is accidentally deleted.

Note: Restoring objects accidentally deleted in Linux describes how to use PhotoRec to restore objects accidentally deleted.

Note: TestDisk is the software used to restore partition information. For the restored partition information software deleted from the partition table and modified by MBR (master boot record), please confirm before use.

For installation and configuration, see restore accidentally deleted files in Linux.

Log in with root permission and start TestDisk.

# Testdisk

First, select the log file (testdisk. log) record method in the recovery operation.

[Create] New
[Append] Append
[No Log] No record


Select the log file record Method

After selecting the log file record mode, the disk device in the connection status is displayed. Select the disk partition to be restored and select [Proceed]. Choose HDD "Disk/dev/hda" with Linux/Windows XP installed 」.

In the list of disk devices, select the partition to be restored, and then select the category of the disk partition. For Linux/Windows, select [Intel].

Select [Analyse] In the image below to analyze the partition.


Displays the status of the current partition. Then select [Proceed] to display the analysis result.


Partition status

The partition structure is in green text. Compared with the preceding figure, Linux partitions are added. This is the partition that has been deleted by mistake.

Press the [P] key and the file and index at the root of the partition are displayed. If the correct picture is displayed, the analysis result can be correctly calculated. Then, use this method to operate other drive letters.

Partition analysis result

Press the [Enter] key to display the analysis results to the disk. And is restored.

The Current Status and recovery information have not been written to the hard disk. You must select [Write] to Write the information to the disk. When the confirmation information for the write operation is displayed, press [Y.


After the write operation is completed, restart and press [Enter.

Finally exit [Quit] And TestDisk ends. The system restarts.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.