Like this article? We recommend

Like this article? We recommend

Manual Backup

If you are planning to make changes to a NetInfo domain manually or are
planning some other configuration change that could affect the domain, you might
want to plan a manual backup of the domain. You might also want to do this as
part of a backup regimen (particularly for a workstation or server that will not
be running at 3:15 a.m.). The command to perform a dump of the NetInfo data is
as follows (you can also specify a location before the filename backup.nidump as
well as an alternate file name):

nidump -r / -t localhost/local > backup.nidump

NOTE

It is also possible to perform a backup by simply creating a copy of the
database, which is located at /var/db/netinfo/local.nidb. To function, this copy
should be made as root or using the sudo command. However, this method is not
approved or endorsed by Apple and could conceivably cause issues if the backup
was performed a significant amount of time before it is used for restoration.
However, it does have a somewhat easier restore process—as booting into
single user mode and simply renaming the damage database and copying the
duplicate into its place—making it more convenient if you want to back up
the database prior to making changes to it. For more information on this method,
see the
"Getting to Know The Netinfo Database"
and
"Restoring the Local NetInfo Database"
sections of Mac OS X Unleashed.