NetBackup™ Commands Reference Guide
- Introduction
- Appendix A. NetBackup Commands
Name
nbdb2adutl — used to query or extract DB2 backup images from the NetBackup catalog
SYNOPSIS
{db|database db_name} [inst inst_name] [partition n|all] [between sn1 and sn2] [chain n|all] [browse_client browse_client_name]
{db|database db_name} [inst inst_name] [partition n|all] [between sn1 and sn2] [chain n|all] [browse_client browse_client_name]
{db|database db_name} [inst inst_name] [partition n|all] [full|tablespace] [nonincremental|incremental|delta] [taken at timestamp] [browse_client browse_client_name]
{db|database db_name} [inst inst_name] [partition n|all] [full|tablespace] [nonincremental|incremental|delta] taken at timestamp [browse_client browse_client_name]
On UNIX systems, the directory path to this command is /usr/openv/netbackup/bin/
On Windows systems, the directory path to this command is install_path\NetBackup\bin\
DESCRIPTION
Use the nbdb2adutl command to interact with the DB2 backup images found in the NetBackup catalog.
When you use the query option, the command queries the NetBackup catalog for DB2 backups. The inst
option is only required when the instance name (DB2INSTANCE) is not found in the environment.
When you use the extract option, the command restores DB2 database backup images and archive logs from NetBackup to the user's current working directory. Existing database backup images and log files are not overwritten. For this reason, be careful when you use all with either partition or chain.
By default, the original user, or any user from the same group has access to the backup images. NetBackup image permissions are set at backup time using the BKUP_IMAGE_PERM option. See the NetBackup for DB2 Administrator's Guide for more information.
Before you run the nbdb2adutl command, you must run the bpnbat - login - loginType WEB command. The bpnbat command authenticates your web services logon. The user that is specified when you run bpnbat -login -loginType WEB should be a member of an RBAC role with Assets, DB2, View, and Recover permissions.
You can use the filter types listed here for backup type or incremental type:
OPTIONS
- between sn1 and sn2
Identifies the range of archive log sequence numbers. The specified sequence numbers are inclusive in the range. If the option is omitted, all sequence numbers that meet the specified criteria are returned.
- browse_client client_name
Identifies the name of the client where the backups were performed. Used for alternate client restores. Primary server must be configured for alternate client restore. That is altnames, etc. If not specified, the browse client is determined from the
bp.conf
.- chain n | all
Identifies the archive log chain number. Use all to indicate that you want all chain numbers included. The default value is 0.
- db database_name
Name of the database.
- delta
Include only the incremental delta backup images in the query or extract.
- extract
Identifies that a restore operation is to be performed.
- full
Include only the full database backup images in the query or extract.
- incremental
Include only the incremental backup images in the query or extract.
- inst instance_name
Name of the instance. The option is required if the name of the instance cannot be obtained from the DB2INSTANCE environment value.
- logs
Identifies that the DB2 archive logs are the object.
- nonincremental
Include only the non-incremental backup images in the query or extract.
- partition n | all
Identifies the DB2 database partition. Use all to specify all partition numbers. The default is 0.
- query
Used to search the NetBackup catalog for DB2 archive log backups.
- tablespace
Include only the tablespace backup images in the query or extract.
- taken at date-time
Used to specify the timestamp of a backup image in query and extract operations. The timestamp is displayed after successful completion of a backup operation and is part of the path name for the backup image. The timestamp format is yyyymmddhhmmss. This parameter is required for the extract operation and optional for the query operation. If the parameter is not specified for a query operation, the output is not timestamp limited.
You can specify a partial timestamp. For example, if the backup images with timestamps 20241201130130 and 20241202130130 exist, if you specify 20241202 the operation uses the 20241202130130 image.
EXAMPLES
Example 1: Query all the logs for a database named sample where the instance is prod, the partition is 0, and the chain is 0.
nbdb2adutl query logs db sample inst prod
Example 2: Query log sequence numbers 5 to 10 for the sample database, where the instance is prod, the partition is 0 and the chain is 0. Instance prod is found in the environment.
nbdb2adutl query logs db sample between 5 and 10
Example 3: Restore log sequence numbers 5 to 10 for the sample database, where the instance is prod, the partition is 0, and the chain is 0.
nbdb2adutl extract logs db sample inst prod between 5 and 10
Example 4: Alternate client restore log sequence number 5 to 10 for the sample database from the production server prodbox.sample.com, where instance is prod, the partition is 0, and chain is 0.
nbdb2adutl extract logs db sample inst prod between 5 and 10 browse_client prodbox.sample.com
Example 5: Query all the database backup images that were taken on March 25, 2024 for the sample database, the instance is prod, the partition is 0.
nbdb2adutl query db sample inst prod taken at 20240325
Example 6: Restore all the database backup images that were taken at 1:45:03 on March 25, 2024 for the sample database, the instance is prod, the partition is 0.
nbdb2adutl extract db sample inst prod taken at 20240325124503