Sunday, September 29, 2013

Recovering data Part 2: deleted partitions

While PhotoRec will recover lost files, what happens when an entire disk partition vanishes? Enter TestDisk.

The ideal situation will be that after you realized you wrongly deleted that partition, that you boot up with a Live CD or Flash Drive. Connect to the Internet, then open Software Manager and search for TestDisk (remember to include the Universe repository in the settings).

When you recover data it is always better to recover it to a different drive, the ideal would be a large external HDD.

For an in depth look at TestDisk check out the HowToGeek tutorial here. At the moment I don't have a test machine and I am sadly not going to risk deleting an important partition on my laptop for this tutorial.

Sorry folks, maybe some day I will revisit this when I have a test machine and an empty external HDD.


Thank you for understanding.

Friday, September 27, 2013

Recovering Data Part 1 - deleted files

Have you ever deleted a file, only to realize that you in fact, still needed it? That's what the Trash Can is there for (Recycle Bin for Windows users). But what if you emptied the trash and then realized you still needed stuff?

Recovering deleted files can save you a lot of time and effort, in that you do not have to redo the work you spent hours or days doing and in some cases like with holiday photographs it can help you save precious memories. You can't go on holiday to the exact same place and retake all the photos you lost (normally).

Enter PhotoRec, it comes bundled together with TestDisk (which we will discuss in a later post). To install:
  • Open a Terminal Window
  • Type in: sudo apt-get install testdisk
  • Press <ENTER>
  • Type in your sudo password and press <ENTER>
  • Follow the prompts
(Alternatively search for testdisk in software manager)
(remember to include the Universe repository in the settings, if you get an error message when you try to install the program)

If you are not in a Terminal window, then open one. Type in sudo photorec and press <ENTER>. You might not have to enter your password again, unless if more than a few minutes has passed since you last typed it in.

PhotoRec will now ask you on which partition you want it to search for deleted files. I deleted a few files from a flash drive before installing the program and here I choose my Adata flash drive. Next you will need to choose what type of partition it is for PhotoRec to be effective. Now you are asked to choose the partition to scan for deleted files, do so.

  If you are asked which file types to recover, then make a selection (I must have chosen all files somewhere).

You will now be asked where to save the recovered files. I choose my home folder, PhotoRec make a sub folder with all the recovered files in it.

The only thing that was strange (to me at least) is that the recovered files where:

1. Not in folders, as they had been on the drive and
2. Had all been renamed, of the 238 recovered files all of them started with f

I tested some of the recovered files and found that they had successfully been recovered (unlike my experience with some Windows file recovery programs where you are told that your files are now back, but they don't open properly any more).

A program worth checking out.

Wednesday, September 25, 2013

Sorry I have been so quiet lately

I started a new job in August, which keeps me away from home for 13 hours a day. I now have a lot less spare time and it has cut into my blogging time as well.

I really should try to put up a new post every week, fingers crossed.