Damn lack of backups. Then, victory!

  • Embedded Gallery2 is not available.
  • Embedded Gallery2 is not available.

I was heavily involved in a Fraternity in college and was actually the Vice President of my chapter for a year. For marketing materials and just posterity I needed pictures of fraternity activities, so I gathered a bunch of good pictures from years past and put them together for people to look through. It was a bit a of a project that took probably 15-20 hours a week for an entire summer, so you would think I would backup my work. Well you would think wrong, I had no backups, especially of the pictures I personally took. They were all on my 12" Powerbook, nicely organized and indexed so I could find anything and I was planning on passing them off to someone else the next year so the chapter could get more pictures and add to the collection. My Powerbook decided that it did not like my friend, Rockstarmode, touching it and something happened to the hard drive. To this day I am not sure what exactly that something was, I was upstairs when "the incident" occured, but everyone who saw said my buddy literally just touched the laptop and then the screen went weird. Would not boot or anything, and gave me a folder with a question mark on it whenever I tried to boot from the drive. Since the pictures were on there I did not want to reformat the drive and reinstall so I replaced the hard drive and tried, unsuccessfully, to recover the pictures and papers and stuff on it. Three years  and some change later I think I have finally succeeded.
Linux has all kinds of file utilities for HFS+, but none of them were working on my hard drive to get data off of it. The geometry was hosed or something so all file system operations were not working, and there was a certain point that the drive just did not work past. I held onto the hard drive for last three years hoping, because there were a ton of pictures and stuff on it, none of which I had backed up. Until yesterday, when I tried the Testdisk Suite. More specifically I used photorec to grab anything files off of the hard drive that it could find.

Here is what I did.

  1. Make a backup images of the harddrive:
    machine# ddrescue -r3 /dev/sdb /mnt/sparehardisk/harddrive.img
    This mean write a duplicate of the hard drive /dev/sdb to the file /mnt/spareharddisk/harddrive/img, retrying erros three times.
  2. Recover any files that you can:
    machine# photorec /mnt/sparehardisk/harddrive.img -d ./recovery_directory
    This will grab any files it can, regardless of the files system. If the file is still there it will move it into the recovery_directory.

There are over 80 file formats that photorec can recover. Hard core. Now I need to figure out how to organize my files, because when they are recovered they have no names so photorec gives them one, since filenames are a function of the file system. Perl to the rescue...

Moral of the story: Back your important data up!

Technorati Tags: , , ,

Comments

File Sorting

To move files of one type to a new folder I use this one-liner:

find /my/recovery/directory -name "*.jpg" -print0 | xargs -0 mv --target-directory /my/sorted/target/pictures

This perl script is very handy for removing duplicate files:

http://www.beautylabs.net/software/dupseek.html

Post new comment

The content of this field is kept private and will not be shown publicly.