TOPIC
How do I restore a NetInfo configuration?
DISCUSSION In certain circumstances you may want to restore your NetInfo database from a backup copy or from the default templates that are installed with the server software. For instance, you might want to replace a corrupted NetInfo database or undo unwanted changes. Warning: Creating a new NetInfo database from the default templates will erase all changes that you have made to NetInfo since installation. If you have invested a lot of time configuring a NetInfo database, you probably want to rebuild it from scratch only as a last resort. If possible, it is generally easier to restore the /etc/hostconfig file and the contents of /etc/netinfo from backups made when the network was functioning properly. In either case, you should start up the server computer into single-user mode before replacing the NetInfo database. For information on how to start up into single-user mode see: Article 30837: " Mac OS Server: Starting Up Into Single-User Mode. " When Mac OS X Server is starts up into Single-User Mode, the file system is mounted as read only. To carry out either of the procedures outlined below, you must mount it as read-write. First, for safety, run fsck: #fsck -f -y fsck will then run. At the next command prompt (#), mount the file system: #/sbin/mount -uw / Restoring from backup A backup of your NetInfo database is made every night (assuming your server computer is on overnight) into the /var/backups directory. In the event that you just did something catastrophic to your NetInfo configuration, you can restore yesterday's version. 1. Start up the server computer into single-user mode 2. At the # prompt, enter the following commands to rename the current NetInfo database and replace it with the archived copy:
cd /var/backups pax -rw netinfo /etc Restoring from defaults You need to do three things: obtain a default NetInfo database, an original hostconfig file, and an original hosts file. 1. Start up the server computer into single-user mode 2. At the # prompt, enter the following commands to rename the current files:
mv netinfo netinfo.old mv hostconfig hostconfig.old mv hosts hosts.old
cp -p /usr/template/client/etc/hostconfig /etc cp -p /usr/template/client/etc/hosts /etc reboot |
Document Information | |
Product Area: | Mac OS System Software |
Category: | Mac OS X Server |
Sub Category: | Troubleshooting |
Keywords: | kmosXserver, supt |
Copyright © 2000 Apple Computer, Inc. All rights reserved.