Restore hard disk partitions and files in Linux MintSection: Tools | Actuality: Unspecified
Sooner or later each of us is faced with the necessity of data recovery. It can be accidentally formatted hard disk, a scratched CD with photos of your beloved deceased pet, or even a flash drive with course work that your friend decided to use as bootable media.
If you are not confident in their knowledge, better do not attempt to recover partitions drives. This can cause complete loss of data.
How can you recover the files if they were deleted? The fact is that when you delete a file, the data still remains on the disk until such time as the memory disk will not be overwritten. Therefore it is very important that you understand the entire process of data recovery. If you install the operating system, forgetting what has not been done backup critical data is not loaded from the hard disk and install new software. The same applies to removable media.
In this article we will discuss the most common software for data recovery and a little touch on the subject of backups, because in most cases, restoration is carried out from backups.
Software to recover hard disk partitions, files and data
1. TestDisk is a powerful console application is open source, designed to recover lost partitions and return the possibility to boot from them. Utility is available for operating systems linux, windows, DOS, FreeBSD (OpenBSD, NetBSD) and MacOS X. Among the opportunities TestDisk:
- the ability to fix partition table, recover deleted partitions;
- to restore the boot sector from a backup;
- to recover files (works with file systems fat, ntfs, and ext2);
- to create copies of files from deleted partitions (work with file systems FAT, ExFat, NTFS, ext2, ext3, ext4).
- Due to the wide functionality, TestDisk can use for both beginners and experts.
sudo apt-get install testdisk
TestDisk recovers deleted files on partitions with the most common file systems.
TestDisk recovers files not in the place from which they were removed. Instead, the user is prompted to copy the deleted files to another media.
Utility console and assumes the presence of skills of work with the command line from the user.
The program is in English, so presume it to be used on every professional, because the slightest mistake when dealing with the restoration can be fatal.
Even when you run displayed a message saying that the program is free and provided "as is", so the developers do not provide any guarantees. Rephrase for those who do not understand - you use the program to recover at your own risk. And even if you have a direct hand, may fail or error and you will say goodbye with the data forever.
So, what you need to know and what to do for successful data recovery. Firstly, do not try to work with the partition until such time as the recovery process fully completes. To recover information preferably on a different drive or at least partition. After selecting the partition type, a window will appear with various options.
To recover data from a partition, select "Advanced" and specify which partitions you want to restore (copy to another media). When the utility will scan the selected disk, all deleted files will be displayed in the list view. Copying a file by pressing "C" on the selected item. Then specify the path in which you want to copy the file.
Unfortunately, I cannot show an example of restore deleted partition and partition table, but fortunately on this topic on the Internet there is enough information. Also I want to show the highlights and features of data recovery and lighting software that is intended for this purpose.
2. PhotoRec is a program to recover lost files including video, audio, archives, and various types of documents. Able to recover files from hard disk, CD-ROMs and memory cards from digital cameras.
Cope with the restore data where other methods won't work because it ignores the filesystem. Perfectly restores data even after formatting the media. PhotoRec is used in conjunction with TestDisk and running on the same OS, and TestDisk. One of the main advantages PhotoRec is able to access the media that you want to restore read-only. This means that you cannot save the recovered data to the same device. In this case PhotoRec retains the ability to re-restore the lost data if it has not already been overwritten by another utility.
To launch the utility, you must first install TestDisk and then type in the console:
When you select a directory, use the arrows (not just up/down and forward/back to move to previous/subfolder).
3. Mondo Rescue - free and very reliable software, designed mainly for backups, but can also recover data from damaged media. Can be used to clone the OS and install identical systems on multiple machines. Supports almost all currently existing file system.
Thanks to the reliability, Mondo Rescue is used by many famous companies and even NASA. This is one of the few programs that have deb and rpm packages which exist for a very wide range of Linux OS.
To install Mondo Rescue for Linux Mint perfect deb packages posted on the official website for Ubuntu. Do not forget that downloading deb packages you need for the respective versions. For example, for LM Quiana - deb-packages for Ubuntu 14.04.
Using Mondo Rescue you can save a copy of the system in iso image and then install it on another machine.
As for Linux Mint 17.1 is there no package for Ubuntu 14.10 I have downloaded and installed the version for 14.04. Installed without problems.
Replace 14.04 on your version of the distribution
sudo wget -q -P /etc/apt/sources.list.d ftp://ftp.mondorescue.org/ubuntu/14.04/mondorescue.sources.list wget -q -O - ftp://ftp.mondorescue.org/ubuntu/14.04/mondorescue.pubkey | sudo apt-key add - sudo apt-get update sudo apt-get install -y mondo
After installing Mondo, Run “mondoarchive” command as “root” user
For information about commands type in the terminal:
3. ddrescue is a very useful utility with its unique and interesting history. It owes its origin to dd utility used to create copies of disks and ignore errors, destroying data disks with damaged sectors.
The main disadvantage is very slow. Sometimes data recovery may require more than a day.
sudo apt-get install gddrescue
ddrescue -v /dev/sda1 /dev/sdb1 /media/ddrescue.log
/dev/sda1 - damaged
/dev/sdb1 is the partition on which you want to copy the files.
/media/ddrescue.log - drive on which to store the log.
A copy of the damaged disk .iso:
ddrescue -v /dev/cdrom Recovered.iso ddrescue.log
Very important to be able to restore the lost data, but more importantly, to prevent their loss. For this purpose it was invented data backup. For linux, as for many other systems, there is software that facilitates the creation of backups. We have already reviewed one of these programs - Mondo Rescue.