You accidentally deleted files and you're desperate because you don't know how to recover them? One of the hard drives you use for your backups has stopped working, or is it "acting up", and you would like to know if there is a way to recover the files on it? No problem, maybe I can help you, but you need to act in a timely manner and avoid using the hard drive on which the files you want to recover were located.
As I have explained to you on other occasions, when we delete files from our computers (or even from our smartphones or tablets), they are not really deleted. More simply, the portion of the disk that hosts them is marked as "free" and then prepares to accept new data instead of deleted ones. This means that if you act in time, i.e. before the portion of the disk is occupied by new data, using specific software, you can recover some of the data you thought was deleted.
As for damaged hard drives, for example those that fail to copy files or no longer allow access to certain partitions, the situation is more difficult but not necessarily desperate: even in those cases by acting in a timely manner and using the right solutions you can get back, at least in part, your files. So, what are you still doing standing there? Roll up your sleeves and find out how to recover HD data with the guidance I'm about to give you.
Precautions and Precautions
If you want to increase the chances of recovering files that you deleted by mistake, you need to minimize the use of the hard drive on which they were stored. This means that if you need to recover data from the internal hard drive of your PC, you need to download data recovery software from a different computer, copy it to a USB flash drive or other external drive and run it directly from there. If you have a secondary drive inside your PC and a system that works through it, you can also use that instead of the external drive.
Another important thing: If you want to recover data from a hard drive that no longer works well (i.e. a drive that gives error while copying files or does not allow access to certain partitions) creates an image file of the latter and attempts to recover deleted files directly from the obtained image. In this you will avoid stressing the drive more than you should (data recovery can be very stressful for the drive) and in case of permanent drive failure you will have a way to recover your files anyway.
To create an image file of your hard disk, i.e. an archive file that contains the exact contents of the source drive, you can rely on DataRescue's DD: a free software for Windows and MacOS that works with internal and external drives formatted with all popular file systems.
To download DataRescue's DD to your computer, connect to the program's website, scroll down the page and click on Windows Version if you are using a Windows PC or OS X Version if you are using a Mac. When the download is complete, if you are using a Windows PC, extract the zip archive containing DataRescue's DD and launch the drdd.exe executable to start using the program (which does not require installation). If you use a Mac, instead, open the zip archive you downloaded from the DataRescue's DD website, open the dmg package extracted from it and drag the DataRescue's DD icon into the Applications folder of macOS. To run the software, right-click on its icon and select Open from the menu that appears.
Now, select the disk you want to create the image file from the Source drop-down menu (top left), press the Browse button, select the folder where you want to save the disk image file and click the ▶︎ button to start the file copy process.
In case of read errors, if the program crashes, you can use the Start, Size, End, Sectors and MB fields to tell DataRescue's DD which areas of the disk it should start, finish and start copying data again. This way you can skip the bad sectors and still get an image of your disk.
Programs to recover HD data
You should now be ready to take action. So take as much time as you need and find out how to recover data from internal and external HD using the software I'm about to recommend.
PhotoRec and TestDisk are two free and open source software that allow you to recover deleted files: the first one is focused on recovering deleted files from hard drives, USB sticks, memory cards and other media; the second one is mainly designed for data recovery from damaged hard drives and/or lost partitions. PhotoRec has a handy graphical interface that makes it extremely easy to use (on Windows only though, on MacOS and Linux it works as a command line only), TestDisk works as a command line on all operating systems.
That said, to download PhotoRec and TestDisk to your PC, connect to the program's website and click on the operating system you are currently using, such as Windows for Windows and Mac OS X Intel for MacOS. When the download is complete, open the zip package you downloaded from the PhotoRec and TestDisk website, extract the content to any folder and run the qphotorec_win.exe executable (in this tutorial, I will focus on the Windows version of the software, which has graphical interface).
In the window that opens, expand the drop-down menu at the top to choose the disk from which you want to recover files, or select Add a raw disk image if you need to recover data from an image file (the one created by DataRescue's DD, for example).
Then click on the entry for the main partition on the selected drive (e.g., "Recover HD"). NTFS, FAT32 or exFAT), tick next to FAT/NTFS/HFS+/ReiserFS/ or next to ext2/ext3/ext4 depending on the file system the drive is formatted with and choose an option between Free: search for documents only in unallocated space or Full: Extract documents from the entire partition depending on whether you want to search for deleted files in the unallocated space of a drive that still works properly or if you need to treat a damaged drive and therefore want to recover data from the entire partition.
To finish, click on File Formats button and select the file types you want to recover with PhotoRec (you can choose pictures, videos, Office documents, compressed archives, applications and many other different contents); press Navigate button to choose the folder where you want to save the recovered data from the program and press Search button to start data recovery from the selected drive. When the scan is finished, you will find all the files recovered from PhotoRec in the folder you have chosen by clicking the "Browse" button.
If you had no luck with PhotoRec or for any other reason you want to try to recover files via TestDisk, start the program executable (which on Windows is testdisk_win.exe, on Mac is just testdisk and open it by right clicking its icon and selecting Open from the context menu) and proceed as follows.
- Select the Create option to create a new log file and go to the main TestDisk screen;
- Select the disk to recover data from and select the Proceed item below;
- Select the partition type from which you want to recover data (the right option should be automatically selected);
- Select the Analyse option to analyze the disk structure;
- Select the Quick Search option to start searching for any hidden/lost partitions;
- Select the partition from which you want to recover data and press the P key on the PC keyboard to access the files on the PC;
- Select the file to recover and press the C key on your PC keyboard;
- Select the path to export the selected file and press Enter.
This is just the simplest and "superficial" procedure to use TestDisk, which is an extremely powerful and versatile tool. If you want to know more, consult the official software documentation.
If you need to recover deleted files from a hard drive, USB flash drive, memory card or other drive that still works properly, I can only recommend Recuva: one of the most intuitive and effective data recovery software available on Windows. It's completely free and it's made by Piriform, the same software house as the famous CCleaner, so you can rest assured of its reliability. Unfortunately it doesn't support DataRescue's DD image files, but you can't want everything from life, right?
To download Recuva to your computer, go to the official website of the program and click the Download Free Version button first and then Free Download and CCleaner.com. When the download is complete, open the Recuva installation package (rcsetupxx.exe) and click the Yes button. Then choose your language from the language selection menu (top right) and complete the setup by first clicking on Install and then on Run Recuva.
Now, start Recover, click the Next button and choose the type of file you want to recover from All Files, Images, Music, Documents, Videos or Compressed Files. Then, click Next and choose the drive from which you want to recover data by checking the In a specific location, clicking Browse and selecting your hard drive.
To finish, go ahead, click the Start button and wait for the list of recoverable files to show you. The files will have a small icon next to them: those with the green icon can be recovered without any problem, those with the orange icon are partially damaged but can be recovered anyway, while those with the red icon are damaged irreparably and therefore cannot be recovered.
Once you find the files to restore, select them by placing a check mark next to their name, click on the Recover button located at the bottom right and choose the folder to export them to.
If the Recuva scan does not give you enough satisfying results, try to repeat it by placing a check mark next to the Enable in-depth scan item (before clicking on "Start"). This will make a deeper scan of the drive and therefore you are more likely to find the files you are interested in.
Another data recovery software to take seriously is Disk Drill, which is compatible with both Windows and MacOS and also supports image files. Unfortunately it is not free - it costs 79 Euros, but it is available in a free trial version that lets you find out which files can be recovered and allows you to preview them (on Mac) or limits file recovery to 100MB (Windows).
To download DiskDrill on your computer, connect to its official website using the links I just provided (depending on whether you use Windows or MacOS) and click on the Download Free button. When the download is complete, if you use a Windows PC, open the installation package called disk-drill-win.msi and click on Next for three consecutive times and then on Install, Yes and Close to finish the setup. If you are using a Mac, open the dmg package containing DiskDrill and drag the program icon into the Applications folder of macOS.
Now you just have to boot DiskDrill and select the drive to scan. If you want to scan an image file and use a Windows PC, click on the gear icon at the top right and select Attach image from the menu that appears. If you're using a Mac, select Attach unmountable disk images from the File menu.
Next, click on Recover/Recover button to start disk analysis and wait for the list of recoverable files to be shown to you. To recover files or preview them, just select them and click on Recover button or eye icon.
Recover HD data using a Linux distro
If your hard disk is not corrupted, you haven't deleted any files by mistake and your only problem is that Windows no longer boots properly, you can recover data from your computer's internal disk by simply downloading a Linux distro, for example Ubuntu, and booting from it. In this way you will have a complete operating system at your disposal and you can recover your files from the internal disk of your PC in complete freedom.
If you don't know how to download, boot or use a "live" Linux distro, read my tutorial dedicated to Ubuntu and there you'll find all the information you need. Of course the same operation can be done with other Linux distros and Windows based WinPE systems.