Document ID: 23890
Contents
Introduction
Prerequisites
Requirements
Components Used
Conventions
Check for Database Corruption
Step-by-Step Instructions
Recover the Server from a Backup Database
Step-by-Step Instructions
NetPro Discussion Forums - Featured Conversations
Related Information
Introduction
This document explains how to check for database corruption and how to recover the Cisco Network Registrar server from a backup database.
Prerequisites
Requirements
There are no specific requirements for this document.
Components Used
This document was developed and tested with Cisco Network Registrar version 5.0 and 5.5. This procedure is not applicable for other versions of Cisco Network Registrar.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
Conventions
For more information on document conventions, refer to the Cisco Technical Tips Conventions.
Check for Database Corruption
Step-by-Step Instructions
Complete these steps:
-
Issue this command to stop the AIC Server Agent:
-
UNIX: /etc/init.d/aicservagt stop
-
Windows NT: Use the Server Manager to stop the AIC Server Agent process.
-
-
From the command line, go to this directory:
-
UNIX: /var/nwreg2/data/db
-
Windows NT: \Program Files\Network Registrar\data\db
-
-
Issue this command from the command line to check the database integrity:
-
UNIX: /opt/nwreg2/bin/dbcheck -a /var/nwreg2/data/db/mcddb
-
Windows NT: ..\..\bin\dbcheck -a mcddb
This completes a higher level check for database health.
-
-
If you encounter database errors, run the keybuild utility on the basename of the Network Registrar database. Issue this command from the command line to rebuild the key files:
-
UNIX: /opt/nwreg2/bin/keybuild /var/nwreg2/data/db/mcddb
-
Windows NT: ..\..\bin\keybuild mcddb
-
-
Issue this command to restart the AIC Server Agent:
-
UNIX: /etc/init.d/aicservagt start
-
Windows NT: Use the Server Manager to start the AIC Server Agent process.
These steps should fix most of the problems. If you continue to encounter problems with the database, recover the database from a backup database, as outlined in the next section.
-
Recover the Server from a Backup Database
Step-by-Step Instructions
Complete these steps:
-
Issue this command to stop the AIC Server Agent:
-
UNIX: /etc/init.d/aicservagt stop
-
Windows NT: Use the Server Manager to stop the AIC Server Agent process.
-
-
Verify that the Cisco Network Registrar has been stopped:
-
UNIX: /etc/init.d/aicservagt stop # to ensure no processes are still running (orphaned)
ps -leaf | grep nwreg # if so use kill -9 <pid>
-
Windows NT: Use the Server Manager to stop the AIC Server Agent process.
-
-
Copy the mcddb.d01, mcddb.d02, and mcddb.d03 files:
Operating System
Copy From
Copy To
UNIX
var/nwreg2/data/db.bak
/var/nwreg2/data/db
Windows NT
\Program Files\Network Registrar\data\db.bak
\Program Files\Network Registrar\data\db
Note: If the db folder already contains the mcddb.d01, mcddb.d02, and mcddb.d03 files, overwrite them because they may be corrupt.
Note: If your DHCP process has crashed or you have problems only with the DHCP part of the server, proceed to the next step. Otherwise, skip to step 6.
-
Copy recursively all contents of the dhcp.bak directory (files and subdirectories) under the dhcp directory, as specified in this table.
Operating System
Copy From
Copy To
UNIX
/var/nwreg2/data/dhcp.bak
/var/nwreg2/data/dhcp
Windows NT
Program Files\Network Registrar\DATA\dhcp.bak
\Program Files\Network Registrar\DATA\dhcp
-
Issue this command to clear DHCP queue in order to remove older data:
-
UNIX: /var/nwreg2/data/dhcpeventstore/*
-
Windows NT: \Program Files\Network Registrar\DATA\dhcpeventstore\*
Note: If you are not using Cisco Network Registrar 5.5 or later, skip to step 7.
-
-
Copy recursively all contents of the dns.bak directory (files and subdirectories) under the dns directory, as specified in this table.
Operating System
Copy From
Copy To
UNIX
/var/nwreg2/data/dns.bak
/var/nwreg2/data/dns
Windows NT
\Program Files\Network Registrar\DATA\dns.bak
\Program Files\Network Registrar\DATA\dns
-
From the command line, go to this directory:
-
UNIX: /var/nwreg2/data/db
-
Windows NT: \Program Files\Network Registrar\data\db
-
-
Run the keybuild utility on the basename of the Network Registrar database to build the database. Issue this command from the command line to rebuild the key files:
-
UNIX: /opt/nwreg2/bin/keybuild /var/nwreg2/data/db/mcddb
-
Windows NT: ..\..\bin\keybuild mcddb
Note: This may take several minutes.
-
-
Issue this command from the command line to check the database integrity:
-
UNIX: /opt/nwreg2/bin/dbcheck -a /var/nwreg2/data/db/mcddb
-
Windows NT: ..\..\bin\dbcheck -a mcddb
-
-
Issue this command to restart the AIC Server Agent:
-
UNIX: /etc/init.d/aicservagt start
-
Windows NT: Use the Server Manager to start the AIC Server Agent process.
Note: The Cisco Network Registrar server is now recovered from the backup database.
-
NetPro Discussion Forums - Featured Conversations
| NetPro Discussion Forums - Featured Conversations for Network Management |
| Network Infrastructure: Network Management |
| Virtual Private Networks: Network and Policy Management |
Related Information
| Updated: Jan 31, 2006 | Document ID: 23890 |
