How TSM automatic DB backup works ?

Starting with Tivoli Storage Manager, V6.1.2, the Tivoli Storage Manager automatic DB backup will be enabled. This document describes the details of the Tivoli Storage Manager automatic DB backup.

With Tivoli Storage Manager, V6.1, the transition to DB2 as the provided server database has many new capabilities. One of these is the DB2 automatic database backup capability. With this DB2 capability enabled, DB2 can decide to perform database backups based on a number of different criteria or thresholds.

Some of the following criteria considered by DB2 for automatic database backup are:

1. "Has the minimum required number of full backups been performed?"
2. "Has the time interval between database backups been exceeded?"
3. "How much log space has been consumed since the last database backup?"

Also Read: How to increase or decrease TSM DB, active log and archive log size ?

After evaluating the DB2 automatic database backup capabilities in our development and test environments, it was determined that the database backup processing was not consistent with the typical server administration model used by Tivoli Storage Manager. The Tivoli Storage Manager server implemented its own approach to triggered database backups so that the frequency and timing of the database backups could be explicitly controlled by the Tivoli Storage Manager server itself. The Tivoli Storage Manager triggered backups for the server will occur as a result of the following criteria:

logSpaceConsumedSinceLastBackup used by TSM to trigger FULL auto DB backup:

logSpaceUsedSinceLastBackup = (lastActiveLogFileNum - (firstActiveLogFileNum + 1)) * logFileSize;

NOTE: logFileSize is 512M bytes set by TSM.

TSM uses the DB2 API db2GetSnapshot() to get firstActiveLogFileNum and the lastActiveLogFileNum.

For example this is from the DB snapshot::
File number of first active log = 36
File number of last active log = 140

The logSpaceUsedSinceLastBackup is calculated by counting the number of log files used since the last backup (lastActiveLogFileNum - (firstActiveLogFileNum + 1)) and multiply by the log file size.

If this value is greater than the maximum log size, a FULL DB backup will be started.

The maximum log size is default to 2G and can be set to other value ( maximum 128G) by the format or loadformat command.

This is the same trigger used by DB2 automatic DB backup trigger - "How much log space has been consumed since the last database backup?".

An informational message will be generated before the automatic DB backup is started:

Also Read: Taking TSM server DB backup when the server is down

For example:
ANR4531I An automatic full database backup will be started. The last log number used is 140 and the first log number used is 36. The log file size is 25 megabytes. The maximum log file size is 2048 megabytes.

logUtilizationRatio used by TSM to trigger Incremental auto DB backup:


This is the ratio of the total active log space used exceed threshold (set to 80% and not configurable).

 logUsedRatio = totalActiveLogSpaceUsed / ( totalActiveLogSpaceUsed + totalActiveLogSpaceAvailable )

TSM uses the DB2 API db2GetSnapshot() to get totalActiveLogSpaceUsed and totalActiveLogSpaceAvailable.

For example this is from the DB snapshot:
Log space available to the database (Bytes)= 83541717
Log space used by the database (Bytes) = 16683666
logUsedRatio = 16683666 / ( 16683666 + 83541717 ) = 0.16 < 80% No DB backup will be triggered.

An informational message will be generated before the automatic DB backup is started

Also Read: Take TSM DB backup immediately if you notice these messages

For example:
ANR4529I An automatic full or incremental database backup will be started. The active log space used is 17.00 megabytes, and the active log space available is 1.00 megabytes. The ratio, 0.94, exceeds the threshold 0.80.
The above checking for the critiria is performed with interval specified in the TSM option "Runstats Interval" which is default to 10 minutes.

NOTE: By using CLI "db2 get snapshot for db on db_alias", you can obtain the same information as using DB2 API db2GetSnapshot().
The device class used for automatic DB backup is the device class defined with the SET DBRECOVERY command.
You can check it with " q db f=d". The device class listed will be used to perform automatic DB backup.

0 Comment to "How TSM automatic DB backup works ?"

Post a Comment