Backup OpenDirectory information on your OS X server

Mac OS X Add comments

I had a problem this afternoon with LDAP and SSH on the server that hosts this page, and I’d rather not reveal any more detail than I have to in the interest of security. However, it turned out that something in the LDAP database had become corrupted and prevented LDAP-based users from logging in, even though local netinfo users worked fine.

I backup OpenDirectory on my servers whenever major changes are made. It’s command line intensive, but it’s not difficult. Apple provides the steps to backup and restore this information as part of Workgroup Manager help, but many people aren’t aware of it or aren’t able to find it.

I’ve taken both of those help topics and saved them as PDFs so that they might be useful to others. These documents are the creation of Apple and any questions or suggestions should be directed to them and not me.

OpenDirectory backup (PDF, 44k)

OpenDirectory restore (PDF, 48k)

The restore I performed this afternoon worked flawlessly, which means the backups I’ve been performing are obviously good. Had they not been, I would have booted from a known good clone of the system drive and restored the system to a known working state, and reapplied any necessary changes. It doesn’t hurt to have two ways to recover, and in this case, restoring OpenDirectory instead of the whole system was a time and hassle saver.

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in