Document ID: 15191
Contents
Introduction
Prerequisites
Requirements
Components Used
Conventions
Before You Begin
Backing Up the CWSI Database
Restoring the CWSI Database
NetPro Discussion Forums - Featured Conversations
Related Information
Introduction
This technical tip provides instructions for backing up and restoring the CiscoWorks for Switched Internetworks (CWSI) database on the UNIX platforms, Solaris, HPUX, and AIX.
Prerequisites
Requirements
There are no specific requirements for this document.
Components Used
This document is not restricted to specific software and hardware versions.
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
Refer to Cisco Technical Tips Conventions for more information on document conventions.
Before You Begin
It is important to consider these items before you begin:
-
These procedures assume the CSCOcwsi directory is located under /opt/CSCOcwsi. If this is not the case, use the correct path.
-
These procedures assume the backup directory is /tmp/BACKUP. If this is not the case, use the correct path.
-
You must log in as the root user in order to complete the tasks in this document.
-
When you restore database files created on a different system, make sure the CWSI versions are the same. For example, a database backed up on CWSI 2.4 must be restored on CWSI 2.4.
Backing Up the CWSI Database
Complete these steps:
-
Close the CWSI program, if it runs.
-
Start an XTerm and become the root user.
-
Choose the /opt/CSCOcwsi/bin directory.
-
Run the /opt/CSCOcwsi/bin/stopcwsiserver command in order to terminate the CWSI discovery daemons.
-
Choose the /opt/CSCOcwsi/db/data directory.
-
Copy the cwsi.db file to the backup directory.
-
Copy the cwsi.log file to the backup directory.
Note: The cwsi.log file is the database transaction log, and can potentially not exist after you shut down the database. If this file does not exist, there is not a problem. Do not be concerned. But, if this file exists after you shut down the database, you must back it up.
-
Make sure these files are present in the backup directory:
-
cwsi.db
-
cwsi.log, but only if this file exists in the /opt/CSCOcwsi/db/data directory.
-
-
Run the /opt/CSCOcwsi/bin/startcwsiserver command in order to start the CWSI discovery daemons.
This image shows an example backup session.
Restoring the CWSI Database
After you have successfully backed up the CWSI, see Backing Up the CWSI Database, complete these steps in order to restore the database on the same system or another CW2000 system:
Note: When you restore database files created on a different system, make sure the CWSI versions are the same. For example, a database backed up on CWSI 2.4 must be restored on CWSI 2.4.
-
Close the CWSI program, if it runs.
-
Start an XTerm and become the root user.
-
Make sure these files are present in the backup directory:
-
cwsi.db
-
cwsi.log, but only if the file is backed up
Note: The cwsi.log file is the database transaction log, and can potentially not exist after you shut down the database. If this file does not exist, there is not a problem. Do not be concerned. But, if this file exists after you shut down the database, you must back it up.
-
-
Change to the directory /opt/CSCOcwsi/bin directory.
-
Run the ./stopcwsiserver command in order to stop the CWSI discovery daemons.
-
Change to the /opt/CSCOcwsi/db/data directory.
-
Remove the current cwsi.db file:
rm /opt/CSCOcwsi/db/data/cwsi.db
-
Remove the current cwsi.log file, if it exists:
rm /opt/CSCOcwsi/db/data/cwsi.log
-
Copy the file cwsi.db from the backup directory to the current directory:
cp /tmp/BACKUP/cwsi.db /opt/CSCOcwsi/db/data
-
Copy the file cwsi.log, if it was backed up, from the backup directory to the current directory:
cp /tmp/BACKUP/cwsi.log /opt/CSCOcwsi/db/data
-
Change the ownership of the cwsi.db file to the user bin and group bin.
-
Change the ownership of the cwsi.log file, if it exists, to the user bin and group bin.
-
Change the file permissions of the cwsi.db file:
chmod 400 /opt/CSCOcwsi/db/data/cwsi.db
Note: If cwsi.log was also backed up, because it existed originally, you must change both the database and log file permissions to 600:
chmod 600 /opt/CSCOcwsi/db/data/cwsi.db
-
Change the file permissions of the cwsi.log file:
chmod 400 /opt/CSCOcwsi/db/data/cwsi.log
Note: If cwsi.log was also backed up, because it existed originally, you must change both the database and log file permissions to 600:
chmod 600 /opt/CSCOcwsi/db/data/cwsi.log
-
Run the /opt/CSCOcwsi/bin/startcwsiserver command in order to start the CWSI discovery daemons.
-
The restored backup database is now be available.
This image shows an example backup restore session.
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 13, 2005 | Document ID: 15191 |
