Table Of Contents
Backing Up and Restoring Cisco Transport Manager Release 5.0 Data
What's New or Changed in This Guide
Overview of the Oracle Logical Backup
Performing a Logical Backup (Export)
Restoring with a Logical Backup (Import)
Backing Up the CTM File System
Contents of the ctm_fs_restore.sh Script
Contents of the ctm_fs_backup.sh Script
Backing Up and Restoring the CTM Database
Obtaining Documentation, Obtaining Support, and Security Guidelines
Backing Up and Restoring Cisco Transport Manager Release 5.0 Data
This document describes how to back up and restore Cisco Transport Manager (CTM) Release 5.0 data and how to use basic Oracle backup and recovery tools. This document also explains the structure of /opt/CiscoTransportManagerServer, a directory that is created automatically when you install CTM R5.0.
Contents
This document describes the following topics:
•
What's New or Changed in This Guide
•
Overview of the Oracle Logical Backup
•
Backing Up the CTM File System
•
Backing Up and Restoring the CTM Database
•
Obtaining Documentation, Obtaining Support, and Security Guidelines
Introduction
Cisco Transport Manager is an advanced management system that provides functionality at the element and network management levels for Cisco network elements (NEs) and devices. CTM supports fault, configuration, performance, and security management functional areas. CTM also serves as a foundation for integration into a larger overall operations support system (OSS) environment by providing northbound gateway interfaces to higher layer management systems.
Beginning with Release 5.0, the expanded CTM charter includes not only management of the Cisco Optical Networking System (ONS) family of optical NEs, but also Cisco routers and switches. As the first example of this expanded charter, CTM R5.0 introduces support for Cisco Carrier Routing System 1 (CRS-1). Subsequent CTM releases will extend support to additional Cisco routers and switches and continue support for the Cisco ONS family.
CTM uses an Oracle database. It is recommended that you protect your data by backing it up regularly. Backups can be stored on a local or network-mounted, disk-based file system; on a local tape drive; or on a remote tape drive.
Commercially available tools for Oracle and system-level backup include:
•
Legato Networker (or "Solstice Backup" when purchased from Sun Microsystems)
•
VERITAS NetBackup
•
BMC Software SQL Backtrack
•
GNU Oraback.sh
CautionWhenever a backup or restore is done, it must include both the database and all other CTM directories of the same instance.
What's New or Changed in This Guide
Table 1 describes information that has been added or changed since Backing Up and Restoring Cisco Transport Manager Release 5.0 Data was last published online.
Table 1 New and Changed Information in This Guide
Date Released Description Page/LocationMarch 11, 2005
Modified the procedure "Restoring with a Logical Backup (Import)."
Overview of the Oracle Logical Backup
It is recommended to back up the Oracle database using a logical backup. A logical backup involves reading a set of database records and writing them to a file. These records are read independently of their physical location. Oracle uses the Export (exp) and Import (imp) utilities to perform a logical database backup.
A logical backup has the following advantages:
•
Checks for corrupted data blocks and verifies database consistency
•
Eliminates database fragmentation
•
Allows incremental export and import to store only tables that have changed since the last export
•
Is portable to another machine or database
A logical backup has the following disadvantages:
•
Cannot recover transactions
•
Takes longer than a physical backup
•
Lacks referential integrity (export is done one table at a time)
Export
The Oracle Export utility reads the database, including the data dictionary, and writes the output to a binary file called an export dump file. The created file contains all of the commands necessary to recreate the selected database objects.
The Oracle Export utility permits three types of exports:
•
Complete—A full database export including the data dictionary for all tables
•
Incremental—Includes all of the tables that have changed since the last full export
•
Cumulative—Includes all of the tables that have changed since the last full cumulative or the last full export
Note
Exporting directly to a Network File System (NFS)-mounted file system is not recommended due to the unusually large amount of data transfer required. The export dump file can be moved to an NFS-mounted system after exporting to a local file system.
Tip
Save the export dump file on a file system independent from the one used by the CTM database.
Performing a Logical Backup (Export)
This procedure describes how to perform a full export of the entire database.
Note
The export command is located in the /oraclesw9i/product/9.2/bin/ directory.
Step 1
Enter the following commands:
# su - oracle% echo $ORACLE_SID
Note
Verify that the value of the ORACLE_SID environment variable matches the system identifier (SID) of the database instance to export. During CTM installation, the default SID for CTM R5.0 is CTM5_0. If the SID is changed during CTM installation, the new SID becomes the default SID of the system.
Step 2
Enter the following command to begin the export:
% exp system/manager file = <export_filename> full = y buffer = 1000000 statistics = none log = exp.log
Import
The Oracle Import utility reads the binary export dump file created by the Export utility and executes the embedded commands.
Note
The import command is located in the /oraclesw9i/product/9.2/bin/ directory.
The exported data does not need to be imported to the same database used to generate it. Also, it is not required that you import all the exported data. Upon a full import, the Oracle Import utility creates all the database objects, including tablespaces, data files, and users.
Restoring with a Logical Backup (Import)
This procedure assumes that the CTM database has been created already using the CTM installer.
Note
See Cisco Transport Manager Release 5.0 Installation Guide to create a CTM database, if one does not exist already.
Step 1
Insert the CTM Server Disk 1 installation CD.
Step 2
Disconnect all the CTM clients and enter the following command to shut down the CTM server, if it running:
ctms-stopStep 3
Enter the following commands to drop the ctmanager schema and recreate the ctmanager user:
% sqlplus /nologSQL> connect /as sysdbaSQL> drop user ctmanager cascade;SQL> @/cdrom/cdrom0/ctms/create_user.sqlSQL> exitStep 4
Enter the following command to import the ctmanager schema:
% imp system/manager file=<export_filename> fromuser=ctmanager touser=ctmanager commit=yignore=y buffer=1000000 log=ctm-imp.logStep 5
Enter the following commands to recompile all invalid database objects:
% cd $ORACLE_HOME/rdbms/admin% sqlplus /nologSQL> connect /as sysdbaSQL> @utlrp.sqlSQL> exit
Backing Up the CTM File System
The ctm_fs_backup.sh backup script prompts you for a target location (directory or tape device) and archives the files required for a full recovery. If the target is a directory, the files are archived in <directory>/CTM_BACKUP_<date>.tar.
Enter the following command to run the script:
ctm_fs_backup {<target_dir> | <tape_drive>}
Note
If you are using ARCHIVELOG mode, you can use the CTM backup feature (see Backing Up and Restoring the CTM Database), which backs up the database and the following files automatically.
The ctm_fs_backup.sh script backs up the following files and directories:
•
/opt/CiscoTransportManagerServer/USER.DAT
•
/opt/CiscoTransportManagerServer/admin/
•
/opt/CiscoTransportManagerServer/cfg/
•
/opt/CiscoTransportManagerServer/cms/
•
/opt/CiscoTransportManagerServer/dbinit.log
•
/opt/CiscoTransportManagerServer/Images/
•
/opt/CiscoTransportManagerServer/install.idb
•
/opt/CiscoTransportManagerServer/install.log
•
/opt/CiscoTransportManagerServer/license.txt
•
/opt/CiscoTransportManagerServer/log/
•
/oraclesw9i/.cshrc
•
/oraclesw9i/admin/Oracle_SID
•
/oraclesw9i/product/9.2/network/admin/
•
/tftpboot/ems/
•
/var/opt/oracle/oratab
The ctm_fs_restore.sh restore script prompts you for the location of the recovery archive and restores the archived CTM files to their correct location.
Contents of the ctm_fs_restore.sh Script
Note
You must create the ctm_fs_restore.sh script manually. This script is not supplied with CTM by default.
#!/bin/kshif [[ $1 = "" ]]; thenecho 'Usage: ctm_fs_restore.ksh _source_file_ | _tape_device_'exitfitar -xvf $1Contents of the ctm_fs_backup.sh Script
Note
You must create the ctm_fs_backup.sh script manually. This script is not supplied with CTM by default.
#!/bin/kshif [[ $1 = "" ]]; thenecho 'Usage: ctm_fs_backup _target_dir_ | _tape_device_'exitfifunction file_list{cat <<!/opt/CiscoTransportManagerServer/USER.DAT/opt/CiscoTransportManagerServer/admin/opt/CiscoTransportManagerServer/cfg/opt/CiscoTransportManagerServer/cms/opt/CiscoTransportManagerServer/dbinit.log/opt/CiscoTransportManagerServer/images/opt/CiscoTransportManagerServer/install.idb/opt/CiscoTransportManagerServer/install.log/opt/CiscoTransportManagerServer/license.txt/opt/CiscoTransportManagerServer/log/oraclesw9i/.cshrc/oraclesw9i/admin/Oracle_SID/oraclesw9i/product/9.2/network/admin/tftpboot/ems/var/opt/oracle/oratab!}if [[ `echo $1|awk -F/ '{ print $3 }'` = rmt ]]; thenecho "Archiving to TAPE device: $1"tar -cvf $1 `file_list`elseBACKUP_FILE="$1/CTM_BACKUP_`date |tr ' ' '_'`.tar"echo "Archiving to File: $BACKUP_FILE"tar -cvf $BACKUP_FILE `file_list`fiBacking Up and Restoring the CTM Database
To back up the CTM database:
Step 1
In the CTM client Domain Explorer window, choose Administration > Control Panel.
Step 2
In the Control Panel window, click Database Properties to open the Database Properties pane.
Step 3
In the Database Properties pane, click the Database Backup tab.
Step 4
Enter the sys Oracle user password. The password is change_on_install.
Step 5
Click Start.
Note
The database backup files are stored in /CTM_backup. The backup log files can be viewed at oraclesw9i/admin/CTM5_0/udump/backup_db.log.
To restore the database:
CautionDo not restore the database unless it is corrupted and inaccessible. If your database is inaccessible, your CTM server will not be running. The restore will overwrite the existing data files and restore the database from the backup files.
Step 1
If the CTM server is running, log into it as the root user and enter the following command to shut it down:
ctms-abortStep 2
Log into the database server and enter the following commands:
cd /opt/CiscoTransportManagerServer/bin./restore_db.sh /ctm_backup /tmp
Note
The restore log file can be viewed at /tmp/restore_db.log
Step 3
Log into the CTM server as the root user and enter the following command to start the server:
ctms-startStep 4
Start your CTM client.
Characterizing Performance
Table 2 characterizes the amount of time required to perform common backup and restore tasks for small, medium, and large networks.
Note
Import and export times are estimates and can vary depending on the Oracle load, state, and configuration.
Obtaining Documentation, Obtaining Support, and Security Guidelines
For information on obtaining documentation, obtaining support, providing documentation feedback, security guidelines, and also recommended aliases and general Cisco documents, see the monthly What's New in Cisco Product Documentation, which also lists all new and revised Cisco technical documentation, at:
http://www.cisco.com/en/US/docs/general/whatsnew/whatsnew.html
Copyright © 2005 Cisco Systems, Inc. All rights reserved.




