Guest

CiscoWorks Campus Manager

Backing Up and Restoring the CWSI Database on UNIX

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:

  1. Close the CWSI program, if it runs.

  2. Start an XTerm and become the root user.

  3. Choose the /opt/CSCOcwsi/bin directory.

  4. Run the /opt/CSCOcwsi/bin/stopcwsiserver command in order to terminate the CWSI discovery daemons.

  5. Choose the /opt/CSCOcwsi/db/data directory.

  6. Copy the cwsi.db file to the backup directory.

  7. 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.

  8. 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.

  9. Run the /opt/CSCOcwsi/bin/startcwsiserver command in order to start the CWSI discovery daemons.

    This image shows an example backup session.

    45a.gif

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.

  1. Close the CWSI program, if it runs.

  2. Start an XTerm and become the root user.

  3. 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.

  4. Change to the directory /opt/CSCOcwsi/bin directory.

  5. Run the ./stopcwsiserver command in order to stop the CWSI discovery daemons.

  6. Change to the /opt/CSCOcwsi/db/data directory.

  7. Remove the current cwsi.db file:

    rm /opt/CSCOcwsi/db/data/cwsi.db
    
  8. Remove the current cwsi.log file, if it exists:

    rm /opt/CSCOcwsi/db/data/cwsi.log
    
  9. Copy the file cwsi.db from the backup directory to the current directory:

    cp /tmp/BACKUP/cwsi.db /opt/CSCOcwsi/db/data
    
  10. 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
    
  11. Change the ownership of the cwsi.db file to the user bin and group bin.

  12. Change the ownership of the cwsi.log file, if it exists, to the user bin and group bin.

  13. 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
    
    
  14. 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
    
  15. Run the /opt/CSCOcwsi/bin/startcwsiserver command in order to start the CWSI discovery daemons.

  16. The restored backup database is now be available.

    This image shows an example backup restore session.

    45b.gif

NetPro Discussion Forums - Featured Conversations

Networking Professionals Connection is a forum for networking professionals to share questions, suggestions, and information about networking solutions, products, and technologies. The featured links are some of the most recent conversations available in this technology.
NetPro Discussion Forums - Featured Conversations for Network Management
Network Infrastructure: Network Management
Virtual Private Networks: Network and Policy Management

Related Information



Updated: Oct 13, 2005Document ID: 15191