How to migrate the Spectrum MIB Tools database from one OneClick system to another
search cancel

How to migrate the Spectrum MIB Tools database from one OneClick system to another

book

Article ID: 57339

calendar_today

Updated On:

Products

Spectrum Network Observability

Issue/Introduction

You have just installed a new OneClick server in an existing Distributed SpectroSERVER environment. On the existing OneClick servers, you have imported several mibs into the MIB Tools database. The follow are the instructions to migrate the MIB Tools database from the existing OneClick server into the new OneClick server without having to import each individual mib separately.

Environment

Release: All Supported Releases
Component: SPCAPP - Spectrum Applications

Resolution

When a mib is imported into MIB Tools, a copy of the mib file imported is saved to the $SPECROOT/MibDatabase directory on the OneClick server. The follow are the instructions to migrate the MIB Tools database from the existing OneClick server into the new OneClick server without having to import each individual mib separately.

A) If the OneClick is the same version:

1. Copy the contents of the entire $SPECROOT/MibDatabase directory from the existing OneClick server into the $SPECROOT/MibDatabase directory of the new OneClick server

2. Log into the OneClick system as the user that owns the Spectrum installation

3. On Windows, start a bash shell by running "bash -login"

4. cd to the $SPECROOT/MibDatabase/scripts directory

5. Enter the following command to initialize the MIB Tools database:

./BulkMibCompile.sh -uroot -p<password> -init 

6. Enter the following command, where <SPECROOT> is the Spectrum root directory,to rebuild the MIB Tools database from scratch which will use the mib files from the $SPECROOT/MibDatabase directory:

./BulkMibCompile.sh -d <SPECROOT>/MibDatabase --skip_search 

For example, if your Spectrum root directory is /app/spectrum the command would be as follows:

./BulkMibCompile.sh -d /app/spectrum/MibDatabase --skip_search

NOTE: The above command will take a while to run.  Please do not close or exit the shell until it has completed.

When completed, the MIB Tools database on the new OneClick system will be the same as the one on the existing OneClick system.


B) If you are migrating from an older version you can just bring over the user uploaded MIB files:

1. Copy the contents of the entire $SPECROOT/MibDatabase/userContrib directory from the existing OneClick server into a temporary directory (e.g. /tmp/userContrib) on the new OneClick server

2. Log into the OneClick system as the user that owns the Spectrum installation

3. On Windows, start a bash shell by running "bash -login"

4. cd to the $SPECROOT/MibDatabase/scripts directory

5. Enter the following command, where <tmpdir> is the directory created in step 1:

./BulkMibCompile.sh -d <tmpdir> --skip_search 

For example, if your directory is /tmp/userContrib the command would be as follows:

./BulkMibCompile.sh -d /tmp/userContrib --skip_search




Additional Information

Please reference the "Import and Export MIBs" section of the Spectrum documentation for more information 

NOTE: Should the script fail with the following error:

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space 

Edit the BulkMibCompile.sh file. Look for the memory setting of "-Xmx512m" and change it to "-Xmx1024m". Then rerun the above steps.