Apache Missing After Time Machine Restore

My last post was about the importance of a proper backup and how you should perform this using time machine while encrypting your user account with filevault. Which was a little bit foresighted, because I soon afterwords had my machine go tits up on me.

Here is the short of it: Before eating lunch on Monday, I logged out of my computer to do a time machine backup. After restarting I ejected the external HD, by dragging the icon to the trash, and then pulled the plug. I am told the disk can't be ejected because it is in use, then I am told that I ejected the drive improperly. After this the finder gets unresponsive/slow. I choose shutdown, which is slow and finally I get an error that Mail halted shutdown and needs to be force quit. I force quit mail and choose shutdown. Computer hangs for ~10 min with desktop background up. I hold down power button until computer shuts down. Now it powers up, but doesn't get past the gray apple screen.

I tried to flash the PRAM. I tried to boot to safe-mode. I booted into firewire mode and ran disk utility via another computer. (Good thing I travel with two laptops!) NoTHING! I don't think I brought my original disks! (Now that was stupid.) I spend the evening trying to move the system files over, but still no luck. The next morning, I hop the Prague Metro and head to a mall kiosk, which is the closest thing to an Apple Store in Central Europe. I buy the most recent copy of the OS, 10.4, and head home.

I perform an install from time machine backup, and am impressed by how easily everything is up and running again. Except for one thing, I start my web browser and localhost (127.0.0.1) cannot be found (403). SHIT. I look in the sharing preferences and web sharing is checked. I flip web sharing on and off a few times and still no Apache. I open Terminal and use sudo apachectl restart, and nothing happens. I start to randomly poke at it and finally run apachectl without sudo and I get an error:

launchctl: CFURLWriteDataAndPropertiesToResource(/System/Library/LaunchDaemons/org.apache.httpd.plist) failed: -10

Being experienced with unique and curious errors, I plug it straight into Google to get this life saving post: http://www.entropy.ch/phpbb2/viewtopic.php?p=11702&sid=06589d00ede46c15b...

It appears that when you restore your system from Time Machine backup at least one directory is not copied across. The directory /var/log/apache2 is not present. If you create this directory, Apache will be able to start and all will be golden.

Comments

Post new comment

  • Allowed HTML tags: <em> <strong>
  • Lines and paragraphs break automatically.

More information about formatting options

Image CAPTCHA
Enter the characters shown in the image.