Cisco PVM User Guide
Database Archiving

Table Of Contents

Database Archiving

Archiving

Command Syntax

Enabling Archiving

Disabling Archiving

Importing Archived Data

Import Process

Import Procedure


Database Archiving


Cisco PVM offers an advanced archive utility that includes options to archive configuration tables from either or both the OLTP and OLAP databases. Using the appropriate switches in the archive command, you can set archiving for information such as NAMs imported, Data Source Groups created, and historical data. You can enable and disable archiving; purging of data from the system is always enabled.

This appendix contains the following sections:

Archiving

Importing Archived Data


Note The information in this appendix applies to Cisco PVM Administrators and DBAs only.


Archiving

You can start and stop database archiving in Cisco PVM using the CLI.

This section contains the following topics:

Command Syntax

Enabling Archiving

Disabling Archiving

Command Syntax

The archive command uses the following syntax:

archive -p password [-f location] [-I] [-[{H | T}]C] {start | stop}

In this notation, entries in brackets ([]) are optional, entries within braces ({}) are mandatory with choices, and vertical bars (|) are used to separate choices.

The various switches configure the archive process as described in Table C-1.

Table C-1 Archive Command Switches 

Switch
Description
Required

p

Specify the password of the user.

Yes

f

Specify the location of the archived file.

Optional

I

Perform archive immediately instead of scheduling it as a cron job.

Note The cron job runs daily at 3:00 am.

Optional

H

Consider historical data.

Optional

T

Consider transaction data.

Optional

C

Archive the configuration table only for OLAP or OLTP.

Optional

start

Enable archiving.

Yes

stop

Disable archiving.

Yes


Table C-2 describes how you might use the switches to archive different types of data.

Table C-2 Switch Usage Examples

To archive the...
Use the switch...

Imported NAM configuration

-TC

Historical (OLAP) configuration

-HC

Transaction and historical configuration

-C



Note Ignoring the -C switch implies archiving of all data including configuration tables.


Enabling Archiving

The steps in the following example assume that you are user "tadwop" and that you want to archive historical data to the tmp directory immediately.


Step 1 In the CLI, enter the command:

archive -p tadwop -f tmp -I -HC start

Step 2 Import the archived data following the procedure in Importing Archived Data.


Disabling Archiving

The steps in the following example assume that you are user "tadwop" and that you want all archive processes to stop.


Step 1 In the CLI, enter the command:

archive -p tadwop stop

The system will no longer run cron jobs to archive any data or configuration tables.

Step 2 Import the archived data following the procedure in Importing Archived Data.


Importing Archived Data

DBAs can retrieve data from archived files under the following circumstances:

The database is fresh and the archive of the configuration is available.

A copy of the configuration from one PVM database must be restored to another PVM server.


Note The Cisco PVM import script applies to configuration data only; statistical data is not imported.


This section contains the following topics:

Import Process

Import Procedure

Import Process

Retrieving archived configuration data involves unzipping the archive and importing each file into the desired directory using the Oracle user ID. Depending on the archive type, you might need to import one or more files.

The command to unzip the archive uses the following syntax:

gunzip -c archive_filename|cpio -icvB "*[switch]*"

where the archive switch is the type of archive you want to retrieve (optional).

The command to import the file(s) uses the following syntax:

imp cnam@{cnam | spdw} file=/directory/filename ignore=y full=y

where:

cnam is used for transaction archives

spdw is used for historical arhives

the directory is the location used for the original backup

the filename is from the unzipped list of files containing .dmp extensions

Import Procedure

Perform the following steps to retrieve archived PVM data. The example shown imports configuration data from OLTP.


Step 1 Identify the compressed archive file from which the configuration needs restoration. For example, the required filename is archive5.dmp.gz and you want to extract the OLTP configuration table.

Step 2 From the CLI, enter the following command to get the required file:

gunzip -c archive5.dmp.gz|cpio -icvB "*TC*"

The appropriate archived configuration file (transaction in this example) is created in the folder from which it was originally backed up, such as /tmp/olap06032TC_0603031141.dmp.

Step 3 Enter the following command to import the configuration file into the PVM OLTPdatabase:

imp cnam@cnam file=/tmp/olap06032TC_0603031141.dmp ignore=y full=y


Note Depending on the compressed file you unzipped, you may see more than one file that requires importation. For example, to import archived configuration data into the PVM OLAP database, you would enter the following command:


imp cnam@spdw file=/tmp/olap06032HC_0603031141.dmp ignore=y full=y