Deleting Backups Using IBM Db2 Tools

To delete backups, you can use the IBM Db2 built-in option: the PRUNE HISTORY command. To learn more about the command, see this IBM article.

Important

To delete backups using the PRUNE HISTORY command, you must set the AUTO_DEL_REC_OBJ parameter before you create backups. For details, see Preparing Database.

To delete backup files and log archives from the backup repository, use the following command:

db2 prune history <timestamp> and delete

where <timestamp> is a time stamp that IBM Db2 generates for each backup in the yyyymmddhhmmss format.

With this command, Veeam Plug-in will delete all backup files up to the time that you specified in the command. Thus, Veeam Plug-in will not delete the backup with the time stamp that you specified. Also, the PRUNE HISTORY command will not delete to the most recent full backup and associated objects. For example, incremental and log backups.

If you want to delete the most recent full backup and associated objects, use the WITH FORCE OPTION option with the PRUNE HISTORY command:

db2 prune history <timestamp> with force option and delete

where <timestamp> is a time stamp that IBM Db2 generates for each backup in the yyyymmddhhmmss format.

With this command, Veeam Plug-in will delete all backup files up to the time and equal the time that you specified in the command. Thus, Veeam Plug-in will also delete the backup with the time stamp that you specified from the backup repository. Veeam Plug-in will also delete the most recent full backup and associated objects.