Sample script and command for backing up the TSLM database (tslmdbbackup.sh)

The sample script tslmdbbackup.sh starts an online or offline backup of the TSLM database. The backup file will be created under the directory defined by TSLMDBBACKUPDIR parameter of dbuserexit.conf file.

Requirement: The caller of this script must be logged in as ermm user.

Syntax: tslmdbbackup.sh [OFF|ON]

Offline backups

Requirement: Before starting an offline backup, TSLM must be stopped. You can stop TSLM with the following commands:
su – ermm
ermmStop
Start an offline backup by calling this script with the OFF parameter, for example:
su - ermm
tslmdbbackup.sh OFF

Online backups

Important: Online backups are supported only when the database is configured for archive logging. See the section about the sample script tslmsetlogarchive.sh for details about configuring the database for archive logging mode.
Start an online backup by calling this script with the ON parameter, for example:
su - ermm
tslmdbbackup.sh ON

Command example

Here is an example of a command that takes an online backup of the TSLM database:

db2 backup database ermm online to /opt/IBM/ermm/ermmdbarchive/dbbackup