- Table of Contents
- Copyright
- About the Author
- Acknowledgments
- Tell Us What You Think!
- Introduction
- Part I: Introduction to Mac OS X
- Chapter 1. Mac OS X Component Architecture
- Chapter 2. Installing Mac OS X
- Chapter 3. Mac OS X Basics
- Chapter 4. The Finder: Working with Files and Applications
- Chapter 5. Running Classic Mac OS Applications
- Part II: Inside Mac OS X
- Chapter 6. Native Utilities and Applications
- Chapter 7. Internet Communications
- Chapter 8. Installing Third-Party Applications
- Part III: User-Level OS X Configuration
- Chapter 9. Network Setup
- Chapter 10. Printer and Font Management
- Chapter 11. Additional System Components
- Part IV: Introduction to BSD Applications
- Chapter 12. Introducing the BSD Subsystem
- Chapter 13. Common Unix Shell Commands: File Operations
- Part V: Advanced Command-Line Concepts
- Chapter 14. Advanced Shell Concepts and Commands
- Chapter 15. Command-Line Applications and Application Suites
- Chapter 16. Command-Line Software Installation
- Chapter 17. Troubleshooting Software Installs, and Compiling and Debugging Manually
- Chapter 18. Advanced Unix Shell Use: Configuration and Programming (Shell Scripting)
- Part VI: Server/Network Administration
- Chapter 19. X Window System Applications
- Chapter 20. Command-Line Configuration and Administration
- Chapter 21. AppleScript
- Chapter 22. Perl Scripting and SQL Connectivity
- Chapter 23. File and Resource Sharing with NetInfo
- Getting to Know the NetInfo Database
- Using the NetInfo Database to Customize a User
- Using the NetInfo Database to Share Resources
- Restoring the Local NetInfo Database
- Summary
- Chapter 24. User Management and Machine Clustering
- Chapter 25. FTP Serving
- Chapter 26. Remote Access and Administration
- Chapter 27. Web Serving
- Part VII: Server Health
- Chapter 28. Web Programming
- Chapter 29. Creating a Mail Server
- Chapter 30. Accessing and Serving a Windows Network
- Chapter 31. Server Security and Advanced Network Configuration
- Chapter 32. System Maintenance
- Appendix A. Command-Line Reference
- Appendix B. Administration Reference
Restoring the Local NetInfo Database
Knowing how to restore your local NetInfo database is just as important as knowing how to back it up.
Exactly how you restore it depends on what method you chose for backing it up or whether you backed up the database as a directory or as a tar file. Depending on the situation, you might be running your restore in multi-user mode or in single-user mode. If you are in single-user mode, remember to follow the instructions that appear at the very end of the startup so that you are allowed to make modifications.
Be sure not to rush and pay close attention to what you are doing.
- If your modification to the NetInfo database was made in conjunction with a change to the /etc/hostconfig file, replace the modified /etc/hostconfig file with the backup copy.
-
Go to the /var/db/netinfo:
[localhost:/Users/joray] root# cd /var/db/netinfo
List the contents of the directory. You might have multiple backup copies. Make sure that you know which one you want to use for restoring the NetInfo database. The directory called local.nidb is the local NetInfo database. -
Either remove the broken local.nidb or rename it to something that lets you know that it is broken. If you rename it, you can remove it later when you have your NetInfo database restored.
To remove the broken NetInfo database:
[localhost:/var/db/netinfo] root# \rm -rf local.nidb
To rename the broken NetInfo database:[localhost:/var/db/netinfo] root# mv local.nidb local.nidb-broken
-
If you made your backup as a tar file, extract the back-up copy:
[localhost:/var/db/netinfo] root# tar -xf local.nidb-20010512.tar
If you made your backup as a copy of the directory, rename the backup copy to local.nidb:[localhost:/var/db/netinfo] root# mv local.nidb-backup local.nidb
-
Send a kill -HUP to the nibindd process, if you are in multiuser mode:
[localhost:/Users/joray] root# ps -aux | grep nibind root 6993 0.0 0.0 1288 136 ?? Ss 0:00.04 /usr/sbin/nibindd root 7777 0.0 0.0 5708 0 std RV 0:00.00 grep nibind [localhost:/Users/joray] root# kill -HUP 6993
If the NetInfo database does not appear to be restored after sending a kill -HUP to the nibindd process, reboot the machine. If you are in single-user mode, reboot the machine:localhost# sync;sync;sync;reboot
After the restored NetInfo database is up and determined to be fine, if you saved the broken NetInfo database, it is all right to remove it now.
Please note that you could also restore the local NetInfo database using the NetInfo Manager's Restore From Backup option under the Domain menu. Given how long a backup can take using the NetInfo Manager, we have not actually tried restoring the local database using the NetInfo Manager. If something goes wrong when you try to restore this way, be prepared to restore the database via the command line.
Summary | Next Section

Account Sign In
View your cart