Lion Server update failure

Ran the 10.7.3 server combo update.  Come to find out it failed to properly handle network openldap info.  I see in the log files where it failed to move files from the tmp install directory.  On login I’d see the red dot and “network accounts are unavailable”.  I could still login with the local admin account.  In Server Admin Open Directory was not running and could not be started.

This server is not bound to AD, fsck turned up a clean filesystem, and I re-ran the combo update in case it was able to succeed where it had failed before.  I also repaired permissions.  In Console PasswordService was reporting “Unable to locate search base: -1” and “Can’t contact LDAP server”

The fix was to use a Time Machine backup to restore the /var/db/openldap folder.  I had to select “keep both” and then head in via single user mode.  If you’re a novice who got screwed here:

hold down command and S on boot.

fsck -fy

mount -uw /

cd /var/db

mv openldap openldap-corrupted

mv openldap\ [press tab and it will fill in the spaces appropriately for (original)] openldap

reboot

It is important the second to last command look something like mv openldap\ \(original\) openldap  I can’t remember the exact \ usage, that’s why you’re using tab autocomplete, but also remember the second openldap, which is what you’re renaming it to.

After rebooting all services were up and running again, including mail/calendar/contacts/etc.