You can use XML to modify 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
-
On the DB2 Agent host, run the qlogin command to log on to the CommServe computer.
-
Download the UpdateBackupSet.xml file to the computer where you will run the command.
-
Open the UpdateBackupSet.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.
-
On the command line, go to Software_Installation_Directory/Base and type the following command.
UNIX
qoperation execute -af UpdateBackupSet.xml -appName 'DB2 on Unix' -clientName 'client1' -instanceName 'db2instancename' -backupsetName 'backupset_name'
Windows
qoperation execute -af UpdateBackupSet.xml -appName 'DB2' -clientName 'client1' -instanceName 'db2instancename' -backupsetName 'backupset_name'
Examples
Updating the Backup Set to use SQL Connect and a New Storage Policy on a UNIX Configuration
To modify a backup set, set the following parameters:
Parameter |
Value |
---|---|
instanceName |
The instance name. In this example, 'DB2_Instance'. |
clientName |
The DB2 client name. In this example, 'db2_client'. |
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, 'new_db2_storage_policy'. |
usesqlConnect |
In this example, 'true''. |
db2SqlConnectInfo/userName |
In this example, 'dbserve/administrator' |
db2SqlConnectInfo/userPassword |
In this example, '1234' |
qoperation execute -af update_backupset_template.xml -appName 'DB2 on Unix' -clientName 'db2_client' -instanceName 'DB2_Instance' -backupsetName 'TESTDB' -dB2DefaultIndexSP/storagePolicyName 'new_db2_storage_policy' -usesqlconnect 'true' -db2SqlConnectInfo/username 'dbserve/administrator' -db2SqlConnectInfo/userPassword ‘1234’
Updating the Backup Set to use SQL Connect and a New Storage Policy on a Windows Configuration
To modify a backup set, set the following parameters:
Parameter |
Value |
---|---|
instanceName |
The instance name. In this example, 'DB2_Instance'. |
clientName |
The DB2 client name. In this example, 'db2_client'. |
appName |
In this example, 'DB2'. |
backupSetName |
The backup set name. In this example, 'TESTDB'. |
Db2DefaultIndexSP/storagePolicyName |
The default storage policy. In this example, 'new_db2_storage_policy'. |
usesqlConnect |
In this example, 'true''. |
db2SqlConnectInfo/userName |
In this example, 'dbserve\administrator' |
db2SqlConnectInfo/userPassword |
In this example, '1234' |
qoperation execute -af update_backupset_template.xml -appName 'DB2' -clientName 'db2_client' -instanceName 'DB2_Instance' -backupsetName 'TESTDB' -dB2DefaultIndexSP/storagePolicyName 'new_db2_storage_policy' -usesqlconnect 'true' -db2SqlConnectInfo/username 'dbserve\administrator' -db2SqlConnectInfo/userPassword ‘1234’