Restoring a NetInfo Domain
There are various opinions about the best way to restore a NetInfo database using a dump of the data that it contains. Apple has published suggested instructions that include differences for each Mac OS X/Mac OS X Server version since 10.2. Apple’s instructions are solid and include a script that performs a number of steps in the process. To those familiar with working from the Unix command line, use of this script might seem somewhat unnecessary as opposed to simply entering the requisite commands.
The overall process, regardless of Mac OS X version (and whether or not you opt to use Apple’s script,) involves the following steps:
- Reboot into single user mode.
- Move and/or rename the damaged NetInfo database.
- Start services that are essential for NetInfo operation (the specific service is one of the primary differences between Mac OS X versions).
- Create a blank NetInfo database (which Apple provides a script for, but can also be performed by using the /usr/libexec/create_nidb command).
- Start NetInfo (again, the Apple script includes this step or it can be performed by using the /usr/sbin/netinfod -s local command).
- Use the niload command to restore the data from a dump of the NetInfo database (such as /usr/bin/niload -d -r -t/ . < /var/backups/local.nidump when using the daily backup performed at 3:15 a.m.).
- Restart the computer after the restore.