Guide to Recover Deleted Data from Various Linux Drives

linux data recovery

Human error has always been among the most common causes of data loss. You might often end up accidentally deleting certain important files from your computer. In such cases, you’d want them back as soon as possible. Moreover, causing delay would reduce your chances of doing that successfully. So, you’d want to get to the task immediately. 

On Linux systems, you can recover deleted files quite easily using commands. The information given below should help you recover your Linux data from various drives. So, keep reading to know how you must proceed with this task. 

Use Test Disk to Recover your Lost Data

Can’t find your deleted files in the trash? In that case, you need a reliable software tool to recover them. However, recovery programs might often fail to recover all of your data. So, you must consider contacting a competent Data Recovery Dubai for an assured solution.

Now, most Linux systems feature the TestDisk utility to recover deleted files. This tool requires you to use commands to retrieve all your lost data effectively. Apart from major Linux versions, you can use it on Pocket Linux as well. 

However, TestDisk isn’t pre-installed in all Linux versions, so you might need to install it. In case you’re wondering, you can get this tool for free from its official website. So, you can download and install it right now from there. Then, proceed with the following steps:

  • Create a Data Log File

Before proceeding with the recovery, you must create a log file for TestDisk. This would contain useful information that you can use for future data recovery tasks. So, open the command line and enter “testdisk” to launch the tool. 

You’ll see certain options at the bottom of the screen. Opt for creating a new log file and enter your user password if the system asks for it. Not all Linux would ask you for this password. Once you’re done, proceed with the next step.

  • Select the Recovery Drive

After creating the log file, you’ll see your connected drives listed on the screen. Can’t find a connected drive that you’re looking for? Many Linux versions hide certain drives while using TestDisk for security purposes. So, you need to select the one from which you want to recover the data. 

In that case, you should see an option given below the drives. Click on it and enter your user password when the system asks. The drive should then appear among the options, and you must select it. You can also seek help from Data Recovery Dubai.

  • Choose the Partition Table Type

After selecting the drive, TestDisk would ask you for something called the partition table type. Many users, especially beginners, might not have any idea about this information. In such cases, you need not worry, as the system will highlight the best choice automatically. 

So, in this case, you can simply opt for the highlighted option. Then, click on Enter, and you’ll see some recovery options. Opt for a suitable one and then proceed to the next step. 

  • Select a Partition

Once you’ve completed the aforementioned steps, TestDisk will ask you about the partition. As it happens, the file doesn’t completely vanish from the partition when you delete it. So, unless you’ve formatted the drive, you can hope to recover the data by yourself. So, you need to opt for the one where your lost data was located. Click on Undelete to see the deleted files from that partition. If you face any hassle, opt for Data Recovery Dubai.

  • Find the Files You Want to Recover 

After you select the partition, TestDisk will show you a source directory of deleted files. You should be able to find the one you accidentally deleted from the results. Now, this directory would display pretty much all the files you’ve deleted recently. So, you might have to navigate around it to find the one you’re looking for. 

Now, suppose you want to recover a file that you had in your Pictures folder. Then, you must go to the Pictures section in the directory. There, you’ll find the names of the deleted files listed in red. Select the ones you were looking for and proceed to recover them. 

  • Restore the Accidentally Deleted File

Found the file that you were looking for? Then, you are just two steps away from successfully recovering your lost file. With the file selected, press C on your keyboard to copy it. Then, open a different location in the directory and paste the file by pressing C. 

This should restore the file on your computer successfully. However, don’t exit TestDisk until you get the notification that the file was successfully copied. So, what do you do if you don’t get the notification? In that case, you might have to go through the process again. 

How to Recover the Data from External Hard Drives?

You can recover data from pretty much all types of drives using TestDisk. And, for that, you have to follow the aforementioned steps in all cases. However, the process would differ slightly in each case. 

Want to recover data from an external drive or USB drive? In that case, here’s how you need to proceed with it:

  • Recovering Data From External HDD on Linux

Deleted your external hard drive data by mistake? Then, you must get on with recovering it as soon as possible. So, launch TestDisk with the aforementioned method and select the drive. Usually, the name of external drives given in TestDisk would start with sudo testdisk/dev/sd. 

Yet another way to identify the drive would be with its capacity mentioned besides its name. After choosing the partition table type, opt for Advanced in the recovery options. This is always the best option when you’re trying to recover deleted files. 

After that, you need to find the files that you need to restore from the directory. Then, copy and paste them to a new location as mentioned previously. Keep an eye on the notification to make sure all the files were copied successfully. If TestDisk fails to copy any files, it’ll let you know how many. If you still cannot proceed, seek advice from Data Recovery Dubai.

  • Restoring Deleted Files from SD Card in Linux

Apart from external drives, TestDisk can retrieve files from a memory card as well. So, connect your SD card to your device and get on with the task right away. Launch TestDisk and proceed to select your SD card for recovery. If you can’t find the memory card, make sure it’s connected properly. Then, use the sudo option, and see if your SD card shows up as a connected device. 

You might have to enter your user password while retrieving external files. In any case, the rest of the process is pretty much the same as the previous one. Can’t recover certain files using TestDisk? Then, you must use PhotoRec, which comes with TestDisk and works pretty much the same way. 

Backup Your Important Files

Creating regular backups is an important and effective way to safeguard your important data. After all, it can save the day in case of data loss due to any causes. Moreover, backing up your data on cloud storage provides it with an extra layer of protection. So, back up your data regularly to avoid further inconvenience caused by data loss. Also, reach out to a reliable Data Recovery Dubai immediately if you can’t recover your lost files.