Restoring my dev machine from a Time Machine backup

Posted on July 8, 2011

In what turned out to be the second worst news of the day, I found out my computer was stolen from our office. (The worst news came in the form of a realization that I was not going to get a cab and instead had to subway it home with a 10 pound box of frozen meat, a new laptop, my big-ass purse, and a bag containing 3 pound ankle weights, 2 pound wrist weights, and foam roller. It was awesome.) Fortunately, I’m anal (and lucky that my Time Machine hard drive wasn’t also stolen) and had the machine backed up with Time Machine (and CrashPlan to the cloud). Word.

After the 1-2 hours it took to restore my computer (I don’t know the exact time as I went to purchase the aforementioned weights and foam roller), I started doing some work. I was pleasantly surprised that everything seemed to be there and in good working order until I went to start my rails dev server and postgres barfed. I thought I just needed to restart the server, but I was sadly mistaken.

Now, invariably, your dev machine is its own unique flavor. My intention is just to let you know what worked for me in the hope that it will help you troubleshoot your own issues.

Here is what was necessary:

  • Change the group to staff for my /usr/local directory (especially /usr/local/Cellar where my homebrew install lives) and /opt/local (where my macports install lives … Note: I only use macports because Heroku’s shared databased is postgres 8.3 which is not available in Homebrew).
    • sudo chgrp -R staff /usr/local/
    • sudo chgrp -R staff /opt/local/
    • If not already, you may have to give the staff group write access to those directorys as well with: sudo chmod g+w /usr/local etc
  • Re-install X-code. I seriously don’t know why this was necessary as I could launch X-Code just fine, but both HomeBrew and MacPorts complained about it and then couldn’t find make. I guess the C compiler doesn’t get restored from Time Machine.
  • Fixing Postgres 8.3:
    • Reinstall: sudo port install postgresql83 postgresql83-server
    • Set the correct permission on the data folder: sudo chmod 755 /opt/local/lib/postgresql83/data
    • Start the server
  • Make sure you git pull all of your repositories before doing work!!

I have now also updated CrashPlan to backup my /usr/ and /opt/ folders (check “Show Hidden Folders” to see /usr/).


No Replies to "Restoring my dev machine from a Time Machine backup"


    Got something to say?

    Some html is OK

    This site uses Akismet to reduce spam. Learn how your comment data is processed.