Use XML to delete DB2 backup sets. Run the operation from the command line, or automate configuration by combining command line operations in a script.
You can include the XML parameters in the xml file, or you can specify them on the command line when they frequently change. For more information on command line parameters and XML elements, see Command Line - Syntax.
Caution
If you do not include the backupSetName parameter when you delete backup sets, all user-created backup sets are deleted on the DB2 instance.
Procedure
-
On the DB2 Agent host, run the qlogin command to log on to the CommServe computer.
-
Download the delete_backupset_template.xml file to the computer where you will run the command.
-
Open the delete_backupset_template.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 command.
UNIX
qoperation execute -af delete_backupset_template.xml -entity/app 'DB2 on Unix' -entity/instanceName 'instance_name' -entity/clientName 'client_name' -entity/appName 'DB2 on Unix' -entity/backupSetName 'backup_set_name'
Windows
qoperation execute -af delete_backupset_template.xml -entity/appName 'DB2 on Windows' -entity/instanceName 'instance_name' -entity/clientName 'client_name' -entity/appName 'DB2 on Unix' -entity/backupSetName 'backup_set_name'
Examples
Deleting a Backup Set on UNIX
qoperation execute -af delete_backupset_template.xml -entity/app 'DB2 on Unix' -entity/instanceName 'db2inst11' -entity/clientName 'client1' -entity/appName 'DB2 on Unix' -entity/backupSetName 'test
Deleting a Backup Set on Windows
qoperation execute -af delete_backupset_template.xml -entity/appName 'DB2 on Windows' -entity/instanceName 'db2inst11' -entity/clientName 'client1' -entity/appName 'DB2 on Windows' -entity/backupSetName 'test'