It was a beautiful Friday morning in Bangalore a couple of weeks ago. The previous night I had a great idea to upgrade my Macbook Pro to the latest OS X Sierra. I wanted to take a backup of my entire Macbook Pro including the Linux Mint and eOS installed as Desktop Parallels to an external hard drive.
I just had one external hard disk (Seagate 1 TB) with me with some 550 GB personal data including documents, books, pictures, movies and music on it.
I wanted to take a backup of Mac and attempted to resize the external hard disk and partition it into two partitions using GParted. I started this task without complete knowledge of partitioning. Resizing seemed to have happened correctly but I failed to achieve the 2nd step ie., creating additional partition.
It was here, I made a crucial and unforgivable mistake. With over confidence, connected external hard disk to Macbook and then used a back up software called Time Machine. Time Machine application which then formatted the entire external hard disk to HFS+ format. I made a stupid mistake without thinking. It all was all over in a matter of 2 seconds. The damage was done. I did not know how to recover the data. I connected to Linux Mint and could not find any data. All the 550 GB data was lost in two seconds.
At this point of time, I did not know what to do. I quickly downloaded couple of trail software apps on Macbook to try and recover the lost data. There was no luck. I therefore approached a professional data recovery services company and gave my external hard disk. The person told me it will take lot of time to recover lost data. The recovery process is also expensive he needs to test in lab whether it is possible to recover or not.
I was following up with him for a couple of days and this is when the recovery services person told me that it is possible to recover. I had a hope. However couple of days later he informed me that there is a problem and he is unable to read the data from hard disk. Hence I had to take back the hard disk . Whatever hope I had was lost.
After a weak gone, I wanted to give a try myself. Hence I posted a question on Linux Mint Google plus forum for free or open source recovery software. Nine out of 10 people suggested me to try TestDisk software.
TestDisk (http://www.cgsecurity.org/wiki/TestDisk) comes with a companion tool called PhotoRec. At once, I installed TestDisk from Linux Mint Software Manager.
After installing TestDisk, i attempted reading from the external hard disk but it could not discover anything. There was a deep search option available but I was not sure. Hence I resorted to companion software PhotoRec (http://www.cgsecurity.org/wiki/PhotoRec)
Both TestDisk and PhotoRec are command line tools. I went through the Step By Step wiki page of PhotoRec (http://www.cgsecurity.org/wiki/PhotoRec_Step_By_Step) and ran the tool from Command Line as root. After selecting the hard drive (source) to retrieve data from and write to (destination), the tool was displaying 10 hours remaining as the time required to recover the data from entire hard disk.
The step by step instructions with screen shots are given in the above link. Hence, I won’t be repeating it here.
At this point, I went through the instruction once again and understood that we can choose the file types we wish to recover from the various file types supported (http://www.cgsecurity.org/wiki/File_Formats_Recovered_By_PhotoRec). There are more than 300 file formats’ recovery is supported by PhotoRec.
To me, it took roughly 10 hours to recover various document type, pictures, audio and video files totaling 770000 file in 1500+ folders that PhotoRec created in the process.
After this, I had to manually delete unwanted files/file types from the terminal by running delete command from the folders and sub folders.
Finally, I was happy to see my lost data (especially the Photos that are dear to me).
I want to thank the cgsecurity team for such a wonderful software and the Linux Miont Google Plus community friends who suggested me TestDisk/PhotoRec.