Loading...

Adding DB2 Backup Sets Using the SnapProtect Command Line Interface

Use XML to create DB2 backup sets. 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 createBackupSet.xml file to the computer where you will run the command.
  3. Open the createBackupSet.xml file, add your specific parameters and save the file.

    For information on supported backup set XML parameters, see Available XML Parameters for DB2 Backup Set Configuration.

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

    UNIX

    qoperation execute -af createBackupSet.xml -appName 'DB2 on Unix' -clientName '<client_name>' -instanceName '<instance_name>' -backupsetName '<backupset_name>'

    Windows

    qoperation execute -af createBackupSet.xml -appName 'DB2' -clientName '<client_name>' -instanceName '<instance_name>' -backupsetName '<backupset_name>'

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

Examples

Expand All

Creating a Backup Set on UNIX

To add a backup set, 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'.
Db2DefaultIndexSP/storagePolicyName The default storage policy. In this example, 'test'.

qoperation execute -af createBackupSet.xml -appName 'DB2 on Unix' -clientName 'my_machine' -instanceName 'db2inst7' -backupsetName 'TESTDB' -Db2DefaultIndexSP/storagePolicyName 'test'

Creating a Backup Set on Windows

To add a backup set, 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'.

qoperation execute -af createBackupSet.xml -appName 'DB2 on Unix' -clientName 'my_machine' -instanceName 'db2inst7' -backupsetName 'TESTDB'