Adding DB2 Subclients Using the Commvault Command Line Interface

Use XML to create DB2 subclients. Run the operation from the command line, or automate configuration by combining command line operations in a script.

The XML parameters can be included in the XML file, or specified on the command line when they frequently change. For more information on command line parameters and XML elements, see Command Line - Syntax.

Procedure

  1. On the DB2 Agent host, run the qlogin command to log on to the CommServe computer.

  2. Download the CreateSubclient.xml file to the computer where you will run the command.

  3. Open the CreateSubclient.xml file, add your specific parameters and save the file.

    For information on supported subclient XML parameters, see Available XML Parameters for DB2 Subclient Configuration.

  4. On the command line, go to Software_Installation_Directory/Base and type the following command.

    UNIX

    qoperation execute -af CreateSubclient.xml -appName 'DB2 on Unix' -clientName 'client1' -instanceName DB2 instance name -backupsetName 'backupset_name' -subclientName 'subclient_name' -storagePolicyName 'SP name'

    Windows

    qoperation execute -af CreateSubclient.xml -appName 'DB2' -clientName 'client1' -instanceName 'DB2 instance name' -backupsetName 'backupset_name' -subclientName 'subclient_name' -storagePolicyName 'SP name'

  5. Run the qlogout command to log off the CommServe computer.

Examples

Adding a Subclient for a DB2 UNIX Configuration

To add a subclient, set the following parameters:

Parameter

Value

instanceName

The instance name. In this example, 'db2inst7'.

clientName

The DB2 client name. In this example, 'my_machine'.

appName

In this example, 'DB2 on Unix'.

backupSetName

The backup set name. In this example, 'TESTDB'.

subclientName

The subclient name. In this example, 'test_subclient'.

storagePolicyName

The storage policy to use for backups. In this example, 'SP1'.

enableBackupstorag

In this example, 'true'.

Db2DefaultIndexSP/storagePolicyName

The default storage policy. In this example, 'DB2Data'.

db2BackupMode

The backup mode. In this example, 'ONLINE_BACKUP'.

db2BackupData

Back up the data. In this example, 'true'.

db2BackupType

In this example, 'ENTIRE_DATABASE'

db2BackupLogFiles

Back up the logs. In this example, 'true'.

db2DeleteLogFilesAfter

Delete the logs after the backup. In this example, 'true'.

enableTableBrowse

Allow a table level browse for this subclient. In this example, '1'.

qoperation execute -af CreateSubclient.xml -appName 'DB2 on Unix' -clientName 'my_machine' -instanceName 'db2inst7' -backupsetName 'TESTDB' -subclientName 'test_subclient' -storagePolicyName 'SP1' -enableBackup 'true' -dataBackupStoragePolicy/storagePolicyName 'DB2Data' -db2BackupMode 'ONLINE_BACKUP' -db2BackupData 'true' -db2BackupType 'ENTIRE_DATABASE' -db2BackupLogFiles 'true' -db2DeleteLogFilesAfter 'true' -enableTableBrowse '1'

Adding a Subclient for a DB2 Windows Configuration

To add a subclient, set the following parameters:

Parameter

Value

instanceName

The instance name. In this example, 'db2inst7'.

clientName

The DB2 client name. In this example, 'my_machine'.

appName

In this example, 'DB2'.

backupSetName

The backup set name. In this example, 'TESTDB'.

subclientName

The subclient name. In this example, 'test_subclient'.

storagePolicyName

The storage policy to use for backups. In this example, 'SP1'.

enableBackup

In this example, 'true'.

Db2DefaultIndexSP/storagePolicyName

The default storage policy. In this example, 'DB2Data'.

db2BackupMode

The backup mode. In this example, 'ONLINE_BACKUP'.

db2BackupData

Back up the data. In this example, 'true'.

db2BackupType

In this example, 'ENTIRE_DATABASE'

db2BackupLogFiles

Back up the logs. In this example, 'true'.

db2DeleteLogFilesAfter

Delete the logs after the backup. In this example, 'true'.

enableTableBrowse

Allow a table level browse for this subclient. In this example, '0'.

qoperation execute -af CreateSubclient.xml -appName 'DB2' -clientName 'my_machine' -instanceName 'db2inst7' -backupsetName 'TESTDB' -subclientName 'test_subclient' -storagePolicyName 'SP1' -enableBackup 'true' -dataBackupStoragePolicy/storagePolicyName 'DB2Data' -db2BackupMode 'ONLINE_BACKUP' -db2BackupData 'true' -db2BackupType 'ENTIRE_DATABASE' -db2BackupLogFiles 'true' -db2DeleteLogFilesAfter 'true' -enableTableBrowse '0'

Loading...