Preparing Database

Before you create a backup of the database, make sure that the database is configured properly. You must re-configure the database if you plan to perform the following operations:

Preparation for Incremental Backups

If you plan to create incremental backups later, set the trackmod parameter with the following command:

db2 update database cfg for <database_name> using trackmod YES

where <database_name> is a name of the database you want to back up.

If you do not set the trackmod parameter and create a full backup, you will not be able to create incremental backups for this full backup.

Preparation for Backup Pruning

If you plan to delete backups using the PRUNE HISTORY command later, set the AUTO_DEL_REC_OBJ parameter with the following command:

db2 update database cfg for <database_name> using AUTO_DEL_REC_OBJ ON

where <database_name> is a name of the database you plan to back up.

If you do not set the AUTO_DEL_REC_OBJ parameter and create backups, you will not be able to delete these backups using the PRUNE HISTORY command.

Compression of Archive Log Backups

IBM Db2 supports compression of archive log backups. By default, the compression is disabled. You can enable the compression for the database with the following command:

db2 update database cfg for <database_name> using logarchcompr1 ON

where <database_name> is a name of the database you want to back up.

Alternatively, you can set IBM Db2 to use hardware-accelerated compression. To do this, run the following command:

db2 update database cfg for <database_name> using logarchcompr1 ZLIB

where <database_name> is a name of the database you want to back up.