Topics| Related Topics
Besides running data protection and data recovery operations from the CommCell Console, you can use the third-party command line to run such operations for the following Agents:
Moreover, such operations for the SAP for Oracle and SAP for MAXDB iDataAgents can currently be run only from the third-party command line.
Be sure to consult the documentation for your product for information on running third-party command line operations.
Generally, the various CommServe job-reporting windows and job reports (including, e.g., Job Manager, Job Controller, Backup Job History report) provide details for third-party command line operations that are similar to those details provided for such operations run from the CommCell Console. The following section provides some exceptions in this regard.
Consider the following while executing third party commands:
You can perform backup and restore jobs from DB2 command line. For detailed information, see:
For DB2 DPF, the following options are available:
db2_all ";db2 update db cfg for <database name> using <parameter name> recovery"
where <database name> is the name of the DB2 database (e.g., pubs); <parameter name> is the name of the DB2 configuration parameter (e.g., logretain).
To set a configuration parameter for a specific database for a series of nodes but one node at a time, run the following series of commands for each node:
export DB2NODE=<node>
db2 terminate
db2 update db cfg for <database name> using <parameter name> recovery
where <node> is the number of the node. For example:
export DB2NODE=0
db2 terminate
db2 update db cfg for pubs using logretain recovery
export DB2NODE=1
db2 terminate
db2 update db cfg for pubs using logretain recovery
db2_all "<<+<node number>< db2 update db cfg for pubs using logretain recovery
db2_all "<<+<node number>< db2 backup db pubs
db2_all "<<+<node number>< db2 backup db pubs load <software install path>/Base/libDb2Sbt.so
where <node number> is the number of the node; <software install path> is the install path for the agent software. For example:
db2_all "<<+0< db2 backup db pubs load /database/level1/Base/libDb2Sbt.so
To perform an action (e.g., backup) on all the nodes expect one node (e.g., 0), you can run commands similar to the following:
db2_all "|<<-0< db2 backup db pubs
db2_all "|<<-0< db2 backup db pubs load /database/level1/Base/libDb2Sbt.so
db2_all "<<+0< db2 restore db pubs02 load /database/level1/Base/libDb2Sbt.so taken at 20080408165002 without prompting"
db2_all "<<+1< db2 restore db pubs02 load /database/level1/Base/libDb2Sbt.so taken at 20080408165107 without prompting"
db2_all "<<+2< db2 restore db pubs02 load /database/level1/Base/libDb2Sbt.so taken at 20080408164536 without prompting"
db2_all "<<+3< db2 restore db pubs02 load /database/level1/Base/libDb2Sbt.so taken at 20080408164559 without prompting"
Then run the following commands:
export DB2NODE=0
db2 terminate
Finally, run the roll-forward operation. For example:
db2 rollforward db to end of logs and stop pubs02
The trailing status will display details on the roll-forward operation for the four identified nodes.
export DB2NODE=0
db2 recover db pubs 02
The trailing status in this case will display details on the recover operation for the same four nodes identified in the roll-forward operation.
export DB2NODE=0
db2 terminate
Then run the restore for the node. For example:
db2 restore db pubs01 load <software install path>/Base/libDb2Sbt.so taken at 20080701073606 into pubs02 without prompting
Continuing with the next node, run the following commands:
export DB2NODE=1
db2 terminate
Then run the restore for the node. For example:
db2 restore db pubs01 load <software install path>/Base/libDb2Sbt.so taken at 2008070107353 into pubs02 without prompting
Continue this sequence for each node.
If you need to roll-forward the database, be sure to first set for each node the CvSrcDbName option for the LOGARCHOPT1 parameter to the source database name. For example, starting with the first node, run the following commands:
export DB2NODE=0
db2 terminate
db2 update db cfg for pubs02 using LOGARCHOPT1 "'CvSrcDbName=pubs01,CvClientName=<client name>,CvInstanceName=<CommServe instance name>, CvDpfClientName=<DPF Pseudo-Client Name>"'
Continuing with the next node, run the following commands:
export DB2NODE=1
db2 terminate
db2 update db cfg for pubs02 using LOGARCHOPT1 "'CvSrcDbName=pubs01,CvClientName=<client name>,CvInstanceName=<instance name>, CvDpfClientName=<DPF Pseudo-Client Name>"'
Continue this sequence for each node.
Then run the appropriate roll-forward command. For example:
db2 rollforward db pubs02 to end of logs and stop
Before running a restore to a different DB2
DPF pseudo-client, ensure the following:
|
For each node, before you run the restore, be sure to first set two options for the VENDOROPT parameter. Specifically, set the CvSrcDB2Instance Name option to the source DB2 instance name, and set the CvSrcClientInstanceName option to the source DB2 DPF pseudo-client name. For example:
export DB2NODE=0
db2 terminate
db2 update db cfg for emp using VENDOROPT "'CvSrcDB2InstanceName=db2inst1,CvSrcClientName=DPF_INST1,CvClientName=supernova,CvInstanceName=Instance001,CvDpfClientName=DPF_INST2"'
Continuing with the next node, run the following commands:
export DB2NODE=1
db2 terminate
db2 update db cfg for emp using VENDOROPT "'CvSrcDB2InstanceName=db2inst1,CvSrcClientName=DPF_INST1,CvClientName=supernova,CvInstanceName=Instance001,CvDpfClientName=DPF_INST2"'
Continue this sequence for each node.
Then run a restore for each node. For example, starting with the first node:
export DB2NODE=0
db2 terminate
db2 restore db pubs01 load /opt/product/Base/libDb2Sbt.so taken at 20080701073606 on /db2home1/db2inst2 into emp without prompting
For this command, the destination path option (on /db2home1/db2inst2 in this example) will work only for the catalog node since the restore operation on a non-catalog database partition cannot specify automatic storage paths. Also, ensure that you provide a destination path when you run this command to produce the correct result. In this example, if on /db2home1/db2inst2 is not provided, the data will be restored to /db2home1/db2inst1/db2inst2. |
Continuing with the next node, run the following commands:
export DB2NODE=1
db2 terminate
db2 restore db pubs01 load /opt/product/Base/libDb2Sbt.so taken at 20080701073653 into emp without prompting
Continue this sequence for each node.
If you need to roll-forward the database, be sure to first set for each node several options for the LOGARCHOPT1 parameter. Specifically, set the CvSrcClientName option to the source pseudo-client name, the CvSrcDB2InstanceName option to the source instance name, and the CvSrcDbName option to the source database name. For example:
export DB2NODE=0
db2 terminate
db2 update db cfg for emp using LOGARCHOPT1 "'CvSrcDbName=pubs01,CvSrcDB2InstanceName=db2inst1,CvSrcClientName=DPF_INST1,CvClientName=supernova,CvInstanceName=Instance001, CvDpfClientName=DPF_INST2"'
Continuing with the next node, run the following commands:
export DB2NODE=1
db2 terminate
db2 update db cfg for emp using LOGARCHOPT1 "'CvSrcDbName=pubs01,CvSrcDB2InstanceName=db2inst1,CvSrcClientName=DPF_INST1,CvClientName=supernova,CvInstanceName=Instance001, CvDpfClientName=DPF_INST2"'
Continue this sequence for each node.
Then run the appropriate roll-forward command. For example:
db2 rollforward db emp to end of logs and stop
You can restore DB2 DPF database individually to each node using the corresponding backup images.
1. | From the DB2 command line prompt, run the restore command for each individual node. |
For example, if there are 4 DB2 DPF nodes, run the command as follows:
|
2. | Roll forward the database at the catalog node (node 0). |
For example, Export DB2NODE=0 db2 terminate db2 rollforward db sample to end of logs and stop |
export CvClientName=Client1
export CvInstanceName=Instance
where Client1 is the name of the Informix client and Instance001 is the name of the instance.
You can perform a cross platform/ cross server restores using onbar. However, the source and destination Informix servers must have the same db spaces name and paths. Ensure that the source and destination Informix servers are configured within the same CommServe.
Follow the steps given below to perform a cross platform/cross server restore:
1. | On the source computer, as an Informix user, type the command at the Command Prompt to note the Informix Dbspaces name and Dbspaces pathname. | onstat –d |
2. | On the destination computer, as an Informix user, type the command at the Command Prompt to note the Informix Dbspaces name and Dbspaces pathname. | onstat –d |
3. | On the destination computer, if the Informix Server is not installed, install the Informix server, but do not configure the Informix instance. | |
4. | Create a simple instance on the destination host | |
5. | On the destination host, start up the instance and then type the command at the Command Prompt to shut down the instance. | onmode –yuk |
6. |
Make sure to include the following information in the source Informix
user profile:
|
Example: Instance001 test01 |
7. |
Make sure to include the following information in the destination
Informix user profile:
|
Example: Instance002 test02 INFSERVER02 |
8. | Perform a full backup of source Informix server including emergency boot file (ixbar) file and ONCONFIG file | |
9. | Copy the emergency boot file (ixbar) and ONCONFIG file manually from source Informix server machine to destination Informix server in INFORMIXDIR/etc directory. | cp ixbar.$servernum to ixbar.$servernum.org onconfig.$servername to onconfig.$servername.org oncfg_$servername.$servernum to oncfg_$servername.$servernum .org |
10. | In the destination Informix server, rename the emergency boot file (ixbar) with the destination database server number. You can check parameter (SERVERNUM) in destination Informix server ONCONFIG file. |
For Example:
Rename from ixbar.0 to ixbar.1 (if Destination Informix Server number is 1) |
11. | In the destination Informix server, update the DBSERVERNAME and SERVERNUM parameters with the Destination Informix Server name and number in ONCONFIG file | |
12. | Use the command to stop the destination Informix server | onmode –yuk |
13. | Type the following command to restore the Informix server on the destination computer. | onbar –r |
14. | After a successful Cross Informix Server Restore, delete emergency boot file (ixbar) in Destination Informix server. | |
15. | Perform a full backup of destination Informix server either using a CommCell Browser or onbar command line utility. |
Perform the following validations to rename the db spaces during a cold restore using ON–Bar command line utility:
If either of the above steps fail, the renaming process stops and ON–Bar writes an error message to the ON–Bar activity log. Provide the old dbspace location and the new db space location either at the command line or in a file to rename a db space. The following table lists example values for two db spaces:
Element | Value for First db space | Value for second db space |
Old Path | /dbspace1_Old | /dbspace2_Old |
Old offset | 0 | 10000 |
new path | /dbspace1_New | /dbspace2_New |
new offset | 20000 |
1. | At the Command Prompt, type the following command to rename the chunks. | onbar -r -rename -p /dbspace1_Old -o 0 -n /dbspace1_New -o 20000 onbar -r -rename -p /dbspace2_Old -o 0 -n /dbspace2_New -o 20000 |
2. | After a renaming and restoring operation, perform a level-0 backup. |
1. |
At the Command Prompt, type the following command to rename
the db spaces by supplying a file named listfile.
ListFile contains the following information: /dbspace1_Old 0 /dbspace1_New 20000 /dbspace2_Old 10000 /dbspace2_New 0 |
onbar -r -rename -f listfile |
2. | After a renaming and restoring operation, perform a level-0 backup. |
1. |
At the Command Prompt, type the following command to rename
the db spaces while performing a physical restore on
dbspace1 and dbspace2, where rootdbs is the name of the
rootdbs. Alternatively, type the following command to rename the db spaces using file while performing a physical restore on dbspace1 and dbspace2. |
onbar -r -rename -p /chunk1 -o 0 -n /chunk1N -o
20000 -p rootdbs dbspace1 dbspace2
onbar -r -rename -f listfile -p rootdbs dbspace1 dbspace2 |
2. | After a renaming and restoring operation, perform a level-0 backup. |
You can perform backup and restore operations from RMAN command line.
You can also perform backup and restore operations for Oracle RAC iDataAgent from the RMAN command line.
Third-party command line operations can produce unique output based on the associated Agent. Relevant issues are summarized in the following table.
iDataAgent(s) | Issue |
SAP for Oracle SAP for MAXDB |
Job Details may display the name defaultDummyInstanceFor<agent_name> as the SID when a restore is run from the command line. |
Informix | Whenever you run incremental backups from the third-party command line, the backups are reported as full backups in the Job Controller, Event Details dialog, and Backup Job History window and report. This is only a display issue; the backup jobs still run as incremental backups. |
Informix | Whenever you run backups from the third-party command line, the Job Manager starts one job for the data backup and another job for the log backup and then displays these jobs in the Job Controller. However, for backups that are run from the CommCell Console, the Job Manager correctly starts just one job for both the data phase and log phase and displays this job in the Job Controller. |