Navigating Data Recovery on Linux with Open Source Software

open software

Most people continue to face data recovery challenges across the world. Like those using Windows computers, Linux users are not left behind in these challenges. Some of the issues you could have faced before looking for this article include emptied trash on Linux, corrupted drive, deleted files, and damaged device. 

However, you should not be worried as there are multiple methods you can try to fix such challenges. These fixes include using data recovery software. While there are equally many software in the market you can use today, we will explore this list of reliable open-source recovery software for data recovery on Linux. Read on to learn how to navigate a data recovery tool on Linux with a focus on open-source software.

Is Linux Data Recovery possible?

Although the process is a little complex compared to that in Windows, you can still recover deleted files on Linux. While Linux trash makes it easier to undelete deleted files, there are more chances you will need the services of a more advanced tool. 

What Should I Know Before attempting Linux Data Recovery?

Any form of data writing in your Linux will reduce the chances of recovering your files. You should therefore unmount the partition you lost data from then mount it back as read-only. Looking for the best open source data recovery software or just a guide on recovering permanently deleted files in Linux? You should be lucky to have bumped on this guide. To be much safer, you can begin by cloning the Linux you intend to scan to another device or image file just in case your attempts fail. 

Data Recovery with TestDisk

TestDisk is an open-source data recovery software that supports a wide range of devices including Linux. Whether you are missing just a few files or all of them, this software will analyze your device to get them back. It has the ability to locate, recover, fix or repair the files. 

Some features of TestDisk include:

  • Rewrite MBR
  • Recover deleted partitions
  • Partition backup for EFI GPT
  • Rebuild partition table 

To fix your data recovery issues with the software, follow the steps below. 

Step 1: Install the software if not yet installed using the command “sudo apt install testdisk.” Run it with “sudo testdisk.”

Step 2:  Choose “Create” to create a new log file. This will help you with troubleshooting just in case things do not go as planned.

Step 3: Scroll up or down to choose the device you intend to scan then navigate left or right to highlight the “Proceed” icon. Press Enter. 

Step 4: Choose the right partition table type for the Linux such as “Intel” followed by “Analyze” then “Enter” to scan the device for lost files. 

Step 5: When testdisk shows you the current partition structure, select “Quick Search” then Enter to continue.

Step 6: On the list of partitions found, select the one you are interested in then Enter to reveal a new partition table.

Step 7: If you are ok with the new partition table, press “Write” then Enter. If asked to confirm a write request, confirm to continue. If this command cannot be applied by TestDisk, it will prompt you to reboot the device. Confirm by tapping “Ok.” 

Pros of Using TestDisk

  • Restores entire disk partitions
  • Can fix disks with unbootable OS

Cons of using TestDisk

  • It cannot restore individual files 
  • There is no guarantee for data recovery 

Data Recovery with PhotoRec

PhotoRec is another open source software for recovering lost files in Linux. Whether the files were accidentally deleted or they were lost for other reasons, PhotoRec can be a good option to consider. Even if you are not in a position to perform an undo, PhotoRec will be able to find them if you act with speed. 

Some features of PhotoRec include:

  • An intuitive and interactive interface
  • Can search for a wide range of file formats
  • Recovery from damaged drive supported

Generally, PhotoRec is bundled with TestDisk. Although they are similar, they are built for different purposes. How to navigate this software on Linux? Follow the steps below. 

Step 1: Once you have installed TestDisk, you should have PhotoRec with it. Proceed to launch it with “sudo photorec.” 

Step 2: Select the device you need to scan from the media list shown by PhotoRec. Choose “Proceed” then Enter to continue. 

Step 3: Highlight the required partition, select “Search” then Enter.

Step 4: Now select the correct filesystem type for the Linux you are using. 

Step 5: Choose “Free” if you intend to scan the unallocated space only. Otherwise, choose “Whole” followed by the correct destination directory. You can then press Enter to select a highlighted directory. Select the two dots appearing at the top of the list to return to the previous level. When in the recovery folder, press “C.” 

PhotoRec begins by analyzing the filesystem before it starts file recovery. The good thing, PhotoRec informs you of the progress and gives you a direct option to quit the process with a “Quit” button displayed. When recovery completes, your files will be in the directory you selected. 

Pros of Using PhotoRec

  • A quick recovery algorithm 
  • Support for a variety of file system formats

Cons of Using PhotoRec

  • A separate filesystem required to store the files 

Conclusion 

Like we mentioned, there are several open-source software you can use for Linux data recovery. Other than TestDisk and PhotoRec, other software includes Ext4magic, Fatcat, Scalpel, and Foremost. Fortunately, they are all easy to navigate with on screen prompts to guide you all the way to recover deleted files on Linux.