|
|
This addendum is intended for users of CiscoWorks 3.0 on SunOS who want to move to CiscoWorks 3.0 on Solaris and also want to migrate their existing SunOS CiscoWorks 3.0 to their new Solaris installation.
This addendum only explains the steps necessary to migrate your existing SunOS CiscoWorks 3.0 data to Solaris. Refer to the appropriate Solaris or CiscoWorks installation guides for instructions on installing Solaris or CiscoWorks.
The shell script on the CiscoWorks 3.0 CD can perform most of the steps described in this addendum. Each step of the migration procedure is explained below, and it is indicated if the shell-script can do the step for you.
There are four stages in migrating from SunOS CiscoWorks 3.0 to Solaris CiscoWorks 3.0:
Most of the CiscoWorks data is stored in Sybase tables, but there are also a few standard UNIX files you may wish to retain. The procedures below provide the details of stages 1 and 4 by describing how to save and restore all the CiscoWorks-created Sybase tables as well as relevant standard UNIX files.
Stages 2 and 3 are not discussed further in this addendum. If you added any user-created tables to your SunOS Sybase database (for polling data) and wish to retain that data on Solaris, follow the same steps for each user-created Sybase table as described below for the standard CiscoWorks-created Sybase tables.
To save your SunOS CiscoWorks 3.0 data, perform the following steps:
Step 1 Log into your SunOS machine as root (you must be root to save the non-Sybase data) and start a C-shell (/bin/csh) if you are not already running one. Make sure the environmental variable NMSROOT is set correctly, and that $NMSROOT/bin is at the front of your PATH environmental variable. (Refer to the CiscoWorks Installation and Reference publication.)
If you want to use the commands below exactly as shown, you need to set the environmental variable sa_password to the password of your Sybase sa account:
YOUR_PASSWORD
Otherwise, use your Sybase sa password wherever $sa_password appears below.
Step 2 Make a directory for the data files you are about to create, and change to that directory.
# mkdir /tmp/bcp_data
# cd /tmp/bcp_data
This directory needs to be in a partition large enough to hold your exported database. If there is enough room to do a Sybase "dump" command to that partition, you should be fine.
To run the commands exactly as shown below, you need to set the environmental variable saved to the directory you just created:
# setenv saved /tmp/bcp_data
Step 3 If you want to use the shell-script provided on the CiscoWorks 3.0 CD, proceed to Step 4. Otherwise, individually extract each Cisco-created database table into an external file using the bcp command, as shown below:
bcp table_name out table_name.dat -c -t "\t" -Usa -P$sa_password
table_name is the name of the table to be dumped.
To save typing the entire bcp command, you can create an alias as shown in the following example:
# alias bcp 'bcp \!^ out \!^.dat -c -t "\t" -Usa -P$sa_password'
Then use this aliased bcp command on each table as follows:
If you created any user-defined poll group tables and wish to save the data in them, repeat the bcp command for each table:
bcp polldb.nmsuper.CREATED_TABLENAME
Proceed to Step 5.
Step 4 If you do want to use the supplied shell-script to save your Sybase tables instead of typing all the commands shown in Step 3, mount your CiscoWorks 3.0 CD and copy the file /CISCOWORKS/Migrate/copy_tables into your current working directory (which should be the $saved directory you are using to hold the saved data). Refer to the CiscoWorks Installation and Reference publication for instructions on mounting and copying from the CD-ROM.
As supplied, the copy_tables script works only if you have not created any user-defined poll group tables. If you created any such tables, edit the script before running it.
If you created user-defined poll groups, but you do not want to save the data in them, edit the copy_tables script to remove the following line from the list of tables:
The list of tables looks like this:
If you have created user defined poll groups, and you do want to save the data in them, edit the copy_tables script to add a line naming each of your user-defined poll groups to the end of the list of tables, as shown below:
Make sure the copy_tables script is executable, and then run the following commands:
# chmod +x copy_tables
# ./copy_tables out $sa_password $cwd
Step 5 After saving all your Sybase tables, you can also save certain information contained in standard UNIX files. To save your CiscoConnect history, enter the following commands:
# cd $NMSROOT/lib/httpd/conf
# tar cvf $saved/cc-conf.tar *Profile.conf
# cd $NMSROOT/lib/httpd
# tar cvf $saved/cc-query.tar etc/*.dat htdocs/Cisco*/CaseQueryReply.shtml
To save your TACACS information, enter the following commands:
# cd /etc
# tar cvf $saved/tacacs.tar tac*
To migrate your crontab entries, enter the following command:
# crontab -l $saved/cronfile
To restore your saved data on the Solaris machine, perform the following steps:
Step 1 Log into your Solaris machine as root (you must be root to restore the non-Sybase data) and start a C-shell (/bin/csh) if you are not already running one. Make sure the environmental variable $NMSROOT is set correctly (default is /opt/CSCOcw). Source the $NMSROOT/etc/install.cshrc as shown below:
# source $NMSROOT/etc/install.cshrc
If you want to use the commands below exactly as shown, you need to set the environmental variable sa_password to the password of your Sybase sa account:
# setenv sa_password YOUR_PASSWORD
Otherwise, just use your Sybase sa password wherever $sa_password appears below.
Step 2 To run the commands exactly as shown below, you need to set the environmental variable saved to the directory containing your data files saved from your SunOS CiscoWorks adn then change to this directory:
# setenv saved /tmp/bcp_data
# cd $saved
Step 3 Log in to isql as sa, set the bulkcopy option, and checkpoint your database:
# isql -Usa -P$sa_password
# sp_dboption nms, "select into/bulkcopy", true
# go
# use nms
# go
# checkpoint
# go
# quit
Step 4 If you are using the copy_tables script (that is, you performed Step 4 on SunOS), proceed to Step 5. Otherwise, log into isql as sa, truncate the following standard CiscoWorks tables, and exit isql.
Now individually load each standard Cisco-created database table from its dumped file using the bcp command (note its "in" on Solaris, "out" on SunOS):
bcp table_name in table_name.dat -c -t "\t" -Usa -P$sa_password
table_name is the name of the table to be loaded.
To save typing the entire bcp command, you can create an alias as shown below (again note its "in" on Solaris, "out" on SunOS):
# alias bcp 'bcp \!^ in \!^.dat -c -t "\t" -Usa -P$sa_password'
Then use this aliased bcp command on each table as shown below:
If you chose to save any user-defined poll group tables on SunOS, you must load them into the polldb database. To do so, truncate the polldb.nmsuper.polls table by entering the following commands:
# isql -Usa -P$sa_password
# truncate table polldb.nmsuper.polls
# go
# quit
Then load the polldb.nmsuper.polls table by entering the following command:
# bcp polldb.nmsuper.polls
Next, load each of the user-created tables you dumped on SunOS by entering a bcp command:
bcp polldb.nmsuper.CREATED_TABLENAME
Proceed to Step 7.
Step 5 If you chose to use the copy_tables script on SunOS, it should now be in your $saved directory. Make sure it is still executable, and then run it using the following commands:
# chmod +x copy_tables
# ./copy_tables in $sa_password $cwd
Step 6 Log in to isql as sa and unset the bulkcopy option:
# isql -Usa -P$sa_password
# sp_dboption nms, "select into/bulkcopy", false
# go
# quit
Step 7 Restore the non-Sybase files you chose to save from SunOS. If you saved your CiscoConnect history, enter the following commands:
# cd $NMSROOT/lib/httpd/conf
# tar xvf $saved/cc-conf.tar
# cd $NMSROOT/lib/httpd
# tar xvf $saved/cc-query.tar
If you saved your TACACS information, enter the following commands:
# cd /etc
# tar xvf $saved/tacacs.tar
If saved your crontab entries, enter the following command:
# crontab $saved/cronfile
Step 8 For safety's safe, backup your new database immediately, now that you have finshed the migration.
Table 1 lists the tables moved by the copy_tables command.
| Database | Table Owner | Table Name |
|---|---|---|
| polldb | nmsuper | polls_config |
| polldb | nmsuper | tables |
| polldb | nmsuper | column |
| polldb | nmsuper | summaryinfo |
| polldb | nmsuper | grouptemplate |
| polldb | nmsuper | polls |
| polldb | nmsuper | attr |
| polldb | nmsuper | action |
| polldb | nmsuper | start_stop |
| polldb | nmsuper | pollers |
| polldb | nmsuper | msglog |
| polldb | nmsuper | filterlog |
| polldb | nmsuper | applog |
| polldb | nmsuper | ciscolog |
| polldb | nmsuper | sample |
| polldb | nmsuper | sample_error |
| polldb | nmsuper | sample_load |
| polldb | nmsuper | sample_traffic |
| polldb | nmsuper | sample_mix |
| nms | cisco_connect | cisco_connect_users |
| nms | SAnms | applications |
| nms | SAnms | app_bits |
| nms | nmsuper | auto_install |
| nms | nmsuper | sw_inventory |
| nms | SAnms | logins |
| nms | SAnms | groups |
| nms | SAnms | users |
| nms | SAnms | group_users |
| nms | SAnms | group_domains |
| nms | nmsuper | gcmds_domains |
| nms | nmsuper | gcmds |
| nms | nmsuper | domains_devices |
| nms | nmsuper | domains |
| nms | nmsuper | summaryinfo |
| nms | nmsuper | DevConfigs |
| nms | nmsuper | DevConfHist |
| nms | nmsuper | DevConFileLoc |
| nms | nmsuper | interfaces |
| nms | nmsuper | devices |
| nms | nmsuper | crons |
| nms | nmsuper | if_addresses |
| nms | nmsuper | locations |
| nms | nmsuper | admins |
| nms | nmsuper | vendors |
| nms | nmsuper | people |
| nms | nmsuper | phones |
| nms | nmsuper | contacts |
| nms | nmsuper | admin_contacts |
| nms | nmsuper | vendor_contacts |
| nms | nmsuper | line_contacts |
| nms | nmsuper | lines |
| nms | nmsuper | networks |
| nms | nmsuper | net_numbers |
| nms | nmsuper | device_types |
| nms | nmsuper | interface_types |
| nms | nmsuper | protocol_types |
| nms | nmsuper | line_types |
| nms | SAnms | permissions |
| nms | nmsuper | net_types |
| nms | nmsuper | procinfo |
| nms | nmsuper | SysFiles |
| nms | dbo | SystemEvents |
| nms | dbo | DumpDevices |
| nms | nmsuper | pccmdset |
| nms | nmsuper | pcdevset |
Cisco Information Online (CIO) is Cisco Systems' primary, real-time support channel. Maintenance customers and partners can self-register on CIO to obtain additional content and services.
Available 24 hours a day, 7 days a week, CIO provides a wealth of standard and value-added services to Cisco's customers and business partners. CIO services include product information, software updates, release notes, technical tips, the Bug Navigator, configuration notes, brochures, descriptions of service offerings, and download access to public and authorized files.
CIO serves a wide variety of users through two interfaces that are updated and enhanced simultaneously--a character-based version and a multimedia version that resides on the World Wide Web (WWW). The character-based CIO (called "CIO Classic") supports Zmodem, Kermit, Xmodem, FTP, Internet e-mail, and fax download options, and is excellent for quick access to information over lower bandwidths. The WWW version of CIO provides richly formatted documents with photographs, figures, graphics, and video, as well as hyperlinks to related information.
You can access CIO in the following ways:
http://www.cisco.com.
cio.cisco.com.
For a copy of CIO's Frequently Asked Questions (FAQ), contact cio-help@cisco.com. For additional information, contact cio-team@cisco.com.
If you are a network administrator and need personal technical assistance with a Cisco product that is under warranty or covered by a maintenance contract, contact Cisco's Technical Assistance Center (TAC) at 800 553-2447, 408 526-7209, or tac@cisco.com. To obtain general information about Cisco Systems, Cisco products, or upgrades, contact 800 553-6387, 408 526-7208, or cs-rep@cisco.com.
|
|