How to Recover Deleted Files From Ext2-Based Linux System

Are you a Linux user and currently facing file deletion especially after a power outage? If yes, then this is the perfect place you have stumbled upon. You may have lost the files owing to different reasons but you should not worry as these files could be recovered using in-built Linux tools. If these tools are unable to restore the files, then you should use a third-party Linux data recovery software to do the needful.

Let us assume a case wherein you are working on an ext2-based Linux system during which there is an electricity cut and the system is turned off. When the power is restored, you find that some files, on which you were working, are not there.

Cause:

For this strange situation, there could be the following reasons responsible:

The partition table of the Linux hard disk could be damaged.

The logical drives could be accidentally deleted.

It could have happened because of bugs in the existing version of the operating system.

It is quite possible that the system has become virus infected, which has caused the file deletion.

Resolution:

To start off the recovery operation, first of all you would need to unmount the file system from which you have lost the files. Then, you can use the following in-built Linux recovery tools:

debugfs: This recovery tool recovers the lost files if it is pre-installed on the system. To use this, the following steps are required:

To start ‘debugfs’, use the following command:

/sbin/debugfs device

Where, ‘device’ is the file system

Enter the following command in the ‘debugfs’ prompt:

lsdel

The deleted files will be listed after using the previous command.

To write the data of the deleted file, you would need to enter the following command:

dump
filename

Repeat this command to write the data of all the recovered files.

Type ‘q’ and press Enter to quite the ‘debugfs’ tool.

E2undel: This tool also recovers the deleted files providing better interface and recovering options. You can use the following command to recover the deleted files:

e2undel -d device -s path [-a] [-t]

However, if you are still unable to get back the deleted files then you should use a third-party Linux recovery software. These read-only tools are able to recover lost data without inflicting any damage to the existing system and perform safe data recovery in Linux systems.

Of the very few available Linux data recovery utilities, Stellar Phoenix Linux Data Recovery is the most reliable software. Supporting various Linux file systems including ext2, ext3, ext4, and also FAT12, FAT16, and FAT32, this tool supports varius Linux distributions including Red Hat, SUSE, Debian, Caldera, Mandrake, Sorcerer, TurboLinux, Slackware, Gentoo, etc. In addition, this Linux recovery tool is compatible with Windows 7, Vista, Server 2003, XP, and 2000.

Leave a Reply