Document ID: 50120
Contents
Introduction
Prerequisites
Requirements
Components Used
Conventions
Simplified Database Backup
CNR 6.0 and Earlier Versions
CNR 6.1
Simplified Database Restore
CNR 6.0 and Earlier Versions
CNR 6.1
Clone CNR Servers
Clone CNR Servers of the Same Version
Clone CNR Servers of Different Versions
Note on the Clone Procedures
NetPro Discussion Forums - Featured Conversations
Related Information
Introduction
Cisco Network Registrar (CNR) keeps the data in several databases. The procedures to back up and recover those databases are described in the CNR User Guides. This document provides a procedure to back up and recover all the CNR data. Use this method as an alternative to the procedures described in the User Guides. In this procedure you create a copy of the directories where the database files are kept.
Note: This procedure also backs up the lease state database. Be aware that if a client modifies the lease between when the backup is done and when the backup is restored, the lease state database is out of sync with the lease status for the client.
Prerequisites
Requirements
There are no specific requirements for this document.
Components Used
This document applies to all CNR versions and all server operating systems (OSes) on which CNR can be installed.
Note: WinZip is assumed to be installed in Windows for the instructions in this document.
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.
Simplified Database Backup
In this process you copy the database directories to a safe place on the server. For this procedure, the repository directory is named backupdir on the same server.
CNR 6.0 and Earlier Versions
UNIX and Linux
Complete these steps:
-
Stop all servers in CNR.
-
From the UNIX or Linux command-line interface (CLI), issue the /etc/init.d/aicservagt stop command.
-
In order to archive all contents of the database directories to a file called dbbackup.tar in the backup location, issue the command:
tar cvf /backupdir/dbbackup.tar /var/nwreg2/data/*
-
In order to restart the servers, issue the command:
/etc/init.d/aicservagt start
Windows
Complete these steps:
-
Stop all servers.
-
Go to a command prompt and issue the command:
net stop "AIC Server Agent 2.0"
-
In order to compress all the contents of the database directories into a file called dbbackup.zip in the backup location, from the command prompt issue the command:
zip -r "C:\backupdir\dbbackup.zip" "C:\Program files\Network Registar\data\*"
-
In order to start the servers, issue the command:
net start "AIC Server Agent 2.0"
CNR 6.1
CNR version 6.1 also copies the database directory to a backup location. However, the regional server and the local server might be installed both on the same box or on separate boxes. In these procedures, the regional server and a local server are installed on the same box. If that is not the case for you, issue only the commands that apply to the component you want to back up (regional or local server).
UNIX and Linux
Complete these steps:
-
In order to stop all servers, issue the commands:
/etc/init.d/nwreglocal stop and /etc/init.d/nwregregion stop
-
In order to archive all the local server databases to the dbbackuploc.tar file and the regional server databases to the dbbackupreg.tar file, issue the commands:
tar cvf /backupdir/dbbackuploc.tar /var/nwreg2/local/data/* and tar cvf /backupdir/dbbackupreg.tar /var/nwreg2/regional/data/*
-
In order to restart the local and regional servers after the tar operation completes, issue the commands:
/etc/init.d/nwreglocal start and /etc/init.d/nwregregion start
Windows
Complete these steps:
-
In order to stop all servers, from a command prompt issue the commands:
net stop nwregregion and net stop nwreglocal
-
In order to compress the regional server data into the dbbackupreg.zip file, issue the command:
zip -r "C:\backupdir\dbbackupreg.zip" "C:\Program files\Network Registar\Regional\data\*"
-
In order to compress the local server data into the dbbackupreg.zip file issue the command:
zip -r "C:\backupdir\dbbackuploc.zip" "C:\Program files\Network Registar\Local\data\*"
-
In order to restart the servers, issue the commands:
net start nwregregion and net start nwreglocal
Simplified Database Restore
CNR 6.0 and Earlier Versions
Complete these steps:
-
Stop the CNR servers.
-
Copy the backed-up files back to the CNR data directory:
-
UNIX or Linux—Issue the command:
tar xvf /backupdir/dbbackup.tar
-
Windows—Launch WinZip and extract the contents of the dbbackup.zip file.
-
-
Start the CNR servers.
CNR 6.1
Restore the contents of the database on the regional or local server.
-
Stop the CNR 6.1 servers.
-
Copy the backed-up files back to the CNR data directory:
-
UNIX and Linux—Issue these commands:
-
Local server data:
tar xvf /backupdir/dbbackuploc.tar
-
Regional server data:
tar xvf /backupdir/dbbackupreg.tar
-
-
Windows—Launch WinZip and extract the contents of the appropriate zip file:
-
Local server data—dbbackuploc.zip
-
Regional server data—dbbackupreg.zip
-
-
-
Start the CNR 6.1 servers.
Clone CNR Servers
This document examines two cases to clone CNR servers; that is, to build an exact copy of a current CNR server on a new machine.
Clone CNR Servers of the Same Version
In this case, there is a production server (Server A) that runs CNR and a new server (Server B) that must have the same CNR version and data as Server A. To create the clone, complete these steps:
-
On Server B, install the same CNR version as on Server A.
-
On Server A, perform the database backup explained in the Simplified Database Backup section.
-
On Server B, perform the database restore explained in the Simplified Database Restore section.
If Server A is part of a failover setup, issue the dhcp set failover-main-server= command to modify the name.
Clone CNR Servers of Different Versions
In this case, there is an existing production server (Server A) and a new server (Server B) where a newer CNR version will be installed with the same data as on Server A. In the example used in the instructions, Server A runs CNR 5.5 and Server B should run CNR 6.0. To create the clone, complete these steps:
-
On Server B, install the same CNR version as on Server A. In this example, the version to install on Server B is CNR 5.5.
-
On Server A, perform the database backup explained in the Simplified Database Backup section.
-
On Server B, perform the database restore explained in the Simplified Database Restore section.
-
On Server B, upgrade CNR from version 5.5 to version 6.0. During the upgrade, the installation program converts the database from 5.5 format to 6.0 format. When the upgrade completes, Server B runs CNR 6.0 with the same data as Server A.
Note on the Clone Procedures
You can use the clone procedures to build CNR servers on different platforms than the original servers. For example, Server A can be an HP-UX server and Server B can be a Solaris server. This works provided that the processor and OS platforms use the same byte order (that is, they are both Big Endian or Little Endian). Here is the byte order of several common operating systems:
-
Little Endian: Windows (NT4 or 2000), Linux (RedHat x86), AIX (x86)
-
Big Endian: Solaris (SPARC stations), HP-UX
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: Oct 26, 2005 | Document ID: 50120 |
