Archive

Archive for March, 2008

Web sharing not working after a Time Machine restore?

March 19, 2008 1 comment

I ran into an issue yesterday, following a full restore of the boot drive of my home theater’s Mac Mini. I had the idea that I could turn my Mini into an actual server, using OS X Server 10.5.2, while still having it do all of the Front Row duties it’s currently doing. It turned out I was wrong (apparently, Front Row on Mac OS X Server 10.5.2 doesn’t want to talk with the latest iTunes), so I used Time Machine to roll back my boot drive to Mac OS X 10.5.2. Everything looks like it’s working fine, until I turn on web sharing and I can’t connect via HTTP to my video files. (When I’m away from my house and off my local subnet, I like to be able to stream the MP4 videos in my iTunes collection to my iPhone and laptop using HTTP and Quicktime.)

Long story short, Apache 2 (the web server built into 10.5) was fine, Time Machine just hadn’t backed something up. In fact, Time Machine by default doesn’t back up a lot of stuff that Apple knows can be rebuilt pretty easily (either automatically or manually.) Here’s the exclusions list currently for Time Machine:

Globally, the following files are excluded: /Volumes, /Network, /automount, /.vol, /tmp, /cores, /private/tmp, /private/Network, /private/tftpboot, /private/var/automount, /private/var/log, /private/var/folders, /private/var/log/apache2, /private/var/log/cups, /private/var/log/fax, /private/var/log/ppp, /private/var/log/sa, /private/var/log/samba, /private/var/log/uucp, /private/var/run, /private/var/spool, /private/var/tmp, /private/var/vm, /private/var/db/dhcpclient, /private/var/db/fseventsd, /Library/Caches, /Library/Logs, /System/Library/Caches, /System/Library/Extensions/Caches, the files and folders /.Spotlight-V100, /.Trashes, /.fseventsd, /.hotfiles.btree, /Backups.backupdb, /Desktop DB, /Desktop DF, /Network/Servers, /Previous Systems, /Users/Shared/SC Info, /Users/Guest, /dev, /home, /net, /private/var/db/Spotlight, /private/var/db/Spotlight-V100

For each user account, the following files are excluded: Library/Application Support/MobileSync, Library/Application Support/SyncServices, Library/Caches, Library/Logs, Library/Mail/Envelope Index, Library/Mail/AvailableFeeds, Library/Mirrors, Library/PubSub/Database, Library/PubSub/Downloads, Library/PubSub/Feeds, Library/Safari/Icons.db, Library/Safari/HistoryIndex.sk.

Fascinating, right? Well, as it turns out, one of the folders excluded is /private/var/log/apache2, otherwise known as the folder where Apache 2 sticks the error and access logs. That folder isn’t regenerated automatically by the system or by Apache either, but Apache needs to have that folder present in order to run. The fix is pretty simple – create the folder with the following command in Terminal: sudo mkdir /private/var/log/apache2

Categories: Geeky, Mac OS X, Time Machine