Veritas NetBackup™ for DB2 Administrator's Guide
- Introduction to NetBackup for DB2
- Installing NetBackup for DB2
- Configuring NetBackup for DB2
- Overview of NetBackup for DB2 configuration
- About permissions for NetBackup for DB2 log files (UNIX)
- About configuring a backup policy for DB2
- About adding backup selections to a DB2 policy
- Configuring an application backup schedule
- Example application backup schedule
- Configuring automatic backup schedules
- Example automatic backup schedule
- About schedule properties
- NetBackup for DB2 backup types
- Performing a manual backup
- Reviewing the auto-discovered mappings in Host Management
- About backing up archive log files with the user exit program
- Configuring the run-time environment
- Creating a db2.conf file for use with the user exit program
- Creating a db2.conf file (vendor method)
- Configuring bp.conf files in a cluster environment
- Keywords for the db2.conf file
- NetBackup for DB2 environment variables
- Configuring the logon account for the NetBackup Client Service for NetBackup for DB2
- About NetBackup for DB2 templates and shell scripts
- Performing backups and restores of DB2
- Using Snapshot Client with NetBackup for DB2
- NetBackup for DB2 with Snapshot Client features
- About NetBackup for DB2 with Snapshot Client operations
- About the sequence of a NetBackup for DB2 backup operation with Snapshot Client methods
- About the sequence of a NetBackup for DB2 restore operation with Snapshot Client methods
- About database objects supported by advanced backup methods
- About multistreaming and DB2 snapshot backups
- About symbolic links and DB2 backups and restores (UNIX)
- NetBackup for DB2 stream-based operations
- NetBackup for DB2 file-based operations
- Example: multiple sessions for a DB2 snapshot backup
- About configuring Snapshot Client with NetBackup for DB2
- Configuration requirements for snapshot backups with NetBackup for DB2
- Configuring a snapshot policy for NetBackup for DB2
- About configuring the db2.conf for a snapshot policy
- Restoring NetBackup for DB2 from a snapshot backup
- About restoring individual files from a NetBackup for DB2 snapshot backup
- About NetBackup for DB2 restores of volumes and file systems using snapshot rollback
- Performing a NetBackup for DB2 point-in-time rollback restore from a SnapVault backup (UNIX)
- Performing a snapshot rollback restore from the Java or Windows interface
- Performing a snapshot rollback restore from the command line
- Troubleshooting NetBackup for DB2 rollback restores
- About configuring NetBackup for DB2 block-level incremental backups on UNIX
- How BLI works with NetBackup for DB2 (UNIX)
- About the Storage Checkpoint facility and NetBackup for DB2
- Configuration requirements for BLI backups with NetBackup for DB2
- Storage Checkpoint configuration on the NetBackup for DB2 client
- Configuring policies for BLI backups with NetBackup for DB2
- BLI incremental backup options using NetBackup for DB2
- About Snapshot Client effects
- Performing NetBackup for DB2 backups with Snapshot Client methods
- Performing NetBackup for DB2 restores with Snapshot Client methods
- Troubleshooting NetBackup for DB2
- NetBackup debug logs and reports
- Enabling the debug logs for a NetBackup for DB2 client automatically (Windows)
- Enabling the debug logs manually (Windows)
- Enabling the debug logs manually (UNIX)
- About the NetBackup for DB2 log files
- Setting the debug level on a Windows client
- Setting the debug level on a UNIX client
- About NetBackup server reports
- Minimizing timeout failures on large database restores
- Minimizing the loading and unloading of tapes for database backups
- Use the NET_BUFFER_SZ file to speed up a slow restore
- About false restore failures reported in the activity monitor
- About the error message codes
- Delays in completion of backup jobs
- Appendix A. Configuration for a DB2 EEE (DPF) environment
- Appendix B. Using NetBackup for DB2 with SAP®
- Appendix C. Register authorized locations
BLI incremental backup options using NetBackup for DB2
DB2 BLI incremental backups can be initiated several ways. Initiating them from the master server is the recommended method because it requires no special configuration. Operational constraints may necessitate initiating the backups from the client host, two options are available.
Note:
BLI is not currently supported for DB2 Snapshot backups on Microsoft Windows clients, the examples in this section use UNIX Bourne shell syntax. Modify as appropriate if using a different shell.
The following three options describe how to initiate DB2 BLI incremental backups. Some of these options also contain examples of a policy setup that you use and how to modify the backup script
We recommend that you initiate BLI backups from the master server. Initiate the BLI backups using automatic schedules and a Backup Selection that is a script or template. When NetBackup controls the initiation, no special configuration is needed. The policy and the schedule information are provided to the client from the master server. The agent queries the policy and the schedule information and perform the appropriate type of checkpoint; full, cumulative incremental, or differential incremental.
If the backup is initiated from the client, then the schedule from the db2.conf file is used by default. To perform both the full and the incremental backups, the backup script must be enhanced. The enhancement is to ensure the correct type of schedule and associated checkpoint is used. This enhancement can be accomplished by setting the same environment variables that the master server sets before the backup is initiated.
Create appropriate automatic full, automatic cumulative incremental, and automatic differential incremental schedules in the DB2 backup policy.
Set environment variables to specify the automatic schedule to use before the agent program is executed.
Create one
db2.conffile in the $DB2_Instance_Home directory. Update the schedule keyword in the database stanza with the name of the application backup schedule to use for any stream-based backups that might occur. The value is overridden with automatic schedule names in the following example.
The following is an example of a policy that has automatic schedules for the snapshot backups and an application schedule for the stream-based backups.
master$ bpplsched DB2_Policy -L | egrep '^Schedule:|^ Type:' Schedule: Full Type: FULL SDB2 (0) Schedule: Cum Type: CINC (4) Schedule: Diff Type: INCR (1) Schedule: Default-Application-Backup Type: UBAK DB2 (2)
The policy only has one db2.conf file, and it is set for stream-based backups.
client$ head -4 $DB2_Instance_Home/db2.conf DATABASE SAMPLE OBJECTTYPE DATABASE POLICY DB2_Policy SCHEDULE Default-Application-Backup
The backup script sets and exports the appropriate environment variables before the backup is initiated.
DB2_INCR=0 DB2_CINC=0 DB2_FULL=0 if [ <some_condition> ]; then DB2_INCR=1 DB2_SCHED="Diff" elif [ <some_other_condition> ]; then DB2_CINC=1 DB2_SCHED="Cum" else DB2_FULL=1 DB2_SCHED="Full" fi DB2_POLICY=DB2_Policy DB2_SCHEDULED=1 export DB2_INCR DB2_CINC DB2_FULL DB2_SCHED DB2_POLICY DB2_SCHEDULED /usr/openv/netbackup/bin/bpdb2proxy <options> # or /usr/openv/netbackup/bin/bpdbsbdb2 <options>
If the backup is initiated from the client, then the schedule from the db2.conf file is used by default. The db2.conf file can specify only one policy and schedule for a specific database. To perform both the full and the incremental backups, the backup script must be enhanced. The enhancement is to ensure the correct type of schedule and associated checkpoint is used. This enhancement can be accomplished by updating the db2.conf file before the backup is initiated.
Create appropriate automatic full, automatic cumulative incremental, and automatic differential incremental schedules in the DB2 backup policy.
Create a
db2.conffile to be used with each schedule. In each file, update the schedule keyword in the database stanza with the associated schedule name.Copy the appropriate
db2.conffile into place before executing the agent program.
The following is an example of a policy that has automatic schedules for the snapshot backups and an application schedule for the stream-based backups.
master$ bpplsched DB2_DB_Policy -L | egrep '^Schedule:|^ Type:' Schedule: Full Type: FULL SDB2 (0) Schedule: Cum Type: CINC (4) Schedule: Diff Type: INCR (1) Schedule: Default-Application-Backup Type: UBAK DB2 (2)
The policy has three db2.conf files, one for each type of automatic backup schedule.
client$ head -4 db2.conf.with_full_schedule DATABASE SAMPLE OBJECTTYPE DATABASE POLICY DB2_DB_Policy SCHEDULE Full client$ head -4 db2.conf.with_cum_schedule DATABASE SAMPLE OBJECTTYPE DATABASE POLICY DB2_DB_Policy SCHEDULE Cum client$ head -4 db2.conf.with_diff_schedule DATABASE SAMPLE OBJECTTYPE DATABASE POLICY DB2_DB_Policy SCHEDULE Diff
The backup script copies the correct db2.conf file into place before the backup is initiated.
... <setup the rest of the DB2 backup environment> ... if [ <some_condition> ]; then cp db2.conf.with_diff_sched $DB2_Instance_Home/db2.conf elif [ <some_other_condition> ]; then cp db2.conf.with_cum_sched $DB2_Instance_Home /db2.conf else cp db2.conf.with_full_sched $DB2_Instance_Home /db2.conf fi /usr/openv/netbackup/bin/bpdb2proxy <options> # or /usr/openv/netbackup/bin/bpdbsbdb2 <options>