Ransomware attackers specifically target and attempt to destroy backup systems to increase the probability of payment. Hardening your system is critical. Please ensure you have reviewed your platform security using the Security Hardening Checklist
Cohesity

COHESITY Documentation

Explore our documentation to get started, discover products & new features, access troubleshooting guides, register sources, platforms support.

Products
Data Security Alliance
Visit Cohesity.com
Demos
Support
Blogs
Developers
Partner Portals
Cohesity Community
© 2026 Cohesity, Inc. All Rights Reserved.
Terms of Use|
Privacy Policy|
Legal|
  1. Home
  2. Veritas NetBackup™ for DB2 Administrator's Guide
  3. Configuring NetBackup for DB2
  4. About NetBackup for DB2 templates and shell scripts
  5. Creating shell scripts using bpdbsbdb2
Veritas NetBackup™ for DB2 Administrator's Guide

Creating shell scripts using bpdbsbdb2

bpdbsbdb2 is a NetBackup for DB2 command that initiates template-based, user-directed backup and recovery. It also generates DB2 shell scripts from the templates created by the backup wizard.

To create a shell script, issue this command with the following options:

bpdbsbdb2 -backup -g script_file_name -t template_name

where:

script file name

Generates a shell script from a template.

Enclose script_file_name in quotation marks (" ") if it contains space characters. Do not use this option with this command's -r (for "run") option.

template_name

Identifies the template.

bpdbsbdb2 retrieves backup templates from a known location on the master server. Specify only the file name.

Note:

The user needs to review and customize any and all scripts that are generated from templates. Generated scripts are intended to be modified for the user's environment and preferences. For example, settings such as passwords or catalog partition numbers are not generated in the template-to-script conversion, so they require manual editing. In addition, generated scripts do not handle all possible error and failure cases and should be used at your own risk.

Use the DB2CMD command processor to run the scripts that you generated for Windows. This processor is provided with DB2, DB2CMD C:\TEMP\SCRIPT.CMD.

An authorized DB2 user needs to run the scripts that are generated for UNIX.

The user needs to review and modify script execution permissions as desired.

For security purposes, user names and passwords are not included in generated scripts. Add them as needed.

The DB2 QUIESCE command is generated when the Disconnect users and prohibit access template option is specified. However, this command fails if your version is before DB2 V8.1.

When attempting a point-in-time restore, customize the time value. The command DB2 RESTORE ... TAKEN AT strictly interprets the specified time and succeeds only if a backup image with the same time exists. For more information, see your IBM DB2 documentation. This limitation does not exist for templates, which search for an appropriate image.

If a template enables roll-forward recovery, then roll-forward commands are generated for all partitions that are specified in the template, whether or not that partition is configured for roll-forward recovery.

If a script performs a roll-forward recovery, customize the DB2NODE variable. In single partition environments, this variable can typically be empty (for example, "DB2NODE="). In a multiple partition environment, set this variable to the catalog partition number.

More Information

Using bpdbsbdb2 for a database restore

Creating DB2 scripts manually

About the bpdbsbdb2 directory on the client

About NetBackup for DB2 templates and shell scripts

About backup schedules, templates, and scripts

Feedback

Was this page helpful?
Previous

Creating a backup template using the NetBackup for DB2 backup wizard

Next

Creating DB2 scripts manually

Feedback

Was this page helpful?