Loading...

DB2 MultiNode Command Line Backups

In addition to using the CommCell Console, you can also perform backups from the command line interface.

Optional: To have the CommCell Console authenticate the job, configure the parameters for CommCell Console third-party job authentication.

We support all DB2 commands in which the –lo (load option) is used. Refer to the to the IBM DB2 manuals for the complete list of DB2 commands that can include the optional –lo parameter.

Note: Your deduplication results may be enhanced by using the DB2 DEDUP_DEVICE option. The following shows an example of how to use the option.

db2 backup db TESTDB load path/libDb2Sbt.so 'dedup_device'

Example

db2 backup db TESTDB load /opt/commvault/commvault/Base64/libDb2Sbt.so  'dedup_device'

For additional information on the DB2 DEDUP_DEVICE parameter, go to the DB2 Knowledge Center, DEDUP_DEVICE.

Running Backups Using Third Party Command Line

Online Backups

If a backup is run with the database online, other applications can access the database while the backup is in progress. Online backups are available only for databases configured with the LOGARCHMETH1 and USEREXIT parameters enabled.

In order to perform an online backup, the subclient should have been configured for online backups. For more information, see Creating A Subclient for Online Backups.

DB2 DPF

Run the command for online backup with logs from the DB2 command prompt on all the nodes.

Example: Online Full Backup:

db2 backup db database_name on all nodes online load '<software_install_path>/Base/Db2Sbt.dll'

Example: Online Incremental Backup:

db2 backup db database_name on all nodes online incremental load '<software_install_path>/Base/Db2Sbt.dll'

Example: Online Delta Backup:

db2 backup db database_name on all nodes online incremental delta load '<software_install_path>/Base/Db2Sbt.dll'

To perform a backup on all the nodes except node 0 where DB2 DPF has 4 nodes, type the backup command.

db2 backup db database_name on dbpartitionnum (1,2,3) load '<software_install_path>/Base/Db2Sbt.dll'

DB2 PureScale

Example: Online Full Backup:

db2 backup db database_name online load '<software_install_path>/Base/Db2Sbt.dll'

Offline Backup

If a backup is run with the database offline, this job has an exclusive connection to the database; therefore, any other access to the database is not allowed while the backup is in progress. An offline backup cannot run if any other applications are already running on the database.

In order to perform an offline backup, the subclient should have been configured for offline backups. See Creating A Subclient for Offline Backups for step-by-step instructions to create a separate subclient for offline backups.

Use the following steps to run offline backups from the third-party command line:

  1. At the DB2 command prompt, type the appropriate offline backup command for the specific platform on all the nodes.

    Note: for Offline Command line backups, disconnect all connected applications to the database before running an offline backup otherwise the offline backup will fail.

DB2 DPF

Example: Offline Full Backup:

db2 backup db database_name on all nodes load '<software_install_path>/Base/Db2Sbt.dll'

Example: Offline Incremental Backup:

db2 backup db database_name on all nodes incremental load '<software_install_path>/Base/Db2Sbt.dll'

Example: Offline Delta Backup:

db2 backup db database_name on all nodes incremental delta load '<software_install_path>/Base/Db2Sbt.dll'

DB2 pureScale

Example: Offline Full Backup:

db2 backup db database_name load '<software_install_path>/Base/Db2Sbt.dll

Example: Offline Incremental Backup:

db2 backup db database_name incremental load '<software_install_path>/Base/Db2Sbt.dll'

Example: Offline Delta Backup:

db2 backup db <database_name> incremental delta load '<software_install_path>/Base/Db2Sbt.dll'

Where

For a DB2 instance on a 32-bit AIX/Solaris or HP-UX or 32-bit/64-bit Linux or 31-bit Linux on System Z:

Use '<software_install_path>/Base/libDb2Sbt.so'

For a DB2 instance on 64-bit AIX/Solaris/HP PARISC or 64-bit Linux on System Z:

Use <software_install_path>/Base64/libDb2Sbt.so

Running Multi-Stream Backups

The DB2 MultiNode Data Agent allows you to perform parallel backups across multiple DB2 MultiNode nodes. As such, you can load-balance your backups across all or selected nodes of your DB2 MultiNode database and thereby take advantage of the strengths of each node.

DB2 third party command line backups running on multiple streams will share the same Job ID in the Job Manager. Make sure that the default stream threshold should be equal to the total number of database partitions for the subclient.

Use the following steps to run multi stream backups from the third party command line:

At the DB2 command prompt, type the backup command on all the nodes.

DP2 DPF Example:

db2 backup db database_name on all nodes load '<software_install_path>/Base/Db2Sbt.dll' open 3 sessions

DB2 pureScale Example

db2 backup db database_name online load '<software_install_path>/Base/Db2Sbt.dll' open 3 sessions

where

<database_name> is the name of the DB2 database

<software_install_path> is the install path for the agent software (e.g., level1/install).

For a DB2 instance on 64-bit AIX/Solaris/HP PARISC or 64-bit Linux on System Z, replace Base with Base64.

Last modified: 4/2/2018 9:36:15 PM