Tuesday, May 1, 2012

Backup your shit

As an IT specialist I know the importance of regular back-ups. Now, knowing about it and doing something about it are two different things. I have just spend the last three days trying to recover my pictures. Amongst which a wedding album which I had just finished.

On Saterday I decided to go for a marathon session, finishing a wedding album which was long over due. Well that is, they got maried 4 weeks ago and I always promisse a 3 week delivery. So saterday and sunday I spend most of my time working on this beautifull album. Some 20 hours passed by, and you know what I finished the album.

Before taking a backup of the album I decided to take a well deserved walk with the dog. After my walk however, fate kicked in. My PC had shutdown, rebooting took forever (45 minutes) and after the reboot everything was unbelievably slow, I am used to some slow processing, but this was rediculous. After another 15 minutes I was confronted with the absence of my e drive.

The e drive being the one which holds my wedding album. Being an IT specialist I was not really worried. I was going to fix it :) Having fixed numerous other crashed pc's of my buddies and relatives, this was not going to be a problem.

I got my live ubuntu cd. Booted from cd, and what do you know my e drive was still not accessible. Damn't that worked in 100% of my previous crashes :(

Ok back to windows utilities, got to windows repair, after going through a couple of sessions, amongst which some nifty command prompt scripting, my C and D drive were missing as well. I love those windows utilities. :)

By now I started to get a little bit worried. I did make a backup of the pictures so that was not worrisome, but knowing that I had to go through the complete process of designing the wedding album really was bugging me, spending 40 hours on an album is normal, doubling it is not something you like to do.

Let me tell you how it went down, after three days and some restless nights I was able to recover my files. The wedding album was saved. Yeah for me, being an entrepeneur I immediatly saw great opportunities, with all the knowledge I just gathered over the last few days I could help a lot of people and of course make some great money on the side. My website promoting myself as a recovery specialist was already on the way. But then I remembered, I don't need any extra work, I promissed myself to start enjoying my live and to work less.

But it would be a shame to let all this knowledge faint away. therefore I decided to share my experience in this blogpost. I know I don't have a lot of readers but for those who do read my blog, I hope one day you will be able to use what I am about to tell you.

Caine is the solution. Caine is a linux distribution, and stands for Computer Aided INvestigation Environment. It's a distribution containing all sort of recovery utilities. I did not take the time to investigate the complete distribution, but I will tell you how I used it.

First download Caine, burn it on a cd. Make sure your computer is set to boot from cd. Boot! After booting you will get a linux desktop. The distribution is created in such a way that you only have read rights, so there is no possibility to screw things up even more than they have been screwed up by windows :)

Once on the desktop, open up the menu, go to Forensic Tools and launch TestDisk. TestDisk is the utility which will save your day. Now go through the following steps.
- Choose No Log (arrow keys) hit enter.
- Choose a disk (arrow keys), look at the size to determine which one you want. hit enter
- Choose table type (windows -> intel, use arrow keys), hit enter
- Choose Advanced (arrow keys) hit enter
- Choose partition (arrow keys) in a lot of cases the one your are looking for will be called DATA, DO NOT HIT ENTER
- Choose [List] (left right arrow keys) now hit enter
- You now have got access to your lost disk, navigate to the folder you are trying to recover, use arrow keys (up, down, left right)
- Once you have located the files you are trying to recover, select them (yes with the arrow keys) hit c (to copy)
- After hitting c, the tool will ask you for the destination location, just accept the default, hit C again.
- repeat the last two steps for every file you are trying to recover.

so far so good. Now that you have copied the files you are trying to recover, it is time to get them on some external device. Insert an usb stick are something similar. Your usb stick will not be recognized by the system, trying to mount it will not work. An other utility has been provided to mount external devices.

Go to menu, open up Forensic Tools again, and choose the utility Safe Mount. In the dropdown box select the last entry, well I am not sure that it is always going to be the last, but it is a save guess, I guess. Do not forget to check the check box to make it a writable mount, remeber by default Caine will mount everything as read only.

Now that you have mounted your external device it is time to copy the stuff you just copied onto your desktop (that is onto Caine) Here is the catch, you can't just open the Home folder location, doing so would leave you with no permissions to copy files.

So there is one last utility you should know about. Which is called Nautilus, at the bottom of your screen there is an icon looking like a seashell, clicking on it will open Nautilus as administrator. Afer opening it you will see on the left hand side a tree menu, select caine in the menu. On the right hand side you will see an icon representing the dektop and an other Icon representing the folder you want to copy.

Right click the folder, choose send to, in the first dropdown box choose Removable disks and shares, in the second dropdown box choose your external device (it is not the cd rom ;) ). click on send. YEAH !!!!! your lost info is copied on the external device.

Before pulling out your usb stick, remember to unmount it first, and yes you will have to go through one of the utilities again. Open up the safe mount again. Choose the last entry in the list hit ok again. On the next popup choose unmount. You can now unplug your usb stick and take it to your next windows disaster machine.

I hope you will never have to use this procedure, but when running on windows you never know. I always make backups, of everything I do. When I get home after an assignment the first thing I do is, make a copy of my pictures on three different locations. When starting to work on my pictures, I sometimes get sloppy and make the copy after all the work has finished, I know I should do it on a more regular basis, but hey I am only human.

Remember this procedure is for copying a small number of files. Caine is also able to make an image of a complete drive, but I did not dig into this procedure. I had a backup of most of my work anyway.

Och yeah, why did it take me three days?? Because it was only on the third day that I discovered Caine. If only I would have known .... Now you guys ain't have no excuse for sucking up valuable spouse time.

This post was not much about photography, but any photograper should know about this distri.