Veritas NetBackup™ for DB2 Administrator’s Guide

UNIX and Linux

Release 6.5

12308296

Veritas NetBackup for DB2 Administrator’s Guide
Copyright © 2007 Symantec Corporation. All rights reserved. NetBackup 6.5 Symantec, the Symantec logo, and NetBackup are trademarks or registered trademarks of Symantec Corporation or its affiliates in the U.S. and other countries. Other names may be trademarks of their respective owners. Portions of this software are derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm. Copyright 1991-92, RSA Data Security, Inc. Created 1991. All rights reserved. The product described in this document is distributed under licenses restricting its use, copying, distribution, and decompilation/reverse engineering. No part of this document may be reproduced in any form by any means without prior written authorization of Symantec Corporation and its licensors, if any. THIS DOCUMENTATION IS PROVIDED “AS IS” AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID, SYMANTEC CORPORATION SHALL NOT BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES IN CONNECTION WITH THE FURNISHING, PERFORMANCE, OR USE OF THIS DOCUMENTATION. THE INFORMATION CONTAINED IN THIS DOCUMENTATION IS SUBJECT TO CHANGE WITHOUT NOTICE. The Licensed Software and Documentation are deemed to be “commercial computer software” and “commercial computer software documentation” as defined in FAR Sections 12.212 and DFARS Section 227.7202. Symantec Corporation 20330 Stevens Creek Blvd. Cupertino, CA 95014 www.symantec.com Printed in the United States of America.

Third-party legal notices
Third-party software may be recommended, distributed, embedded, or bundled with this Symantec product. Such third-party software is licensed separately by its copyright holder. All third-party copyrights associated with this product are listed in the accompanying release notes.
AIX is a registered trademark of IBM Corporation. HP-UX is a registered trademark of Hewlett-Packard Development Company, L.P. Linux is a registered trademark of Linus Torvalds. Solaris is a trademark of Sun Microsystems, Inc.

Licensing and registration
Veritas NetBackup is a licensed product. See the NetBackup Installation Guide for license installation instructions.

Technical support
For technical assistance, visit http://entsupport.symantec.com and select phone or email support. Use the Knowledge Base search feature to access resources such as TechNotes, product alerts, software downloads, hardware compatibility lists, and our customer email notification service.

.

...33 Specifying an archive method ...................16 Chapter 2 Installing the agent Verifying the installation prerequisites .....................................37 Planning NetBackup for DB2 policies and schedules ....................................................................................................................conf) and script files ..................................................................................33 Configuring DB2 to work with NetBackup .....................................................34 Adding new DB2 instances ............................................................................................................................24 Pushing the software to new or selected clients ............................29 Specifying log archiving .............34 Chapter 3 Configuration User interface terminology notes .................................................19 Operating system and platform compatibility ...........................................................15 Backup and recovery wizards ........................................14 User exit program ............14 NBDB2 vendor I/O library .......................................22 Pushing the software to all clients ................21 Installing NetBackup for DB2 .................................................................................................11 NetBackup for DB2 overview ....................32 User exit archiving ..............................................................................................20 Cluster software ..........................................................................................................35 Configuring the Maximum jobs per client ..................................36 Configuring a backup policy for a database ...............32 Archive methods .......................27 Local installation of NetBackup for DB2 ..............21 Remote installation of NetBackup for DB2 ..........................................................................................................................................................................................................13 NetBackup for DB2 components ......................................................................................................21 Loading the database agent files onto the server ........................................20 Database software ................................................19 NetBackup software ...................................................32 VENDOR archiving ..........................................................................................................................................................................................................................................Contents Chapter 1 Introduction NetBackup for DB2 features ..............15 Sample configuration file (db2...............................................................................16 NetBackup for DB2 terminology notes ............37 ............

....... 63 Setting the master server in the backup....................... 52 Configuring the runtime environment ................................................................................................................................................................................................................................................... 63 Setting the master server in the user bp................................................................................................................................................................................ 50 Configuring a policy to archive the archive logs .......................... 60 Configuring a user bp...................conf file (vendor method) .............................................................. 63 Creating a backup template using the NetBackup for DB2 backup wizard ............ 55 Creating a db2................................................... and restore interface ....... archive..................................................................... 43 Schedule properties ........................6 Adding a new policy ................................... 47 Specifying the master server for a NetBackup for DB2 client ... 66 Creating shell scripts using bpdbsbdb2 ............................................. 53 Example db2............................ 68 Instructions for modifying scripts ........................................................... 46 Rules for templates or scripts ................................................ 62 Specifying the NetBackup master server from the client ...................................................................conf file (with VENDOR method) ................... 39 Adding schedules ...................................................................................................................................................... 64 Using the NetBackup for DB2 backup wizard ............................................................................... 68 ............................... 58 Configuring bp......................conf ..................conf file (with ARCFUNC COPY) ....... 46 Adding templates or scripts to the backup selections list .................. 45 Adding backup selections ..... 49 Configuring a policy to back up the archive logs ..................conf files in a cluster environment ............................................................. 54 Example db2........................................................... 51 Configuring a policy to back up the configuration files .......................... 61 Environment variables .......................................................... 62 Understanding templates and shell scripts ..... 53 Creating a db2. 40 Configuring an Application Backup schedule .................. 40 Configuring Automatic Backup schedules ............... 41 Types of backup schedules .................................................................................conf file (user exit program) ................................................................................................................................................. 44 Adding clients ...... 62 Templates ...............................................................conf file .................................. 40 Tips for configuring schedules . 62 Shell scripts .....conf file (with ARCFUNC SAVE) .......................... 64 Browsing for the DB2 instance to back up ........................... 38 Description of attributes .......... 49 Backing up archive log files with the user exit program .................. 57 Keyword summary .. 56 Example db2...................................................... 61 Creating templates and shell scripts .......................................................... 66 Creating DB2 scripts manually ........................................................conf file ................. 60 Configuring a master bp.......................................

.................................................................................................................................69 Templates .................................................83 Selecting files for restore ............75 Performing a user-directed backup from the NetBackup for DB2 client ..............................................................................71 Chapter 4 Using NetBackup for DB2 Performing a backup .....83 Invoking the NetBackup for DB2 recovery wizard ...................................................79 Using the Backup.....................79 Using bplist to browse .............................................................70 Backing up the database and archive logs .....................................................................................................97 ........................................................................................................................................................................................69 Storing templates and scripts ..........................92 Performing the alternate restore on the clients ......................82 Performing a restore ..........................74 Automatic backup of a DB2 policy ...................................70 Testing configuration settings ..........................93 Chapter 5 NetBackup for DB2 with Snapshot Client Installation and licensing requirements ..........................83 Using the NetBackup for DB2 recovery wizard .......................86 Recovering a DB2 database .............. Archive............................................................................................................................ and Restore interface to browse .......75 Using DB2 template administration ..............................75 Running a NetBackup for DB2 backup template .................82 Example 3 ....................................................................90 Preparing the master server for an alternate restore ......................................................................................7 Script parameters .......................................................................................86 Recovering a DB2 database ............................Simplest case ............................................................................74 Manual backup of a DB2 policy .............................................84 Using bpdbsbdb2 ........................................77 Using DB2 to perform a backup ......................................................................................................................................73 Performing a backup from the NetBackup master server ................................80 Example 1 ...76 Using bpdbsbdb2 ........................81 Example 2 .....69 Shell scripts ....................90 When to use an alternate restore ........................................................83 Using the recovery wizard ......................................................................................89 Performing an alternate restore ....................................................................................................85 Using DB2 to perform a restore ..............................70 Storing templates and scripts in a NetBackup cluster ....................................................................................................................Restoring archive logs .........................................87 RESTORE DATABASE command options ..................................................78 Browsing backups ...................................................................

.. 114 Configuration requirements .. 117 Templates and scripts .8 NetBackup for DB2 with Snapshot Client overview .................................................................................................................................................................................................................................... 109 Restoring volumes and file systems using block-level restore ........... 114 Types of BLI backups ........................................................................................................................................................................ 111 Storage Checkpoint ....................... 119 ............................................... 118 User-directed backups using templates ................................................................. 99 File-based operations ......................................................................................... 105 Configuring a snapshot policy ................................. 102 Multistreaming .............................. 105 Restoring data from a snapshot backup ................................ 99 Stream-based operations ............................................. 112 Nodata Storage Checkpoint .......................................................................... 111 How does BLI work? ..................... 102 Database objects supported by advanced backup methods .......................................................... 103 Symbolic links ................................................................................................. 103 Configuring snapshot backups ................................................................................... 118 Performing backups . 115 Snapshot Client effects ..................... 109 Troubleshooting ......................................................................................... 104 Configuring the DB2 policy with Snapshot Client backup methods .......................................................................................... 103 Example: Using multiple channels for a DB2 command with proxy method ........ 99 File-based operations ........ 102 Sequence of operation: restore ........................ 104 Configuration requirements ............................. 98 Block-level incremental backup .. 108 Restoring individual files ................................................................... 113 Fulldata Storage Checkpoint ......................................................................................................................................................................... 98 Proxy copy ..... 98 Off-host backup ................................................................................. 98 Snapshot backup .................................................................................................................................................................................................... 114 Configuring policies for BLI backups ......................................................................................................................................................................................................... 116 Schedule properties ....................................................... 113 Storage Checkpoint configuration on the client ........................................................ 100 How does NetBackup for DB2 with Snapshot Client work? ................................................ 98 Instant recovery .... 118 Using NetBackup for DB2 with Snapshot Client ................................................................................................... 101 Sequence of operation: backup ..................... 110 Configuring block-level incremental backups ....................................................................................................................... 116 Types of backups ........................................................................................... 108 Restoring volumes and file systems using snapshot rollback ......................................................................................... 118 Server-directed backups .........

...............................................119 Restoring from a snapshot backup ......136 Appendix B Using NetBackup for DB2 with SAP® Installation of the DB2 user exit program .............................123 Setting the debug level ...............119 User-directed restores using bpdb2proxy ..............................................................................................119 Performing restores ...........................................................138 .................................................................................................121 Enabling logging ............................................138 Archive and restore of DB2 log files ................................135 Creating DB2 templates or scripts for a DB2 EEE environment ................................................................................................123 Minimizing timeout failures on large database restores .......................................................124 False restore failures reported in the activity monitor .......................................................................123 bpdbsbdb2 directory on the client .............................................................................120 Chapter 6 Troubleshooting NetBackup reports ..............................................................................................................................................................................125 Reason codes ..........................................................................................122 Accessing the log files .....................................135 Configuring NetBackup for DB2 ........119 User-directed restores using templates .....................123 NetBackup server reports .................................................................................................................................................138 Backup of SAP files .......................................................124 Using NET_BUFFER_SZ to speed up a slow restore ............................................137 Backup and restore of DB2 databases .....125 Appendix A Configuration for a DB2 EEE (DPF) environment Installing NetBackup for DB2 ...............................122 backint directory on the client .......9 User-directed backups using bpdb2proxy .....122 bphdb directory on the client .......................................................................................................................

10 .

This chapter introduces NetBackup for DB2 and how it relates to both DB2 and NetBackup. you can schedule your database backups to occur only at night.Chapter 1 Introduction NetBackup for DB2 integrates the database backup and recovery capabilities of DB2 with the backup and recovery management capabilities of NetBackup. Table 1-1 Feature Media and device management NetBackup for DB2 features and descriptions Description All devices supported by Media Manager are available to NetBackup for DB2. For example. Scheduling facilities . This also lets you choose the times when these operations can occur. NetBackup scheduling facilities on the master server can be used to schedule automatic and unattended DB2 backups. to prevent interference with normal daytime operations. This chapter includes the following topics: ■ ■ “NetBackup for DB2 features” on page 11 “NetBackup for DB2 overview” on page 13 NetBackup for DB2 features Table 1-1 shows NetBackup for DB2’s main features and introduces some terms used in the NetBackup for DB2 documentation.

Sharing the same storage units used for other file backups Centralized and networked backup operations It is possible to share the same devices and media used for other backups or to give DB2 exclusive use of certain devices and media.12 Introduction NetBackup for DB2 features Table 1-1 Feature NetBackup for DB2 features and descriptions (continued) Description Multiplexed backups NetBackup for DB2 lets you take advantage of NetBackup’s and restores multiplexing capabilities. Multiplexing directs multiple data streams to one backup device. From the NetBackup master server. you can schedule database backups or start them manually for any client. and PureDisk storage units. A database administrator can also use the IBM DB2 control center or command line processor to start user-directed backup and restore operations. The DB2 databases can also reside on hosts that are different from the devices on which NetBackup stores the backups. Archive. thereby reducing the time necessary to complete the operation. The database administrator can run database backup and restore operations through NetBackup. NetBackup provides the following graphical user interfaces for client users and administrators: ■ ■ ■ Graphical user interfaces Backup. disk. Transparent DB2 and regular file system backup and restore operations All backups and restores run simultaneously and transparently without any action from the NetBackup administrator. An administrator or any other authorized user can use NetBackup to run database backups and restores. NetBackup for DB2 can use Media Manager. . and Restore user interface NetBackup administration console for Java NetBackup administration console for Windows A database administrator or NetBackup administrator can start backup or restore operations for DB2 from the NetBackup graphical user interface on the master server.

For example. see the NetBackup Administrator’s Guide. You can use a template as the base for a script. Because the wizard-generated templates do not support all the features native to DB2. . You can launch the backup wizard and the recovery wizard from the NetBackup Backup. The server that hosts the DB2 database must be a NetBackup client. Archive.Introduction NetBackup for DB2 overview 13 Table 1-1 Feature Templates NetBackup for DB2 features and descriptions (continued) Description The NetBackup for DB2 database wizards can create backup and recovery templates. NetBackup for DB2 supports the parallel backup and restore capabilities of the DB2 commands. you might want to write a customized backup or restore script in an operating-system defined scripting language. this permits the user to run more than one tape device at a time for a single DB2 backup or restore. The wizards generate platform-independent templates that contain configuration information that the software uses when performing backups and restores. Compression increases backup performance over the network and reduces the size of the backup image that NetBackup writes to the storage unit. Parallel backup and restore operations Compression For more information on general NetBackup terminology. and Restore interface. It also must have NetBackup for DB2 installed. thereby reducing the time necessary to complete the operation. Figure 1-1 shows the hardware and software components for a NetBackup for DB2 environment. Volume I. NetBackup for DB2 overview The following example network shows the major components in a NetBackup for DB2 configuration.

2 and later) RESTORE DATABASE ROLLFORWARD DATABASE Additional required NetBackup software: – NetBackup Client Network (TCP/IP) NetBackup master server or remote media server NetBackup software: – NetBackup Master Server – NetBackup Media Server (if system is a media server) Storage unit NetBackup for DB2 components The following sections describe the main NetBackup components in a NetBackup for DB2 environment.14 Introduction NetBackup for DB2 overview Figure 1-1 NetBackup for DB2 components System hosting the DB2 database NetBackup for DB2 supplies: – NBDB2 Vendor I/O Library – GUI for browsing databases and creating backup and restore templates – Sample configuration file (db2. RECOVER DATABASE (DB2 8.conf) – Sample script files – User exit program (db2uext2[. The installation program installs the vendor library in the following location: /usr/openv/netbackup/bin . NBDB2 vendor I/O library The DB2 BACKUP and RESTORE commands use the NBDB2 vendor I/O library to send data buffers between a DB2 database and NetBackup.64]) DB2 database DB2 database software supplies: – Commands: BACKUP DATABASE.

Backup and recovery wizards NetBackup for DB2 provides wizards that enable you to create backup and recovery templates. For more information on these methods.Introduction NetBackup for DB2 overview 15 The name of the vendor library differs. The user exit program resides in $DB2_INSTANCE/sqllib/adm/db2uext2.sl nbdb2. There are other methods for backing up archive log files.so You specify the library as the argument to the LOAD parameter of the DB2 BACKUP and RESTORE commands. db2uext2. If you are using 64-bit DB2. This occurs at the following times: ■ When the DB2 BACKUP or ROLLFORWARD commands are used to back up or restore databases.so64 nbdb2. The DB2 ARCHIVE LOG command is issued. as follows: Platform 32-bit Solaris (SPARC) and Linux 64-bit Solaris (SPARC) 32-bit AIX and HP-UX 64-bit AIX and HP-UX 64-bit Linux. and Restore interface. You invoke the wizards by browsing for and selecting a DB2 database object in the Backup. provides one method for backing up and restoring the DB2 archive log files. the file is called db2uext2.64. depending on your platform. ■ ■ ■ The user exit program backs up and restores the archive logs as files. When the user exits the database by using the DB2 TERMINATE or DISCONNECT command. and IBM pSeries Name nbdb2. Archive.sl64 nbdb2.so nbdb2. see “Specifying log archiving” on page 32. After you supply . User exit program The NetBackup for DB2 user exit program. When the log file fills and DB2 starts writing transactions to another log file. NetBackup for DB2 supports this method for protecting the archive logs in all supported DB2 releases. Itanium.

16 Introduction NetBackup for DB2 overview the appropriate information about the operation. Sample configuration file (db2. copy the sample files to working directories and modify them for your own use. NetBackup for DB2 terminology notes DB2 supports two methods for archiving its log files: through a user exit program and through a vendor library. and it provides information on policies and schedules. the wizard creates a template that you can run immediately or store on the server (for backup templates). The DB2 syntax for specifying these archive log methods differs from release to release. NetBackup for DB2 supplies a user exit program and a library to support both of these methods. users can use the NetBackup for DB2 wizards to create backup and restore templates. You can use the stored backup templates in scheduled backups through a NetBackup policy. The scripts contain DB2 BACKUP or RESTORE commands for use with NetBackup.conf) and script files The installation software installs the following sample files: ■ A sample configuration file (db2. The NetBackup for DB2 library and user exit program use the information in this file. Sample backup and restore scripts NetBackup can invoke a script to perform a scheduled backup or restore of a DB2 database. You can use the templates in place of scripts. ■ The installation software writes these sample files to the following location: /usr/openv/netbackup/ext/db_ext/db2/scripts To use the sample files.conf file includes specifications for backups and restores. The following table shows the DB2 syntax you can use to specify these . DB2 supports backing up the archive log files by using a vendor library in its 8. and you can convert templates into scripts. or you can use them to perform manual backups on the NetBackup for DB2 client. Alternatively.2 and later releases.conf file) The db2. This manual uses the terms user exit and VENDOR to differentiate the methods.

When a user exit program is used. . specify an operating system specific library as described in “NBDB2 vendor I/O library” on page 14./library NetBackup for DB2 uses the term user exit to describe these DB2 settings: LOGARCHMETH1=LOGRETAIN LOGARCHMETH1=USEREXIT USEREXIT=ON USEREXIT=YES LOGRETAIN=ON LOGRETAIN=RECOVERY When VENDOR is used. archive logs are backed up by means of the NetBackup for DB2 vendor library. archive logs are backed up by means of the NetBackup for DB2 user exit program.Introduction NetBackup for DB2 overview 17 methods within DB2 and indicates the term this manual uses to describe each method: Table 1-2 DB2 Syntax for Log Archiving and NetBackup for DB2 Terminology NetBackup for DB2 uses the term VENDOR to describe this DB2 setting: LOGARCHMETH1=VENDOR:.. The DB2 syntax for specifying the user exit program includes the USEREXIT and LOGRETAIN keywords specified in a configuration parameter. The full specification for this archive log method is as follows: LOGARCHMETH1=VENDOR:/usr/openv/netbackup/bin/library For library..

18 Introduction NetBackup for DB2 overview .

x. look for the current release. For x. In the Product Lookup field. These requirements apply for remote and local installations.x/ NetBackup Server x. Verifying the installation prerequisites Perform the procedures in this section before you install the database agent. click on Compatibility List. type in NetBackup Enterprise Server and click on the > button.symantec. look for the most recent date. Operating system and platform compatibility Verify that NetBackup for DB2 is supported on your operating system or platform. click Veritas NetBackup Enterprise Server (tm) x. From the list on the right. .Chapter 2 Installing the agent This chapter includes the following topics: ■ ■ ■ ■ ■ “Verifying the installation prerequisites” on page 19 “Installing NetBackup for DB2” on page 21 “Specifying log archiving” on page 32 “Configuring DB2 to work with NetBackup” on page 34 “Adding new DB2 instances” on page 34 Perform the procedures in this chapter before you configure NetBackup for DB2. To verify compatibility 1 2 3 4 Go to the technical support Web page: http://entsupport.com. For date. In the list of documents.x Database Agent Compatibility (Updated date).

see the NetBackup Installation Guide. Volume I. NetBackup software Verify that the following requirements are met for the NetBackup server and client software: ❏ The NetBackup server software is installed and operational on the NetBackup server. However. the size of your backups. . 5 6 Click the link for the PDF document. For information on using Media Manager. Make sure that you configure any backup media that the storage unit uses. The NetBackup server platform can be any that NetBackup supports. the sizes of the databases that you want to back up.20 Installing the agent Verifying the installation prerequisites For information on supported cluster environments for NetBackup for DB2. There must be adequate disk space on each machine upon which you want to install the database agent. and the frequency of backups or archives. The version of the NetBackup client and the version of the database agent you want to install must be the same (for example. The amount of backup media that is required depends on the devices that are used. For installation information. Less than two megabytes of additional disk space is required in the /usr/openv/netbackup directory. more disk space might be needed at run time. One or more DB2 instances must exist. which is a downloadable file that enables you to view the supported database spreadsheet for this release. install the NetBackup client software on every node and client that DB2 uses.5). ❏ ❏ ❏ Database software Verify the following regarding the database software on the NetBackup client: ❏ ❏ DB2 vendor software must be installed and operational.x Cluster Compatibility (updated date). Caution: In a DB2 EEE environment. the amount of data that you want to archive. 6. see NetBackup (tm) x. Read the document and verify that the software in your environment is compatible with the NetBackup and the database agent. see the NetBackup Administrator’s Guide.

Then you push the software to the clients to install it. The user loads and installs the software onto the local machine only. you load the database agent files onto either a UNIX master server or media server. ■ Remote installation of NetBackup for DB2 During a remote installation. The user loads the software onto a master server or a media server and then pushes the database software out to the clients. “Remote installation of NetBackup for DB2” on page 21 describes this procedure. To perform a remote installation where you push the database agent software to clients located in a cluster. including running the cluster_config script after the NetBackup server software has been installed. The following additional information also pertains to cluster environments: ❏ ❏ Make sure you install the NetBackup client software and the database agent software on each node to which NetBackup can failover. A local installation. specify the individual node names in the client list. “Local installation of NetBackup for DB2” on page 29 describes this procedure.Installing the agent Installing NetBackup for DB2 21 Cluster software Verify the following requirements if you are installing the database agent software on a NetBackup server configured in a NetBackup cluster: ❏ ❏ The DB2 vendor software is installed and operational on each node to which NetBackup can failover. Run commands such as bpplclients and update_dbclients from the active NetBackup master or media server. You can perform an initial or upgrade remote installation in this manner. The NetBackup server software is installed and configured to work in a NetBackup cluster. not the virtual names. Follow the instructions in the NetBackup Installation Guide. . Installing NetBackup for DB2 You can install the database agent software in one of the following ways: ■ A remote installation. You do not need to run cluster_config after installing the database agent on a NetBackup server that is part of a NetBackup cluster. You only need to run the cluster_config script after you install the NetBackup server software.

To load the database agent files on a UNIX server 1 Review “Verifying the installation prerequisites” on page 19. (Conditional) Perform this step only if you want to install on a server that is part of a NetBackup cluster. In the next step. For information on how to freeze the active node in your specific cluster environment. ■ Open the NetBackup administration console and choose Help > License Keys. see the NetBackup Installation Guide. Because you need to perform the installation on all inactive nodes first. Mount the CD-ROM. You can obtain master server license information from either the master server or the media server. type the host name of the NetBackup master server. install the software on all the inactive nodes first.22 Installing the agent Installing NetBackup for DB2 Loading the database agent files onto the server Use the following procedure to load the files onto the server. If you are already logged in. the license key must be registered on each node. When you install NetBackup for DB2. Decide which of the inactive nodes to install the software on first. To view or add license keys. perform one of the following actions: ■ From the master server or media server. For more information on how to mount a CD-ROM. a Freeze the active NetBackup node. see the NetBackup High Availability Administrator’s Guide. read “Cluster software” on page 21. make sure that the first machine you select is an inactive node. If you want to install the database agent on a clustered NetBackup server.root 4 Verify that a registered and valid license key for NetBackup for DB2 resides on the master server. If the NetBackup master server is part of a NetBackup cluster. run the following command: /usr/openv/netbackup/bin/admincmd/get_license_key When the system prompts you. you log in to the first machine and start the installation process. run the following command: su . 2 b 3 Log in as the root user on the master server or media server. but are not the root user. then install on the active node. 5 .

Installing the agent Installing NetBackup for DB2 23 6 Change the working directory to the CD-ROM directory. Perform this step under the following circumstances: ■ If you want to install the NetBackup for DB2 software on a server that is part of a NetBackup cluster.) 8 (Conditional) Select another node upon which to install the software. Type q to quit selecting options. Type y. If there are any inactive nodes that do not yet have the software installed. After the list is complete. proceed to step 9. For example: . For example: cd /CD_mount_point Run the install script to load and install the software. If you installed the software on all the inactive nodes. ■ 9 (Conditional) Unfreeze the active node. the installation script copies the database agent version files and the install_dbext script to directory /usr/openv/netbackup/dbext. The last step in the installation . any matching NetBackup for DB2 software is automatically loaded. and If you have any nodes that still need the software installed. select the active node and repeat step 3 through step 8 for that node./install a Select the NetBackup Database Agent Software option. select one of these inactive nodes. Select the NetBackup for DB2 option. (These files are tar(1) files compressed with gzip(1). By default. If there are more platforms available. The following prompt appears: Do you want to do a local installation? (y/n) [n] 7 b c d e Type n. If you installed on all the nodes. Perform this step if you want to install the NetBackup for DB2 software on a server that is part of a NetBackup cluster. The install script identifies the types of client software that is loaded during the installation of the NetBackup server. A prompt appears that asks if the list is correct. the script displays a menu that gives you the opportunity to add more client types to the default list. Then repeat step 3 through step 8 for that node.

If you want to perform a new installation and you plan to add clients to a database policy after you install the software. Distribute to selected clients.24 Installing the agent Installing NetBackup for DB2 process is to unfreeze the active node. For information on this method. ■ Note: Make sure that the NetBackup for DB2 version is the same version as the NetBackup client software. To push the software to all clients Note: If you want to push the database agent software from a server that is part of a NetBackup cluster. Pushing the software to all clients Use the following procedure to install or upgrade the database agent software on all clients currently configured in a NetBackup database policy. Unfreeze the active node only after all the software is installed on all nodes. . You can use this procedure only from a master server. type all commands in this procedure from the active NetBackup node. 10 Decide how you want to distribute the NetBackup for DB2 software to the clients. see “Pushing the software to new or selected clients” on page 27.5 at this time. You can install the software on such clients now and configure the policy later. You can use this method whether you want to push from a master server or from a media server. This method also allows you to skip any clients that you do not want to upgrade to 6. For information on how to unfreeze the active node in your specific cluster environment. Use one of the following methods whether you want to upgrade clients in an existing environment or you want to perform a new installation: ■ Distribute to all clients currently specified in the database policy. This method distributes the NetBackup for DB2 software to selected clients only. This method distributes the NetBackup for DB2 software to all clients that are currently included in the database policy. For information on this method. see the NetBackup High Availability Administrator’s Guide. You can use this method only if you want to push from a master server. see “Pushing the software to all clients” on page 24.

use “Pushing the software to new or selected clients” on page 27. time. If the client list contains only individual node names. Do one of the following: ■ /usr/openv/netbackup/bin/update_dbclientsDB2 ALL ALL 2 b To exit this procedure if there are two or more clients. To exit this procedure if there is only one client. The TMPDIR environment variable is defined as /tmp. Check the client list. proceed to the following step. and process identifier information. use “Pushing the software to new or selected clients” on page 27. The host names of the clients must be the clients’ individual node names. It writes the entire list to $TMPDIR/NB_DBCLIENT_LIST. They cannot be virtual names. you cannot complete this procedure. .Installing the agent Installing NetBackup for DB2 25 Note: If you want to push the database agent software from a server that is part of a NetBackup cluster to an inactive node in the cluster. Then type n to stop the upgrade and exit from this installation dialog box. The update_dbclients command compiles a list of clients that it detects are included in the policy.identifier. you need to force the installation to the inactive node. To install the software in this situation.domainname. The format can be either hostname or hostname. if any. It presents this list to you. a Locate the client list. update_dbclients writes the first 9 to standard output. If 9 or fewer clients are in the client list. 1 Run the update_dbclients command to launch the installation script. The hostname(1) and the domainname(1) commands return the correct value for the individual node names. press the Enter key. If 10 or more clients are on the client list. ■ c Check the skipped client list. If the client list contains virtual names. To install the software in this situation. update_dbclients displays all the client names. identifier is a mix of date. type n. Type the following command: Examine the client list that the update_dbclients command returns.

. it displays the following prompt: Enter the number of simultaneous updates you wish to take place. update_dbclients starts the number of updates that you specify. This number may be less than the total number of client updates to be performed. The database agent software for that client type was not loaded onto the server. the max value is 30. Such clients are skipped for one or more of the following reasons: ■ The client is a PC client. it does not include the name of that client in the client list. no clients were skipped. If so. Indicate a number that is greater or equal to 1 and less than or equal to the max. You cannot install or upgrade NetBackup for DB2 on a PC client from a UNIX server. The TMPDIR environment variable is defined as /tmp. 4 Indicate whether or not you want to upgrade the clients at this time. The skipped client list is in $TMPDIR/skipped_clients. ■ ■ ■ 3 (Conditional) Specify the number of simultaneous client updates. If no file is present. new updates start as the previous updates finish until all of the updates have been completed.max] (default: dflt) max The maximum number of simultaneous updates that is allowed. then press Enter.) The client does not belong to the database policy type. if three clients are to be updated. You can specify a different number of simultaneous updates. The database agent does not support the client's platform type. The value that is displayed ranges from 1 to 30. the installation software displays the number of updates that are required to distribute the software to the clients. If the software detects the need to update more than one client. press Enter. The value that is displayed ranges from 1 to 15. where PID is the process identifier. If 50 clients are to be updated. The number the program uses if you press Enter without specifying a number. the max and dflt values are 3.PID. and the dflt value is 15. (In the procedure “To load the database agent files on a UNIX server” on page 22. For example. [1 . dflt If you want the installation software to perform dflt simultaneous updates. If you want to update more than one client.26 Installing the agent Installing NetBackup for DB2 If update_dbclients detects that it cannot update a particular client.

■ ■ Pushing the software to new or selected clients Use the following procedure if you want to install or upgrade the NetBackup for DB2 software on selected clients. If you type n. time. you continue the installation process. The install_dbext script runs on each client. You can use this file later as the argument to the -ClientList parameter. The following actions occur: ■ The update_dbclients command distributes the software to the client. The TMPDIR environment variable is defined as /tmp. By default. followed by this question: Do you want to upgrade the clients now? (y/n) [y] Type y or n for the prompt. If it is successful. update_dbclients quits and leaves the list of clients it would have updated in a file. You can use this procedure from either a master server or from a media server. If you type y. update_dbclients invokes the install_dbext script on the client. The update_dbclients command displays a note on whether the update was successful for each client. If the update failed for any client. Note: If you want to push the database agent software from a server that is part of a NetBackup cluster to an inactive node in the cluster. the installation software writes the client list to $TMPDIR/NB_DBCLIENT_LIST. where identifier is a mix of date.Installing the agent Installing NetBackup for DB2 27 Based on your answer. it displays a file name that contains a complete log of what happened for each client. the time it takes to update the clients appears. type all commands in this procedure from the active NetBackup node. . If it is successful. To push the software to new or selected clients Note: If you want to push the NetBackup for DB2 software from a server that is part of a NetBackup cluster. When the update_dbclients command completes. and process identifier information.identifier. you need to force the installation to the inactive node. it writes a version file in directory /usr/openv/share that contains the version of NetBackup for DB2 that was installed. examine the log file to determine the problem.

type the following command: ./admincmd/bpplclients -allunique -noheader -M ms_name > file ms_name file Name of the NetBackup master server in this environment. op_system client For example. For examples. bpplclients writes output to file in the following format: hardware op_system client hardware The hardware name. type the ls(1) command in directory /usr/openv/netbackup/client. For examples. type the following command to start the daemon: /usr/openv/netbackup/bin/initbpdbm Type the following command to change to the NetBackup bin directory: cd /usr/openv/netbackup/bin Use the bpplclients(1M) command to create a file that contains a list of clients currently configured in the NetBackup database.28 Installing the agent Installing NetBackup for DB2 1 On the master server. Create file using the same format as that generated by bpplclients. Name of the file to contain the list of unique clients. Edit file to contain only those clients you want to update with NetBackup for DB2 software. The options for this command depend on whether you want to install from a master server or from a media server. Perform this step to change the contents of file. The operating system name. If no clients have been configured in the NetBackup database. type the following command: . file might contain a line like the following: Solaris Solaris8 curry 4 (Optional) Edit file. type the ls(1) command in directory /usr/openv/netbackup/client/hardware. type the following command to ensure that the bpdbm daemon is running: /usr/openv/netbackup/bin/bpps If the output shows that the bpdbm daemon is not running. file is empty./admincmd/bpplclients -allunique -noheader > file ■ If you want to perform the install from a media server. . The name of the client. as follows: ■ 2 3 If you want to perform the install from the master server.

When you install NetBackup for DB2. (Conditional) Perform this step only if you want to install on a server that is part of a NetBackup cluster. The local machine can be a client or a server that also happens to be a NetBackup for DB2 client. see step 2 of the procedure “To push the software to all clients” on page 24. To install NetBackup for DB2 on a local machine 1 Review “Verifying the installation prerequisites” on page 19. read “Cluster software” on page 21. 6 Note: You do not need to run the cluster_config script after you install the database agent on a server that is part of a NetBackup cluster. For information on how to freeze the active node in your specific cluster environment. It asks you to confirm actions during the update process and presents options to you if there are choices to be made. To install the database agent on a clustered NetBackup server. For more information. They cannot be virtual names. 2 b . The command installs the software on the clients that are listed in file./update_dbclients DB2 -ClientList file Answer questions as prompted by the update_dbclients command. see the NetBackup High Availability Administrator’s Guide. The hostname(1) and the domainname(1) commands return the correct value for the individual node names. the database agent files are extracted and installed.domainname. The format can be either hostname or hostname. Local installation of NetBackup for DB2 During a local installation. For example: .Installing the agent Installing NetBackup for DB2 29 The host names of the clients must be the clients’ individual node names. Decide which of the inactive nodes to install the software on first. Specify the file you created in step 3 as the argument to update_dbclients. then install on the active node. The update_dbclients command initiates a dialog with you. 5 Run the update_dbclients command to install the software. a Freeze the active NetBackup node. install the software on all the inactive nodes first.

. Perform this step if the local machine is a NetBackup client. Mount the CD-ROM. su . perform one of the following actions: ■ 4 5 From the master server or media server.30 Installing the agent Installing NetBackup for DB2 In the next step.root (Conditional) Log into a media server or the master server. Change the working directory to the CD-ROM directory. Verify that a registered and valid license key for NetBackup for DB2 resides on the master server. 6 7 8 9 Note: Make sure that the NetBackup for DB2 version is the same version as the NetBackup client software. To view or add license keys. If the NetBackup master server is part of a NetBackup cluster. but are not the root user. you log in to the first machine and start the installation process. You can obtain master server license information from either the master server or the media server. For more information on how to mount a CD-ROM. make sure that the first machine you select is an inactive node. see the NetBackup Installation Guide. ■ Open the NetBackup administration console and choose Help > License Keys. If you are already logged in. (Conditional) Log out of the media server or master server and return to the local client. For example: cd /CD_mount_point Run the install script to load and install the software. the license key must be registered on each node. type the following command: /usr/openv/netbackup/bin/admincmd/get_license_key When the system prompts you. run the following command. type the host name of the NetBackup master server. Because you need to perform the installation on all inactive nodes first. Perform this step if you logged into a media server or the master server in step 4 to verify the license. 3 Log in as the root user on the machine.

/install a Select the NetBackup Database Agent Software option. it writes a version file in directory /usr/openv/share that contains the version of NetBackup for DB2 that was installed. a tar(1) file compressed with gzip(1). select one of these inactive nodes. proceed to step 11. ■ ■ f Type q to quit from the script. If there are any inactive nodes that do not yet have the software installed. If you installed the software on all the inactive nodes. If install_dbext completes successfully. A menu of all database agents available on the CD-ROM appears. Note: You do not need to run the cluster_config script after you install NetBackup for DB2 on a server that is part of a NetBackup cluster. The following actions occur: ■ The script writes the version file. and If you have any nodes that still need the software installed. select the active node and repeat step 3 through step 10 for that node.Installing the agent Installing NetBackup for DB2 31 Type the following command: . ■ 11 (Conditional) Unfreeze the active node. The following prompt appears: Do you want to do a local installation? (y/n) [n] b c d e Type y. Perform this step under the following circumstances: ■ If you want to install the NetBackup for DB2 software on a server that is part of a NetBackup cluster. Select the NetBackup for DB2 option. The install script automatically runs the install_dbext script. A prompt appears that asks if the list is correct. Type q to quit if you do not want to select other options. Then repeat step 3 through step 10 for that node. 10 (Conditional) Select another node upon which to install the software. Type y. . and the install_dbext script to directory /usr/openv/netbackup/dbext. If you installed on all the nodes.

Note: This manual uses the terms user exit and VENDOR to describe the methods that DB2 supports for log archiving. This method uses the DB2 backup and restore API. Specifying log archiving DB2 can write database archive logs in several different ways. The syntax is as follows: LOGARCHMETH1=VENDOR:/usr/openv/netbackup/bin/library For library refer to “NBDB2 vendor I/O library” on page 14. For a rollforward recovery. note the following: ■ The archive logs are backed up as part of the database. If you use this method. You can use the procedure in this section to specify an archive method in DB2. you need both the database itself and the archive logs from the backup media. or you can use the information in the procedure to determine how your established archive method will interact with NetBackup for DB2. so you do not need a separate NetBackup policy for them. NetBackup for DB2 backs up and restores the archive log files as a byte stream. ■ . For information on how to unfreeze the active node in your specific cluster environment. VENDOR archiving Only the DB2 8.32 Installing the agent Specifying log archiving Perform this step to install the NetBackup for DB2 software on a server that is part of a NetBackup cluster. Archive methods The following sections describe the VENDOR and user exit archive methods. Unfreeze the active node only after all the software has been installed on all nodes. The procedure in this section explains how to specify a method for DB2 to use when backing up the DB2 archive logs. The last step in the installation process is to unfreeze the active node. Read “NetBackup for DB2 terminology notes” on page 16 to ensure that you understand how the terms are used in this manual. see the NetBackup High Availability Administrator’s Guide.2 release allows you to specify this log archive method.

at a time when minimal changes are being made to the DB2 database. See “Archive methods” on page 32. 2 .Installing the agent Specifying log archiving 33 User exit archiving Any DB2 release allows you to specify this archive method. DB2 supports different syntax for these parameters in different releases. and LOGARCHMETH1 keywords. The syntax for specifying the user exit method differs across DB2 releases. DB2 supports this archive method only for backward compatibility. there are different methods for specifying these parameters. Perform this procedure. The DB2 parameters that specify an archive log method include the LOGRETAIN. ■ ■ NetBackup for DB2 backs up and restores the archive log files as individual files. You may also want to create a separate Netbackup Standard policy for backing up these directories. and the configuration procedures in the next chapter. or on the specific syntax for specifying these parameters. If your DB2 configuration uses the USEREXIT or LOGRETAIN keywords in its configuration parameters. ■ Specifying an archive method To specify an archive method 1 Quiesce the DB2 database. USEREXIT. note the following: ■ Configure one of the following: ■ A separate NetBackup Standard policy for backing up the archive logs or Directories for the user exit program to use when copying the archive logs. Decide on a method for specifying the archive logs. Depending on the DB2 release you are using. see your DB2 documentation. The configuration procedures in the next chapter explain how to perform these tasks. NetBackup for DB2 includes a user exit program that you can use to back up the archive logs. Another alternative to the preceding bullet items would be to modify an existing Netbackup Standard policy with a user backup schedule to include the archive log directories. For more information on the effects of these parameters within DB2. DB2 provides several methods for backing up its archive log files. The effects of the log archiving on NetBackup for DB2 operations depends on the method you choose.

edit your DB2 configuration specifications to specify the log archiving method.34 Installing the agent Configuring DB2 to work with NetBackup 3 Verify your DB2 configuration to ensure that the appropriate log archiving method for your site is enabled. For example: /home/db2inst1 The following appears: Do you have other DB2 instances? (y/n) [n] 4 Add other DB2 instances as appropriate. or enter n if you are finished. The linking procedure ensures that all new database instances are included in the NetBackup for DB2 backup operations. For example: cd /usr/openv/netbackup/bin Invoke the linking command. The linking is complete. If necessary./db2_config The following appears: Please specify the DB2 instance home path name: 2 3 Supply the appropriate home path name and press Enter. Adding new DB2 instances Complete the procedure described in “Configuring DB2 to work with NetBackup” on page 34 if you add a new DB2 instance after NetBackup for DB2 has been installed. Enter the following: . . Configuring DB2 to work with NetBackup Use this procedure at the following times: ■ ■ ■ After specifying a log archiving method in DB2 After installing NetBackup for DB2 Whenever you create a new DB2 instance To configure DB2 to work with NetBackup 1 Use the cd(1) command to change to the NetBackup /bin directory.

After you complete the installation. See “Installing the agent” on page 19. complete the installation procedure. NetBackup supports a Windows interface for Windows master servers. In addition.Chapter 3 Configuration This chapter contains the following topics: ■ ■ ■ ■ ■ ■ ■ ■ ■ “User interface terminology notes” on page 37 “Configuring the Maximum jobs per client” on page 38 “Configuring a backup policy for a database” on page 39 “Backing up archive log files with the user exit program” on page 51 “Configuring a policy to back up the configuration files” on page 54 “Configuring the runtime environment” on page 55 “Creating templates and shell scripts” on page 63 “Testing configuration settings” on page 72 “Backing up the database and archive logs” on page 73 Before attempting to configure NetBackup for DB2. follow the procedures in this chapter to configure your environment. the console is available in one or two forms. User interface terminology notes You can perform many of the configuration steps in this chapter from the NetBackup administration console on the master server. NetBackup supports a Java interface for both Windows and UNIX master servers. . Depending on your master server’s platform.

The number of policies of any type that can back up this client at the same time. The Maximum jobs per client specifies the maximum number of concurrent backups that are allowed per client. a client can be in two policies in order to back up two different databases. expand Host Properties. Change the Maximum jobs per client value to 99. This number can be greater than one. For example. You might need to experiment with different values at your site. In the right pane. double-click the server icon. number_of_policies Tip: Enter a large enough value for the Maximum jobs per client attribute to meet the number of jobs that DB2 runs. Select Master Server. The default is 1. this manual uses the following headings to identify the interface being described: From the Windows interface: From the Java interface: Configuring the Maximum jobs per client The following procedure shows how to set the Maximum jobs per client attribute. . Click Global Attributes. Each separate session starts a new backup job on the client. These backup windows can overlap. If interface differences exist in the configuration procedures.36 Configuration Configuring the Maximum jobs per client The Java and Windows interfaces are nearly identical. To configure the maximum jobs per client 1 2 3 4 5 In the left pane of the NetBackup administration console. You can use the following formula to calculate a smaller value: Maximum jobs per client = number_of_sessions X number_of_policies number_of_sessions The number of backup sessions between the backup server and NetBackup on the client.

Most requirements for database policies are the same as for file system backups.Configuration Configuring a backup policy for a database 37 Configuring a backup policy for a database A backup policy for a database defines the backup criteria for a specific group of one or more clients. see the NetBackup Administrator’s Guide. Table 3-3 Planning policies and schedules Specify this type of policy: DB2 For this type of data: DB2 database Specify this type of schedule: For any database backup: ■ Application Backup (Default-Application-Backup) For scheduled backups: ■ ■ ■ Automatic Full Backup Automatic Differential Incremental Backup Automatic Cumulative Incremental Backup For any backups that use Snapshot Client: ■ ■ ■ Automatic Full Backup Automatic Differential Incremental Backup Automatic Cumulative Incremental Backup . These criteria include: ■ ■ ■ ■ ■ Storage unit and media to use Policy attributes Backup schedules Clients to be backed up Backup templates or script files to be run on the clients To back up a database environment. In addition to the policy attributes for this database agent. you need to define at least one DB2 policy with the appropriate schedules. other attributes are available that you should consider. A configuration can have a single policy that includes all clients. Volume I. For configuration instructions and information on all the attributes available. Planning NetBackup for DB2 policies and schedules Table 3-3 on page 37 summarizes the types of NetBackup policies and schedules to create. some of which include only one client. or there can be many policies.

See “Configuration for a DB2 EEE (DPF) environment” on page 137. in the Policy name field.38 Configuration Configuring a backup policy for a database Table 3-3 Planning policies and schedules (continued) Specify this type of policy: DB2 For this type of data: DB2 transaction logs (if using VENDOR) DB2 transaction logs (if using user exit) Specify this type of schedule: ■ Application Backup (Default-Application-Backup) Standard Required Schedule: ■ User Backup DB2 configuration files Standard Optional schedules: ■ ■ Full Backup User Backup These schedules are recommended for backing up your configuration files in case of a disaster. Start the NetBackup Administration console. At a minimum. click Policies. right-click the master server. From the Java interface: In the left pane. choose the one on which you want to add the policy. In the All Policies pane. To configure a backup policy for databases 1 2 3 4 Log on to the master server as administrator (Windows) or root (UNIX). type a unique name for the new policy. 5 6 . Click OK. see your database documentation. there is information on how to create policies for the catalog nodes and the noncatalog nodes. For information about files to include in this policy. If your site has more than one master server. right-click Policies and choose New Policy. From the Windows interface: In the left pane. specify one DB2 policy with an Application Backup schedule. In the Add a New Policy dialog box. and click New Policy. If you use DB2 EEE. Adding a new policy These instructions describe how to add a new backup policy for a database.

The database agent policy type does not appear in the drop-down list unless your master server has a license key for the database agent. see the NetBackup Administrator’s Guide. Description of attributes With a few exceptions. see “Adding backup selections” on page 48. Volume I. Table 3-4 Attribute Policy type Policy attribute descriptions Description Determines the types of clients that can be in the policy. in the Policy type list. For information about how to configure advanced backup methods. NetBackup manages a database backup like a file system backup. click OK. Add other policy information. Complete the entries on the Attributes tab. the Keyword phrase entry is ignored. clients. see “Adding clients” on page 47. To use the database agent. Table 3-4 shows the policy attributes that are different for DB2 backups. In some cases the policy type determines the types of backups that NetBackup can perform on those clients. select the DB2 policy type. see “Adding schedules” on page 42. To add templates or scripts to the backup selections list. you must define at least one policy of type that is DB2. see “Description of attributes” on page 29. To add clients. For NetBackup for DB2. 10 When you have added all the schedules.Configuration Configuring a backup policy for a database 39 7 In the Add a New Policy or Change Policy dialog box. For more information. ■ ■ ■ 8 9 To add schedules. For more information on policy attributes. Keyword phrase Snapshot Client . This information is used when you add a new policy. and backup selections you need. Other policy attributes vary according to your specific backup strategy and system configuration. see “NetBackup for DB2 with Snapshot Client” on page 99.

Double-click the schedule that is named Default-Application-Backup. To access the Policy dialog box. assume the following: ■ 2 3 Users perform database backup operations during business hours. For example. These schedules initiate automatic backups and specify when a user can initiate operations. See “Schedule properties” on page 46. Tips for configuring schedules ■ Set the window for the Application Backup schedule for 24 hours per day. . double-click the policy name in the Policies list in the NetBackup administration console. This window ensures that your operations are never locked out due to the Application Backup schedule. click the Schedules tab. The backup window for an Application Backup schedule must encompass the time period during which all scheduled jobs and unscheduled jobs can occur. You cannot perform backups if this type of schedule is not included in the policy. Specify the other properties for the schedule. named Default-Application-Backup. seven days per week.40 Configuration Configuring a backup policy for a database Adding schedules Each policy has its own set of schedules. when you configure a new database policy. 08:00 to 13:00. including those started automatically. Configuring an Application Backup schedule A database backup requires an Application Backup schedule. This window is necessary because the Application Backup schedule starts the processes that are required for all database backups. A database backup has two types of schedules: Application Backup and Automatic Backup. To configure an Application Backup schedule 1 In the Policy dialog box. The database agent automatically creates this schedule.

The time during which a NetBackup operation can be initiated. or if you use Snapshot Client features. . ■ Table 3-5 Type of backup Application Backup Example settings for an Application Backup schedule Schedule settings Retention Description Settings The length of time the backup images 2 weeks are retained in the NetBackup catalog for restore. Sunday through Saturday 00:08:00 . Table 3-5 on page 41 shows this example schedule. See Schedule properties. Specify the other properties for the schedule.Configuration Configuring a backup policy for a database 41 The Automatic backups that use this policy start between 18:00 and 22:00. Click New. the Application Backup schedule must have a start time of 0800 and a duration of 14 hours. In this scenario. To configure an Automatic Backup schedule 1 2 3 4 5 On the Policy dialog box. which follows this procedure. click the Schedules tab. Select the Type of backup.22:00:00 Backup Window Note: Specify the Application Backup schedule name in the $DB2_Instance_Home/db2. See “Types of backup schedules” on page 44. Configuring Automatic Backup schedules You also need one or more automatic backup schedules if you plan to have NetBackup perform automatic backups.conf file on the client. Specify a unique name for the schedule.

42 Configuration Configuring a backup policy for a database Table 3-6 shows example settings for an automatic backup schedule.22:00:00 6 If this schedule is the last schedule. Settings 2 weeks Frequency every week Backup Window Sunday. which NetBackup uses to determine if the schedule needs to be run. Table 3-6 Type of backup Automatic Full Backup Example settings for an Automatic Backup schedule Schedule settings Retention Description The length of time to store the record of a backup. . The time during which a NetBackup operation can be initiated. Frequency determines how often a backup should be performed. repeat step 1 through step 6. The length of time to store the record of a backup. Frequency determines how often a backup should be performed. 1 week Frequency every day Backup Window Sunday through Saturday 18:00:00 . which NetBackup uses to determine if the schedule needs to be run. The time during which a NetBackup operation can be initiated. which NetBackup uses to determine if the schedule needs to be run. click OK. Frequency determines how often a backup should be performed. 18:00:00 22:00:00 1 week Automatic Differential Incremental Backup Retention Frequency every day Backup Window Sunday through Saturday 18:00:00 . The time during which a NetBackup operation can be initiated. To add other schedules.22:00:00 Automatic Cumulative Incremental Backup Retention The length of time to store the record of a backup.

If you use the Snapshot Client. These operations include those initiated from the client and those initiated by an automatic schedule on the master server. The backup contains a copy of the database data that has changed since the most recent full backup. this type of backup and the block-level incremental (BLI) backup are the only types that are supported. For example. If you want to perform a stream-based Automatic Full Backup. Be aware that when an automatic schedule invokes a script that a user authored. This type of backup is supported only for stream-based backups and for block-level incremental (BLI) backups. Note that a full backup is not the same as a whole database backup. also specify an Automatic Full Backup schedule for scheduled NetBackup operations. Automatic Cumulative Incremental Backup An incremental backup that is cumulative. Full is an indicator that the backup is not one of the incremental backup types. The Default-Application-Backup schedule is configured automatically as an Application Backup schedule. The backup includes only the data that has changed since the last backup of any type. . The backup contains only the data that changed since the last full backup. This type of backup corresponds to the INCREMENTAL option of the DB2 BACKUP command. The backup contains a copy of the database data that has changed since the most recent backup. full or otherwise. Table 3-7 Backup type Application Backup DB2 backup types Description The Application Backup schedule enables user-controlled NetBackup operations from the client. Using backup schedules. NetBackup does not provide safeguards to prevent unusual behavior. templates. An Automatic Full Backup contains a copy of all the data. and scripts Later in this chapter you configure templates or scripts to use when you perform backups and restores. Automatic Full Backup Automatic Differential Incremental Backup An incremental backup that is not cumulative. This type of backup corresponds to the INCREMENTAL DELTA option of the DB2 BACKUP command.Configuration Configuring a backup policy for a database 43 Types of backup schedules Table 3-7 shows the backup schedules you can specify. This type of backup takes less time and space than a full backup. Configure at least one Application Backup schedule for each database policy. if an automatic backup schedule runs a restore or recovery script. NetBackup uses the Application Backup schedule when the user starts a backup manually. Automatic Cumulative Incremental backups are supported only for stream-based backups and block-level incremental (BLI) backups. This type of backup takes less space and time than a cumulative incremental backup.

44 Configuration Configuring a backup policy for a database To help guard against such mistakes. For more information about backup schedules and Snapshot Client features. This setting is used only for scheduled backups. Typically. see “NetBackup for DB2 with Snapshot Client” on page 99. You are responsible for specifying a template with the correct operation type (backup or restore) in the policy. When a template runs. Table 3-8 Property Type of backup Description of schedule properties Description Specifies the type of backup that this schedule controls. The selection list shows only the backup types that apply to the policy you want to configure. or recurring days of the month. Schedule properties Some of the schedule properties have a different meaning for database backups than for a regular file system backup. If you use the Snapshot Client option. incremental backups have a shorter frequency than full backups. For more information. Calendar . It is not used for user-directed backups. Table 3-8 explains the schedule properties. see “Types of backup schedules” on page 44. assume that the frequency is seven days and a successful backup occurs on Wednesday. recurring week days. Frequency specifies the period of time that can elapse until the next backup or archive operation begins on this schedule. Backup schedules and Snapshot Client features The information in “Types of backup schedules” on page 44 pertains to stream-based backups. The Calendar option allows you to schedule backup operations that are based on specific dates. For example. use a template instead of a script whenever possible. it detects the backup type on the schedule. Frequency This setting is used only for scheduled backups and not for user-directed backups. be aware that some of the information in that table may differ if you use certain Snapshot Client features. The next full backup does not occur until the following Wednesday.

clients you want to add must have the following software installed: ■ ■ ■ ■ DB2 NetBackup client or server NetBackup for DB2 The backup or restore script(s) (unless you are using templates) . Multiple copies If you want to specify multiple copies of a backup for the policy. if the frequency setting is set to one week. set the retention period to be more than one week. For example. Adding clients The client list enumerates the clients on which your DB2 scripts are run during an automatic backup. Frequency-based scheduling Set a retention period that is longer than the frequency setting for the schedule. the scheduled backup frequency is unpredictable. consult the NetBackup Administrator’s Guide. For a database policy. if you set the retention period to be longer than necessary. For more information on schedule properties. Calendar-based scheduling The retention period setting is not significant for calendar-based scheduling. The NetBackup scheduler compares the latest record of the Automatic Backup schedule to the frequency of that Automatic Backup schedule to determine whether a backup is due. Automatic Differential Incremental Backup. The retention period for an Automatic Full Backup. Volume I.Configuration Configuring a backup policy for a database 45 Table 3-8 Property Retention Description of schedule properties (continued) Description The retention period for an Application Backup schedule refers to the length of time that NetBackup keeps backup images. A NetBackup client must be in at least one policy but can be in more than one. or Automatic Cumulative Incremental Backup schedule controls how long NetBackup keeps records of when scheduled backups have occurred. the NetBackup catalog accumulates unnecessary records. Other schedule properties vary according to your specific backup strategy and system configuration. This means that if you set the retention period to expire the record too early. configure Multiple copies on the Application Backup schedule. However.

Note that templates do not reside on the clients. To access the Policy dialog box. From the Windows interface ■ 2 3 Type the name of the client and press Enter. For example. in a Standard or Windows-NT policy.46 Configuration Configuring a backup policy for a database To add clients to a policy 1 In the Policy dialog box. Scripts can reside in any location. Templates reside on the NetBackup master server. NetBackup installs sample scripts when you install the software. OR Click the Browse for Computer button to choose the client from the network. Write the scripts to a location ■ . Enter the name of the client you want to add. click OK. Click New. the list contains files and directories to be backed up. Rules for templates or scripts Observe the following when using templates or scripts: ■ Make sure the scripts reside on each client in the client list. a dialog box displays so you can specify this information. If NetBackup cannot detect the hardware and operating system. Adding backup selections The backup selections list in a database policy has a different meaning than for non-database policies. If this client is the last client. you specify templates or scripts to be run. specify the virtual DB2 name as the client name. type the name of the client you want to add. repeat step 2 and step 3. double-click the policy name in the Policies list in the NetBackup administration console. From the Java interface ■ a b 4 5 In the Client name field. and you can modify these scripts for your own use. Choose the Hardware and operating system type and click Add. In a database policy. Make sure that NetBackup can access the location you choose and that NetBackup can run the scripts. To add another client. click the Clients tab. If DB2 is installed in a NetBackup cluster.

a Choose a template from the drop-down Script or Template list or type the name of a template. Click the Backup Selections tab. These templates or scripts are run for manual backups and for Automatic Full Backup. make sure that the scripts reside in a location that is available after a failover. This way future NetBackup installations do not overwrite your site’s scripts. see “Creating templates and shell scripts” on page 63 Adding templates or scripts to the backup selections list The following procedures describe how to add templates or scripts to the backup selections list using the Java interface and using the Windows interface.tpl extension. Specify the names of the templates that you want NetBackup to use. Repeat step a and step b to add any other templates. double-click the policy name in the Policies list in the NetBackup administration console. or Automatic Cumulative Incremental Backup schedules as specified under the Schedules tab. Click New. Automatic Differential Incremental Backup. Make sure that the template or script resides on the client before you try to add it to the backup selections list. Include the . Caution: Be sure to specify the correct template and script names in the backup selections list to prevent an error or possibly a wrong operation.tpl Click Add. NetBackup runs the templates or scripts in the order that the templates or scripts appear in the backup selections list. To add templates or scripts to the backup selections list from the Java interface 1 Open the Policy dialog box. Do not include the full path.Configuration Configuring a backup policy for a database 47 outside of the original installation location. To access the Policy dialog box. Add templates or scripts to the backup selections list only if you want to set up a policy for automatic backups. ■ If you use NetBackup for DB2 in a NetBackup server cluster. 2 3 4 b c . For more information on backup templates and scripts. For example: weekly_full_backup.

Click OK. Click OK. For example: /backup_scripts/db/cold_backup. For example: /backup_scripts/db/cold_backup. To add templates or scripts to the backup selections list from the Windows interface 1 In the Policy dialog box. For example: weekly_full_backup. Click New.tpl Click the Template button. type the full path name of a script on the client. a In the Script: box. double-click the policy name in the Policies list in the NetBackup administration console. Use one of the following methods: ■ 2 3 Type the name of the template with the .tpl extension. Use one of the following methods: ■ Type the full path name of the script on the client. click the Backup Selections tab. From the Template list. ■ 4 Specify the names of the scripts you want NetBackup to use. Repeat step a and step b to add any other scripts. Specify the names of the templates you want NetBackup to use. To access the Policy dialog box. Navigate to and select the script file. .sh b c 6 Click Add to add the script to the list. 5 Click OK.sh ■ Click the Remote Folder button. Do not include the full path.48 Configuration Configuring a backup policy for a database 5 Specify the names of the scripts that you want NetBackup to use. choose the correct template. Click OK.

conf file (user exit program)” on page 55. (The user exit program is db2uext2.) ■ Save archive log files directly with NetBackup. To back up archive log files in this way. and click Make Master. click the server name in the Additional Servers list. and Restore interface for the DB2 client. This can cause backups and restores to fail.) . In the Properties pane. configure an MS-Windows-NT or Standard policy with a User Backup schedule. you must set this value in the client properties for the DB2 client on the master server.Configuration Specifying the master server for a NetBackup for DB2 client 49 Specifying the master server for a NetBackup for DB2 client After you add your NetBackup for DB2 client to a policy.conf. Click OK to save your change. To specify the master server in the NetBackup administration console 1 2 3 4 5 6 In the left pane. If the correct server does not display. click Servers. db2. Double click the NetBackup for DB2 client name in the Clients list. (See “Configuring a policy to back up the archive logs” on page 52. (See “Creating a db2. specify the master server for the client in the NetBackup administration console. Click Clients. Verify that the correct server displays in the Master Server field. The Client Properties dialog opens. expand Host Properties. Archive.) Then specify the ARCFUNC SAVE keywords in the configuration file. click Add to add a new server name to the list. Note: Do not specify the master server in the Backup. Alternatively. 7 Backing up archive log files with the user exit program You can configure the user exit program to back up the archive logs in one of the following ways. To specify the master server for your NetBackup for DB2 client.

see the NetBackup Administrator's Guide.conf file (user exit program)” on page 55. as follows: ■ If you specify ARCFUNC SAVE. NetBackup backs up the archive logs according to the policy and schedule you specify.conf file. configure an MS-Windows-NT or Standard policy with a User Archive schedule (this schedule is optional). You do not need to perform this procedure if you use the VENDOR method to back up your archive log files.50 Configuration Backing up archive log files with the user exit program ■ Copy archive log files to another directory for later backup by NetBackup. If DB2 later issues a ROLLFORWARD request. Follow the instructions here if you want to use the user exit program with the ARCFUNC SAVE command. Specifically. Advanced users prefer this approach because of performance and flexibility benefits. In environments with VENDOR in effect. The disk to which the archive logs are copied eventually fills with archived log files. At restoration time.) Specify the ARCFUNC COPY keywords in the db2. ■ Configuring a policy to back up the archive logs This section describes how to create a policy to back up the archive log files directly to tape. In this case. This method requires some user intervention during the recovery. the user exit program looks for the archive logs on a backup volume. To back up archive log files in this way. The sequential recovery can be slow if there are numerous. Whether to specify ARCFUNC SAVE or ARCFUNC COPY depends on the amount of user intervention you intend to provide. For information about how to restore files to disk. later you can perform a user archive to archive all the files in the ARCDIR directory. To free disk space. large log files. . If you specify ARCFUNC COPY. no user intervention is required. the user exit program copies the file to an archive directory. (See “Configuring a policy to archive the archive logs” on page 53. NetBackup ignores the information that pertains to these commands.) You can coordinate the copy of the log files to a directory with a user archive.conf file. Note: Do not specify ARCFUNC SAVE or ARCFUNC COPY if the VENDOR DB2 configuration parameter is in effect. you must restore these files before the rollforward. NetBackup copies the archive logs to the location that is specified on the ARCDIR statement in the db2. (See “Creating a db2. Most users want to configure a user archive schedule so they can archive the entire ARCDIR directory to NetBackup volumes.

add the virtual host name to the client list. On the Schedules tab. Note: No Backup Selections list is necessary for this policy because it has a User Backup schedule. See “Creating a db2. 7 On the Clients tab. When you configure the db. Create a new MS-Windows-NT (Windows) or Standard (UNIX) policy type. create a User Backup schedule. To configure a policy to back up the archive logs 1 Log on to the master server as administrator (Windows) or root (UNIX). see the NetBackup Administrator’s Guide. Start the NetBackup Administration console. . 8 9 Note the name of this policy. it deletes the online files after they have been successfully backed up. This schedule must encompass all of the time periods during which DB2 can call the user exit program. add the clients you want to back up.conf file. choose the one on which you want to add the policy. The clients must have the following installed: ■ ■ DB2 NetBackup for DB2 If the client is installed in a NetBackup cluster.Configuration Backing up archive log files with the user exit program 51 To configure a policy to back up the archive logs 1 2 3 4 5 6 Log on to the master server as administrator (Windows) or root (UNIX). It is not an automatic schedule. You do not need to perform this procedure if you use the VENDOR method to back up your archive log files. For more information on user archive schedules. specify the name of the policy you created in this procedure. If your site has more than one master server. When NetBackup performs an archive. Configuring a policy to archive the archive logs This section describes how to create a policy to archive the archive logs in the ARCDIR directory. Follow the instructions here if you want to use the user exit program with the ARCFUNC COPY command. Specify the attributes for the policy.conf file (user exit program)” on page 55.

52 Configuration Configuring a policy to back up the configuration files 2 3 4 5 6 Start the NetBackup Administration console. choose the one on which you want to add the policy. add the virtual host name to the policy. add an entry that includes the full path name of the directory that contains the configuration files. If your site has more than one master server. Note: No Backup Selections list is necessary for this policy because it has a User Archive schedule. 7 Specify the clients to be backed up. . If you want users to be able to back up configuration files manually. In the Backup Selections list. On the Schedules tab. The clients must have the following installed: ■ ■ DB2 NetBackup for DB2 If the client is installed in a NetBackup cluster. create a Full Backup schedule. Specify the attributes for the policy. This schedule must encompass all of the time periods during which DB2 can call the user exit program. To back up configuration files 1 2 3 4 Create an MS-Windows-NT (Windows) or Standard (UNIX) policy. Specify the attributes for the policy. It is not an automatic schedule. you also need to create a User Backup schedule. On the Schedules tab. Create a new MS-Windows-NT (Windows) or Standard (UNIX) policy type. create a User Archive schedule. Configuring a policy to back up the configuration files The following procedure shows how to create an automatic backup policy to back up the configuration files.

This file defines how to back up the database and the archive logs. The clients must have the following installed: ■ ■ DB2 NetBackup for DB2 If the client is installed in a NetBackup cluster.conf file (user exit program) The NetBackup for DB2 configuration file. It must be created on each NetBackup for DB2 client.conf file is as follows: $DB2_Instance_Home/db2.conf file. create an object identifier for backing up the database. Configuring the runtime environment This section describes how to create a db2. The following procedures show you how to customize this file.conf 4 In the db2.conf file. See “Configuring a policy to back up the configuration files” on page 54. To create a db2. consists of a series of keywords and values.conf file for your environment. Follow the instructions in this section if you use the user exit program to perform backups.conf. you need to create the policies to back up the archive logs and the configuration files. See “Configuring a policy to archive the archive logs” on page 53.conf that you can customize. Log on to a client computer.conf file for use with the user exit program 1 Before you create the db2. how to configure the bp.Configuration Configuring the runtime environment 53 5 Specify the clients to back up.conf file in a cluster environment. Its location in the sample directory is as follows: /usr/openv/netbackup/ext/db_ext/db2/scripts 2 3 The active location for the db2. db2. and the environment variables NetBackup creates. See “Configuring a policy to back up the archive logs” on page 52. Creating a db2. add the virtual host name to the client list. The installation package installed a file named db2.conf file from its location in the sample directory to its active location. This object identifier starts with the following keyword lines: . Copy the sample db2.

conf file. Example db2. 6 7 8 You may need to add other entries to the db2. see “Example db2. specify the full path to the location from which the archive logs are retrieved.conf file (with ARCFUNC SAVE) Assume that you need to back up a database named SAMPLE and its archive logs.conf file specifies this policy and its application backup . Repeat this procedure on each client computer. specify the name of the MS-Windows-NT or Standard policy for backing up the archive logs. USEREXIT is enabled for database SAMPLE. Or see “Example db2. The first definition in the example db2. Save and close the db2. For an example db2. ■ If you use ARCFUNC COPY: DATABASE SAMPLE OBJECTTYPE ARCHIVE ARCDIR /home/db2inst1/arcdir RETDIR /home/db2inst1/arcdir In the ARCDIR line. The policies are as follows: ■ The DB2_DB_Policy backs up the database.conf file. Typically.conf file (with ARCFUNC SAVE)” on page 56.conf file (with ARCFUNC COPY)” on page 57. 5 In the db2.. Refer to “Keyword summary” on page 59.conf file. create an object identifier for backing up the archive logs. The form depends on how the archive logs are backed up.. In the RETDIR line. the RETDIR location is the same as the ARCDIR location.54 Configuration Configuring the runtime environment DATABASE SAMPLE OBJECTTYPE DATABASE . The policies for database SAMPLE include the required schedules for the backups. specify the full path to the location of the archive logs. specify the User Backup schedule that you created earlier for backing up the archive logs. ■ If you use ARCFUNC SAVE: DATABASE SAMPLE OBJECTTYPE ARCHIVE POLICY STD_TYPE_POL_LOGPOL # a standard type policy SCHEDULE USER_BACKUP_SCHED_LOGSCHED In the POLICY line. In the SCHEDULE line. This policy has an application backup schedule and an automatic backup schedule.conf file.

conf file specifies this policy and its application backup schedule. USEREXIT is enabled for database SAMPLE. DATABASE SAMPLE OBJECTTYPE DATABASE POLICY DB2_DB_Policy SCHEDULE Default-Application-Backup ENDOPER DATABASE SAMPLE OBJECTTYPE ARCHIVE POLICY DB2_Log_Policy SCHEDULE User ARCFUNC SAVE #ARCFUNC COPY #ARCDIR /home/db2inst1/arcdir #RETDIR /home/db2inst1/arcdir ENDOPER Example db2.Configuration Configuring the runtime environment 55 schedule. which is named Default-Application-Backup. ■ The DB2_Log_Policy backs up the archive logs. The policies are as follows: ■ The DB2_DB_Policy backs up the database. This policy has a user backup schedule named User. The ARCFUNC COPY command copies the archive logs to the ARCDIR directory.conf. The first definition in the example db2. The policies for database SAMPLE include the required schedules for the backups. The automatic backup schedule is not specified in db2. which is named Default-Application-Backup. The automatic backup schedule is not specified in db2. This policy has an application backup schedule and an automatic backup schedule.conf file (with ARCFUNC COPY) Assume that you need to back up a database named SAMPLE and its archive logs. ■ DATABASE SAMPLE OBJECTTYPE DATABASE POLICY DB2_DB_Policy SCHEDULE Default-Application-Backup ENDOPER DATABASE SAMPLE OBJECTTYPE ARCHIVE #POLICY DB2_Log_Policy #SCHEDULE User #ARCFUNC SAVE ARCFUNC COPY .conf. The second entry in the example file specifies this policy and its user backup schedule.

56 Configuration Configuring the runtime environment ARCDIR /home/db2inst1/arcdir RETDIR /home/db2inst1/arcdir ENDOPER Creating a db2. . specify a Default-Application-Backup schedule. Log into a client computer.conf file.conf file is as follows: $DB2_Instance_Home/db2. . Copy the sample db2.conf that you can customize. In the SCHEDULE line. you need to create the policies to back up the configuration files.conf file for use with the vendor method 1 Before you create the db2. This file defines how to back up the database and the archive logs. consists of a series of keywords and values. It must be created on each NetBackup for DB2 client. 2 3 5 In the db2.conf 4 In the db2.conf. The following procedures show you how to customize this file. .conf file. The installation package installed a file named db2. db2. specify the name of a DB2 policy.conf file from its location in the sample directory to its active location. DATABASE SAMPLE OBJECTTYPE ARCHIVE POLICY DB2_TYPE_POL_LOGPOL # a DB2 type policy SCHEDULE DEFAULT-APPLICATION-BACKUP In the POLICY line. This policy can be the same policy that you use to back up the database. create an object identifier for backing up the database. Its location in the sample directory is as follows: /usr/openv/netbackup/ext/db_ext/db2/scripts The active location for the db2. See “Configuring a policy to back up the configuration files” on page 54. create an object identifier for backing up the archive logs. Follow the instructions in this section if you use the vendor method to perform backups. This object identifier starts with the following keyword lines: DATABASE SAMPLE OBJECTTYPE DATABASE .conf file (vendor method) The NetBackup for DB2 configuration file.conf file. To create a db2.

conf file. Refer to “Keyword summary” on page 59. The policies are as follows: ■ The DB2_DB_Policy backs up the database.Configuration Configuring the runtime environment 57 6 7 8 You may need to add other entries to the db2. This policy has an application backup schedule and an automatic backup schedule. The DB2_ARCH_Policy backs up the archive logs. This policy has an application backup schedule named Default-Application-Backup. Save and close the db2. which is named Default-Application-Backup. The third entry in the example file specifies this policy and its application backup schedule. The policies for database SAMPLE specify the required schedules for the backups.conf file.conf file (with VENDOR method) Assume that you need to back up a database named SAMPLE and its archive logs. The automatic backup schedule is not specified in db2.conf file specifies this policy and its application backup schedule. refer to “Example db2. The first definition in the example db2.conf. ■ DATABASE SAMPLE OBJECTTYPE DATABASE POLICY DB2_DB_Policy SCHEDULE Default-Application-Backup ENDOPER #DATABASE SAMPLE #OBJECTTYPE ARCHIVE #POLICY DB2_Log_Policy #SCHEDULE User #ARCFUNC SAVE #ARCFUNC COPY #ARCDIR /home/db2inst1/arcdir #RETDIR /home/db2inst1/arcdir #ENDOPER DATABASE SAMPLE OBJECTTYPE ARCHIVE POLICY DB2_ARCH_Policy SCHEDULE Default-Application-Backup ENDOPER . Example db2. Repeat this procedure on each client computer.conf file.conf file (with VENDOR method)” on page 58. The VENDOR method is enabled for database SAMPLE. For an example db2.

Within a definition. the line is treated as a comment. Specify a different POLICY name for the DATABASE object. POLICY is not required if you use ARCFUNC COPY.conf file: ■ A db2. Table 3-9 Keyword value ARCDIR path Keyword value pairs for the db2. No default. All other keywords are optional.58 Configuration Configuring the runtime environment Keyword summary The following list summarizes the rules regarding how to specify keywords in the db2. ■ ■ ■ ■ ■ ■ ■ The db2. When a pound character (#) appears in the first column.conf file accepts the keywords that are described in this section.conf file consists of a series of entries that define a policy and a schedule that are based upon an OBJECTTYPE. Entries are not nested. . The keywords are not case sensitive. Terminate each entry with an ENDOPER keyword.conf file Description Full path to the location of the archive logs. the keyword value pairs can appear in any order. It is also required for the ARCHIVE object if you use ARCFUNC SAVE or if you use the VENDOR method. but their values are. POLICY is required for the DATABASE object. OBJECTTYPE is a required keyword. Also specify a policy name for ARCHIVE object when you use ARCFUNC SAVE. Required if ARCFUNC COPY is also specified.conf file. Within a definition. If VENDOR is configured in your DB2 environment. NetBackup for DB2 ignores the following keywords and keyword phrases: ■ ■ ■ ■ ■ ARCDIR ARCFUNC SAVE ARCFUNC COPY PARTITIONTYPE RAW RETDIR The following table describes the keywords and values that are used in db2.

Required only for alternate restores. If OBJECTTYPE DATABASE or OBJECTTYPE TABLESPACE is specified. No default. then a DB2 policy must be specified. OBJECTTYPE DATABASE. ENDOPER NODE number Signals the end of a definition. If OBJECTTYPE ARCHIVE is specified. . Do not specify this keyword unless you operate within a DB2 Enterprise Extended Edition (EEE) environment. Specify OBJECTTYPE ALTERNATE to note that the succeeding lines pertain to a performing an alternate restore. Specifies that NetBackup search for archive log files backed up from a raw partition during a restore. This policy is only required if you use ARCFUNC SAVE. DATABASE db_name DESTALIAS src_db_name DESTINST src_inst_name DB2 database name. You must specify either ARCFUNC SAVE or ARCFUNC COPY if OBJECTTYPE ARCHIVE is also specified. OBJECTTYPE ARCHIVE. One of OBJECTTYPE ALTERNATE. NetBackup uses the first DB2 policy that is found in the configuration on the NetBackup master server. specify the name of a DB2 policy. Required at the end of each definition. Required only for alternate restores. DESTALIAS specifies the database alias name of the destination database for an alternate restore. ARCFUNC COPY copies archive logs to/from ARCDIR/RETDIR directories. Not Required. Required if ARCFUNC COPY is also specified. Specifies the DB2 node number. In the SCHEDULE line. or OBJECTTYPE TABLESPACE is required in all db2. Specify OBJECTTYPE ARCHIVE for Standard policies. specify the name of the MS-Windows-NT or a Standard policy. DESTINST specifies the instance name of the destination instance for an alternate restore. Not required.conf files. No default. No default.conf file (continued) Description ARCFUNC SAVE saves archive logs to/from NetBackup. OBJECTTYPE ALTERNATE is required if you want to perform an alternate restore. This policy can be the same as the one that you use to back up the database. Name of a NetBackup policy. OBJECTTYPE ALTERNATE OBJECTTYPE ARCHIVE OBJECTTYPE DATABASE OBJECTTYPE TABLESPACE PARTITIONTYPE RAW POLICY pol_name RETDIR path Full path to the location from which the archive logs are retrieved. For the POLICY.Configuration Configuring the runtime environment 59 Table 3-9 Keyword value ARCFUNC SAVE ARCFUNC COPY Keyword value pairs for the db2. If not specified. specify a Default-Application-Backup schedule. No default. Specify OBJECTTYPE DATABASE or OBJECTTYPE TABLESPACE for DB2 policies.

conf files in the following places: ■ In /usr/openv/netbackup/bp. To create a system-wide master bp.conf file (continued) Description NetBackup schedule name in policy. The default is the first application backup in the policy. This is the master bp. Specifications in the user bp. No defaults.conf.conf on the physical client host.conf file override those in the master bp.conf file. Set the CLIENT_NAME entry to the physical host name of the NetBackup for DB2 client. Required only for alternate restores. For example: CLIENT_NAME=client_name Save and close the file.conf files in a cluster environment If you configure NetBackup for DB2 in a cluster environment. SRCALIAS specifies the database alias name of the source database for an alternate restore.conf file The following procedures explain how to create a master bp.60 Configuration Configuring the runtime environment Table 3-9 Keyword value Keyword value pairs for the db2. This file allows other backups to be performed on the host. create NetBackup bp. Use vi(1) or another editor to open file /usr/openv/netbackup/bp.conf configuration file. SCHEDULE sched_name SRCALIAS src_db_name SRCINST src_inst_name Configuring bp. Configuring a master bp. In the DB2 user’s home directory on each virtual host. This allows other backups to be performed on the host.conf file in the DB2 user’s home directory first. 4 . SRCINST specifies the instance name of the source instance for an alternate restore.conf file on the physical client host.conf file 1 2 3 Log into the physical host. ■ NetBackup searches for the bp.

DB2_INCR. Table 3-10 DB2 environment variables Purpose Name of the NetBackup for DB2 policy from which the Automatic Backup was started. This policy is defined in the $DB2_INSTANCE_HOME/db2. The following procedure explains how to create a bp. For example: CLIENT_NAME=client_name Save and close the file. Note: Only Netbackup’s backup and restore templates and scripts use the environment variables in the following table.Configuration Configuring the runtime environment 61 Configuring a user bp. 4 Environment variables The NetBackup automatic scheduler creates the environment variables in the following table when it executes a NetBackup for DB2 backup/restore template or script. Use vi(1) or another editor to open file $DB2_INSTANCE_HOME/bp.conf.conf file on the virtual machine that owns the DB2 instance. the templates and scripts use the POLICY name. the backup and restore commands do not process the DB2_POLICY variable. Instead.conf file on the virtual host 1 2 3 Log into the machine that owns the DB2 instance. To create a system bp. Add a line that sets the CLIENT_NAME entry to the virtual name of the DB2 instance. and DB2_CINC variables within a script to specify a backup type. This variable is set only if the backup is initiated from the server.conf file.conf file in the home directory of the DB2 instance owner take precedence over the same options in the master bp. For example. This policy name is not necessarily the same policy name that is in the db2. These variables are unknown to the DB2 backup and restore commands. Environment variable DB2_POLICY DB2_SERVER .conf file. Name of the NetBackup server. either automatically by the NetBackup scheduler or manually through the administrator interface.conf file NetBackup options found in the bp.conf file. You can use the DB2_FULL.

Sample backup and recovery shell scripts are installed on the client with . you must create a template or shell script. Enabled only if the backup is initiated from the server. The NetBackup for DB2 backup wizard does not support all of the commands and options provided by DB2. Set to 1 for an Automatic Cumulative Incremental Backup. Shell scripts Shell scripts are written by the user and must conform to DB2 and UNIX shell syntax. Set to 1 if this is a scheduled backup type (Automatic Backup). This wizard is initiated from the NetBackup Backup.62 Configuration Creating templates and shell scripts Table 3-10 DB2 environment variables (continued) Purpose Name of the NetBackup schedule. and Restore interface. For more information. You can also use the template or shell script to manually start a backup on the client. Understanding templates and shell scripts The following sections describe templates and shell scripts. Set to 1 for an Automatic Full Backup. You add this template or shell script to the Backup Selections list in the NetBackup for DB2 policy on the master server. Templates The NetBackup for DB2 backup wizard creates backup templates. Archive. see “Creating a backup template using the NetBackup for DB2 backup wizard” on page 65. Set to 1 if this is a user-initiated backup type (Application Backup backup). The template or shell script controls the backup job on the NetBackup for DB2 client. Environment variable DB2_SCHED DB2_SCHEDULED DB2_USER_INITIATED DB2_FULL DB2_INCR DB2_CINC Creating templates and shell scripts To perform a scheduled NetBackup for DB2 backup. Set to 1 for an Automatic Differential Incremental Backup. either automatically by the NetBackup scheduler or manually through the administrator interface. you must write a script. If a template does not provide all of the required functionality.

For more information. Archive and Restore interface. To specify the master server 1 2 3 4 5 In the Backup. see “Creating DB2 scripts manually” on page 69. NetBackup for DB2 also provides a utility.conf file in one of the following locations: $DB2_HOME/bp. Setting the master server in the backup. enter the server name in the New Server Name field.Configuration Creating templates and shell scripts 63 the NetBackup for DB2 agent. and restore interface Use the Backup. This allows you to create a template with the wizard and then generate a shell script from it. You can then run the shell script or modify the shell script further. Click Add. and click Make Current. specify the master server from the client. archive. Modify these scripts to meet your individual requirements. Click OK. and Restore interface to specify the NetBackup master server from the client. specify the master server in the user bp. that can generate a shell script from a backup wizard template. If the master server is not in the Server List. bpdbsbdb2. Archive. In the dialog. Setting the master server in the user bp. click the NetBackup server tab. Specifying the NetBackup master server from the client To ensure that the templates you create are saved to and run from the correct master server. Setting the master server in the client interface ensures that the templates you create are saved to the master server upon which you created the NetBackup for DB2 policies. click Actions > Specify NetBackup Machines and Policy Type.conf .conf or $NBU_HOME/bp.conf To ensure that the templates you create are run from the master server where you created the NetBackup for DB2 policies. see “Creating shell scripts using bpdbsbdb2” on page 68. Select the master server in the Server List. For more information on the sample scripts.

64 Configuration Creating templates and shell scripts Creating a backup template using the NetBackup for DB2 backup wizard Create the backup template using the DB2 backup wizard. and Restore interface on the NetBackup for DB2 client. Figure 3-2 on page 66 shows a DB2 instance hierarchy. To browse for a DB2 instance ◆ Issue the following command to start the NetBackup Backup. Archive. NetBackup for DB2 automatically selects all the child objects beneath it. and Restore interface: /usr/openv/netbackup/bin/jbpSA & Click the Backup Files tab and expand the DB2 resource in the left pane to view a DB2 instance hierarchy. . Figure 3-2 DB2 instance hierarchy When you select any parent database object. Select a node in the left pane to view details in the right pane. You can access this wizard from the Backup. Archive. and Restore interface. Browsing for the DB2 instance to back up You can browse the DB2 environment in the Backup. Archive.

db2v826d is the DB2 instance. A partition represents a collection of storage within a database in which tablespaces are stored. and Restore interface only displays local or resident partitions. A tablespace is the lowest-level DB2 object that you can select in the browser. templates created on the local client do not back up partitions on remote hosts. It does not display other partitions on remote hosts. which is usually represented as partition zero (0). An instance represents a collection of DB2 databases. Partition The partition is the highest selectable DB2 object. Instance Database You cannot select a database for backup directly. which represent database storage units.Configuration Creating templates and shell scripts 65 Table 3-11 on page 66 explains the DB2 object types displayed. For more information. you cannot select other databases. Within a database. Create additional templates for the other remote partitions by running the wizard on those clients. . The display includes only partitions that reside on the same NetBackup client. Tablespaces are comprised of containers. The second level object is a DB2 instance. In Figure 3-2 on page 66. DB2 EEE/DPF environments generally consist of multiple partitions. SAMPLE is the database. you can effectively select the whole database. 0 is the partition. but by selecting all partitions below it. you cannot select objects within other databases at the same time. the browser window displays the DB2 resource. Tablespace A tablespace is a logical entity representing a collection of physical storage containers. Partitions contain tablespaces and log folders. To back up the entire EEE/DPF configuration. you can select one or more partitions. This is the top level DB2 object in the browser. Archive. DB2 is the DB2 resource. specify multiple templates in the policy backup selections list. In Figure 3-2 on page 66. If you select the database for backup. Caution: Because the Backup. If you select objects within the database. Other DB2 UDB environments consist of a single partition. Table 3-11 Object DB2 resource DB2 database objects in the backup window Description If NetBackup for DB2 is detected on the client. In Figure 3-2 on page 66. see the Caution that follows this table.

In the Backup. You can choose to save the template for later use. Archive and Restore interface. run. The following procedure uses the Backup. select the DB2 object(s) you want to back up.66 Configuration Creating templates and shell scripts Using the NetBackup for DB2 backup wizard After you select the DB2 objects that you want to back up. Archive. and Restore interface on the NetBackup for DB2 client. user-directed backup and recovery. The NetBackup for DB2 backup wizard displays the following screens for you to enter information about the backup operation you want to perform: ■ ■ ■ ■ ■ Welcome Database Login Initial Settings Backup Options Template Summary If you need an explanation of any of the fields on the wizard panels. or both. you can use the NetBackup for DB2 backup wizard to create a backup template for that DB2 element. 4 When you have completed the wizard. When you are satisfied with the template. click Help on the wizard panel. login as the DB2 user. It also generates DB2 shell scripts from templates created by the backup wizard. issue this command with the following options: bpdbsbdb2 -backup -g script_file_name -t template_name . To create a shell script. Creating shell scripts using bpdbsbdb2 bpdbsbdb2 is a NetBackup for DB2 command that initiates template-based. Click Help for details about saving and running the template you created. Click Backup. click Finish to save. run the template immediately. When you run a backup template from the wizard. or save and run the template you created. or more details. NetBackup performs a full backup. To create a backup template using the NetBackup for DB2 backup wizard 1 2 3 When you login to NetBackup. the Template Complete screen displays.

whether or not that partition is configured for rollforward recovery. The DB2 QUIESCE command is generated when the Disconnect users and prohibit access template option is specified.. Enclose script_file_name in quotation marks (“ “) if it contains space characters. For security purposes. Script execution permissions should be reviewed and modified as desired by the user. Do not use this option with this command’s -r (for “run”) option. If a template enables rollforward recovery. which search for an appropriate image. If a script performs a rollforward recovery. In addition. When attempting a point-in-time restore. For more information. Generated scripts are intended to be modified for the user's environment and preferences. This limitation does not exist for templates. “DB2NODE=”. In single partition environments. They must be added if needed. this variable can typically be empty. However.. see “Using bpdbsbdb2” on page 79 template_name Identifies the template. For more information. so they require manual editing. For example. . set this variable to the catalog partition number. Scripts generated for UNIX are intended to be run by an authorized DB2 user. then rollforward commands are generated for all partitions specified in the template.Configuration Creating templates and shell scripts 67 where: script_file_name Generates a shell script from a template.1. customize the DB2NODE variable. for example. this command fails if your version is prior to DB2 V8. Caution: It is the user's responsibility to review and customize any and all scripts generated from templates. In a multiple partition environment. settings such as passwords or catalog partition numbers are not generated in the template-to-script conversion. usernames and passwords are not included in generated scripts. generated scripts do not handle all possible error and failure cases and should be used at your own risk. The command DB2 RESTORE . customize the time value. Specify only the file name. bpdbsbdb2 retrieves backup templates from a known location on the master server. TAKEN AT strictly interprets the specified time and succeeds only if a backup image with the same time exists. see your IBM DB2 documentation.

For example. For clustered environments. Instructions for modifying scripts Note: If you are using DB2 EEE. To modify the backup and install scripts 1 Copy the example scripts to a different directory on your client. a separate script is required for each type of operation. they reside in the following location: Note: Be sure to modify these scripts for your environment. Although each script can have multiple DB2 commands operations.68 Configuration Creating templates and shell scripts Creating DB2 scripts manually The NetBackup for DB2 installation software includes the following scripts: ■ ■ ■ ■ db2_backup db2_restore db2_all_backup_mpp db2_all_restore_mpp /usr/openv/netbackup/ext/db_ext/db2/scripts After installation. Set the access permissions of these scripts to 775. this location should be available after a failover. such as vi(1). 2 3 . this location must be available after a failover. see “Configuration for a DB2 EEE (DPF) environment” on page 137. chmod 775 script_name Modify the script. This should be a safe location. Always relocate your scripts to a safe location. to open the script. you need separate scripts for backups and restores. Do not store your scripts in the sample directory because they are lost if you upgrade or reinstall. a Use a text editor. Caution: Always specify the correct script when configuring automatic backups or when starting operations through NetBackup. In clustered environments. NetBackup for DB2 does not generate an error if a restore script is used for a backup operation or a backup script is used for a restore operation.

the DB2_POLICY value is the name of the policy used to perform the backup. For more information. Templates The backup wizard saves a backup template to a location specific to NetBackup on the current NetBackup master server. see “Using the NetBackup for DB2 recovery wizard” on page 85. Storing templates and scripts The following sections explain how to store templates and scripts. Script parameters The NetBackup for DB2 templates and scripts read parameters from the environment when performing backup and restore operations. . The parameters can come from the following sources: ■ ■ ■ Environment Variables NetBackup bp. For information about the recovery wizard. Templates store encrypted passwords that are decrypted at runtime. See “Testing configuration settings” on page 72. server-directed and scheduled backups use the same copy of the template for each client in the policy client list. The recovery wizard saves a restore template to a user-specified location on the client. the scripts do not run with the proper permissions and environment variables. The location specified should include a fully qualified path to a directory where the user has write access. or user-directed) and runs it on the client. Include an su . scheduled. Without this. A backup template is associated with a policy by specifying its name in the policy file or script list. For example. Because backup templates are stored on the server in a known location. NetBackup retrieves a backup template from the master server as part of a backup (server-directed. see “Configuring the runtime environment” on page 53.conf NetBackup db2.user line (user is the DB2 instance account) in your scripts. 4 Test the scripts you just created by starting a manual backup of this policy.Configuration Creating templates and shell scripts 69 b c Follow the instructions in the script.conf Parameters from these sources can be evaluated within the scripts.

click Policies. If you are operating within a NetBackup Cluster. make sure that the restore templates and shell scripts reside in a file system that is shared between all nodes in the cluster. Choose Actions > Manual Backup. each client in the policy's client list must have a copy of the script with the same name in the same location. To test the configuration settings 1 2 3 Log onto the master server as administrator (Windows) or root (UNIX). see “Adding backup selections” on page 48. From the Windows interface: The policy list appears in the right pane. The backup and recovery processes sometimes require passwords for DB2 database access and/or system user accounts. Click the policy you want to test. For more information. Perform a manual backup (or backups) with the automatic backup schedules you created. Storing templates and scripts in a NetBackup cluster “Templates” on page 71 and “Shell scripts” on page 71 pertain to NetBackup for DB2 environments that are not installed in a NetBackup Cluster. 4 5 6 7 . Follow the directions in the Manual Backup dialog box. Testing configuration settings After you configure the master server for NetBackup for DB2. Start the NetBackup administration console. see the NetBackup Troubleshooting Guide. This means that for server-directed or scheduled backups. The Schedules pane contains the name of an automatic schedule (or schedules) configured for the policy that you want to test.70 Configuration Testing configuration settings Shell scripts DB2 scripts must reside on the NetBackup client. From the Java interface: The right pane splits into an All Policies pane and a details pane. Click Activity Monitor on the NetBackup administration console. test the configuration settings. Backup scripts are associated with a policy by specifying the file name (including path) in the policy file or script list. In the left pane. For a description of status codes and other troubleshooting information. The Clients pane contains the name of the client(s) listed in the policy that you want to test.

see “Using NetBackup for DB2” on page 75 . see the Troubleshooting chapter. For information on how to perform a backup.Configuration Backing up the database and archive logs 71 The Activity Monitor and the script output indicates the status of the backup operation. If the manual backup does not exit with a successful status. To back up your configuration ◆ Use the templates or scripts you have created in this chapter to back up your DB2 database. Backing up the database and archive logs Back up the database and archive logs as soon as possible after NetBackup for DB2 is configured and tested. and configuration files. archive logs.

72 Configuration Backing up the database and archive logs .

This file is named db2. Performing a backup This section describes the different ways you can perform a backup and explains the relationships between settings. The DB2 BACKUP and RESTORE commands use the policies. The NetBackup for DB2 configuration file. This library is named nbdb2. ■ .Chapter 4 Using NetBackup for DB2 This chapter contains the following topics: ■ ■ ■ “Performing a backup” on page 73 “Browsing backups” on page 79 “Performing a restore” on page 83 When all installation and configuration is complete. and settings specified in the following sources: ■ The NetBackup for DB2 vendor I/O library. Caution: Always specify the correct DB2 script or template when configuring automatic backups or when starting operations through NetBackup.ext.conf. NetBackup for DB2 does not generate an error if a restore DB2 script file is used for a backup operation or a backup DB2 template or script is used for a restore operation. you can start DB2 backups and restores through NetBackup or you can run DB2 commands directly. where ext differs depending on your platform. schedules. NetBackup for DB2 provides the following ways to perform backups: ■ By issuing a DB2 command from the DB2 control center or command line processor.

■ ■ Performing a backup from the NetBackup master server The following sections describe automatic and manual backups. follow the guidelines in “Configuration” on page 35.74 Using NetBackup for DB2 Performing a backup ■ By running a script from the operating system command line. If the user exit program is enabled in the DB2 configuration file. To add a new schedule or change an existing schedule for automatic backups. For information on which files to back up. An archive log backup is a backup of an archive log file for DB2. archive log backups. Automatic backup of a DB2 policy The most convenient way to back up your database is to set up schedules for automatic backups. and configuration file backups. A configuration file backup is a backup of the DB2 configuration files that you need in order to recover the database in the case of a disaster. When you back up a NetBackup policy. A database backup can be initiated through NetBackup by an automatic backup of a DB2 policy. or you can base a script on a template that you created earlier. If VENDOR is enabled in the DB2 configuration files. a manual backup of a DB2 policy. you need a separate policy and schedule to back up the archive logs. ■ ■ There are three main types of DB2 backups: database backups. it uses the templates and scripts specified in the policy. . You can use a Standard policy with a User Backup schedule to back up the files. Through templates initiated from the template wizards or Template Administration interface. NetBackup for DB2 backs up the archive logs along with the database files. When the NetBackup scheduler invokes a schedule for an automatic backup. ■ A database backup is a copy of the entire DB2 database or tablespace. Through templates and scripts specified in policies. or a user-directed backup. You can create scripts from scratch. the DB2 scripts run as follows: ■ ■ In the same order as they appear in the file list On all clients listed in the client list The DB2 scripts initiate the database backup. This backup is accomplished by issuing a DB2 BACKUP DATABASE command. see your IBM DB2 documentation.

see “Running a NetBackup for DB2 backup template” on page 75. and tablespaces T2 and T3 reside in partition P2. . see “Testing configuration settings” on page 70. they cause template execution to fail. If not. if tablespace T1 resides in partition P1. or automatic differential incremental). the processing order is as follows: 1 2 Process tablespace T1 in partition P1. Process tablespaces T2 and T3 in partition P2. template execution fails because DB2 does not support offline tablespace backups. The following information applies only if you are using the user exit program to back up the archive logs: ■ If an online backup of a partition is requested. all DB2 warnings are treated as DB2 errors. Manual backup of a DB2 policy The administrator on the master server can use the NetBackup administrator’s interface to manually execute an Automatic Backup schedule for a DB2 policy. the schedule determines the backup type (automatic full. An offline backup is also attempted if the database is in backup-pending mode. Performing a user-directed backup from the NetBackup for DB2 client The following sections describe user-directed backups. Except where noted. Running a NetBackup for DB2 backup template When you run a template. For instructions on initiating a backup of a DB2 policy. ■ For more information about templates. automatic cumulative incremental. See “Testing configuration settings” on page 70. in the order listed in the template summary. If a tablespace backup is requested. For example. All tablespaces residing with the same partition are processed together. NetBackup for DB2 processes database partitions sequentially. the user exit program must be enabled. the user exit program must be enabled. A failure in processing a request immediately stops template execution. The error condition must be resolved before the template can be re-run. an offline partition backup is attempted. If not.Using NetBackup for DB2 Performing a backup 75 When a backup template is run from a NetBackup schedule.

2 . SYSCTRL. restore. choose Actions > Administer Templates > DB2. Archive. You must be the root user or the template creator to rename a template. The DB2 template administration window provides the following functions: Function Run Edit Purpose Processes the selected template. and Restore interface. Refer to the following DB2 database manager configuration settings: SYSADM. and rollforward operations. The DB2 Template Administration window appears. Archive. Users must have sufficient DB2 permissions to browse DB2 databases and perform backup. To use the DB2 template administration interface 1 Start the NetBackup Backup. You must be the root user or the template creator to delete a template. Delete Rename View The templates created by the NetBackup for DB2 template generation wizard are stored in a predetermined location on the master server. Changes the contents of an existing template. The selected template is loaded into the NetBackup for DB2 template generation wizard.76 Using NetBackup for DB2 Performing a backup If the Disconnect users and prohibit access template option is selected. Changes the name of the selected template. Displays a summary of the selected template. Archive. the Abort if users are connected option is enforced. Figure 4-3 on page 77 shows the window. For example. Removes the selected template. the system issues the DB2 QUIESCE command before performing the backup or restore. See“Creating a backup template using the NetBackup for DB2 backup wizard” on page 64. type the following: /usr/openv/netbackup/bin/jbpSA & In the Backup.1. Using DB2 template administration The DB2 Template Administration interface is available in the NetBackup Backup. and Restore interface. instead. from the command line. this feature is not available. and SYSMAINT. In versions prior to DB2 V8. and Restore interface.

Click File > View Status. The template runs a full backup. issue the bpdbsbdb2 in the following format: bpdbsbdb2 -backup -r -t template_name In the preceding command. -r runs a template and -t identifies the template. At the command prompt. Click Run.Using NetBackup for DB2 Performing a backup 77 Figure 4-3 Template window The Select Template list shows the names and descriptions of the DB2 backup templates stored on the current master server. You can use the View Status tool to see the status of the backup. Click Run. . so you only need to specify the template file name. Incremental backups are only available through the NetBackup scheduler. Click OK. Using bpdbsbdb2 The bpdbsbdb2 command runs a backup template created by the NetBackup for DB2 Backup Wizard.tpl bpdbsbdb2 retrieves backup templates from a predetermined location on the master server. For example: bpdbsbdb2 -backup -r -t DB2_Mon_full. 3 4 5 6 7 Select the name of the backup template you want to run. Type your User Name and Password.

supported in DB2 8. Use this option if you have multiple backup devices available. run the DB2 BACKUP DATABASE command. issue the BACKUP DATABASE command in one of the following formats to perform a backup. OPEN number SESSIONS WITH number BUFFERS . Specifies the number of concurrent data streams used for writing data. The number of buffers must be twice the number of sessions. This command backs up a database to NetBackup. The following list provides reference information for the DB2 BACKUP command options when used in a NetBackup for DB2 environment. you can use the command in the following format: db2 backup db sample online load /usr/openv/netbackup/bin/lib include logs For lib.supported in all DB2 releases Issue the command in the following format: db2 backup db sample load /usr/openv/netbackup/bin/lib The specification for lib differs depending on your platform. Depending on the release of DB2 that you are using.2 and later releases If you are using a DB2 8. Format 2 . see your DB2 documentation. Refer to “NBDB2 vendor I/O library” on page 14. Format 1 . or you have multiplexing enabled in NetBackup. You can run this command from the DB2 command line on the client. Option LOAD NBDB2_library_path Purpose Instructs DB2 to use the NBDB2 vendor library when performing the backup. BACKUP DB. See OPEN number SESSIONS. specify the same path as shown for the preceding format (Format 1).78 Using NetBackup for DB2 Performing a backup Using DB2 to perform a backup To start a backup. BACKUP DATABASE command options You can back up a DB2 database with either the DB2 BACKUP DATABASE command or with its alternative syntax. Use this option when opening multiple sessions.2 or later release and if VENDOR is enabled. For more information on the DB2 BACKUP DATABASE command.

You can browse the DB2 resource through four levels: instance. You can also use the DB2 LIST HISTORY command. and tablespace. or active. Archive.Using NetBackup for DB2 Browsing backups 79 Option BUFFER size Purpose Use this option to increase or decrease the buffer size. DB2 recommends the size be a multiple of the extent size. Use this option to back up hot. without the quotes. Use this option to perform a differential backup. partition. but decreased size might be necessary if using numerous buffers.The string will be passed to the vendor support library. for example TSM. It must be specified in backup scripts executed by NetBackup. Increased size can benefit performance. Note: Specifying this option overrides the value specified by the VENDOROPT database configuration parameter. WITHOUT PROMPTING INCREMENTAL INCREMENTAL DELTA ONLINE OPTIONS ”options-string“ Specifies options to be used for the backup operation. exactly as it was entered. . The DB2 DFT_EXTENT_SZ setting defines the default extent size. if necessary. databases. and Restore interface to browse The Backup. PARALLELISM n Determines the number of table spaces which can be read in parallel by the backup utility. and Restore interface displays the DB2 resource. Archive. Browsing backups This section describes how to browse backup images. database. You can view the containers in a tablespace. Use this option to perform a cumulative backup. The DB2 USEREXIT setting must be enabled for online backups. but you can only select for restore at the tablespace level or the partition level. DB2 will automatically choose an optimal value for this parameter unless you explicitly enter a value. This option is required for unattended backups. Using the Backup.

You can select these DB2 objects and use the NetBackup for DB2 recovery wizard to prepare recovery templates for the objects. The information comes . In this example. Instead. The examples in this section use bplist to search all DB2 backup images for a client named camel. or one entire database (by selecting all of its partitions) for the restore. it browses the existing DB2 instances and databases. You can select a tablespace or tablespaces. the DB2 resource is expanded down to the tablespace level. and Restore interface. which is also the master server.80 Using NetBackup for DB2 Browsing backups This interface does not allow you to browse previous backups. Figure 4-4 Restore window Using bplist to browse You can use the bplist command to search DB2 backup images. Archive. See “Using the NetBackup for DB2 recovery wizard” on page 85. Figure 4-4 on page 80 shows a sample restore window in the Backup. a partition or partitions.

month.node0000. DB2 node0000 0 19991202105152 .1 Table 4-12 shows how to interpret one of the lines from the listing. day) and time (hour.DB2.cfg file. this is always zero (node0000). Output component DB2 SAMPLE node0000 19991202105152 (Filename) SAMPLE 0 Database name. Or. Includes the date (year.node0000.1 /DB2/SAMPLE/node0000/19991129154117/SAMPLE.1 /DB2/SAMPLE/node0000/19991201171209/SAMPLE.node0000. Database instance name.DB2.19991129154117. Examples 1 and 2 assume that the user exit program is used to back up the archive logs.node0000.0.0. Name of the database. /usr/openv/netbackup/bin/bplist -C camel -S camel -t 18 -R / /DB2/SAMPLE/node0000/19991202105152/SAMPLE. see the NetBackup online help. For more information on the bplist command.0. In non-partitioned database systems. 0 indicates a full database backup.DB2.19991202105152.0. where xxxx is the number assigned to the node in the db2nodes. Last archive log number. In partitioned database systems. Time that the backup occurred. second).0. Example 3 assumes that VENDOR is set and that the user exit program is not used to back up the archive logs.0. Example 1 The -t 18 option on this command specifies the DB2 backup type. this is nodexxxx.DB2. 3 indicates a tablespace backup.1 /DB2/SAMPLE/node0000/19991202104734/SAMPLE.3. minute.node0000. Node number. The output from bplist differs depending on how you are managing your archive log files. The bplist output shows the DB2 database backup images that are stored in the NetBackup database.1 /DB2/SAMPLE/node0000/19991129142046/SAMPLE.19991201171209.4. refer to the bplist man page. Node name. 1.0. Timestamp.to 8-characters in length.DB2.0. Type of backup taken.19991202104734. Table 4-12 bplist output Meaning DB2 is the directory name for all DB2 backups.Using NetBackup for DB2 Browsing backups 81 from the NetBackup catalog on the master server.19991129142046.

Name of the database.LOG /home/db2inst/NODE0000/SQL00001/SQLOGDIR/S0000025. The policy name originates from the settings in the db2. Provided by DB2. . Identifies this as a log file.conf file for archive log files.LOG Name of the log file. This file extension identifies the session number that was specified on the DB2 BACKUP command. The -k DB2_Log_Policy option specifies files backed up using this policy. Output component DB2 SAMPLE LOGFILE node0000 db2v864d Meaning DB2 is the directory name for all DB2 backups.82 Using NetBackup for DB2 Browsing backups Table 4-12 bplist output Meaning Session number. the VENDOR archive log method is enabled in DB2: /usr/openv/netbackup/bin/bplist -C camel -S camel -k log_policy -R / /DB2/SAMPLE/LOGFILE/node0000/db2v864d/C0000000_S0000000. Name of the DB2 instance.LOG /home/db2inst/NODE0000/SQL00001/SQLOGDIR/S0000024. The bplist output shows the list of DB2 archive log files stored in NetBackup. C0000000_S0000000. /usr/openv/netbackup/bin/bplist -k DB2_Log_Policy -C camel -S camel -R / /home/db2inst/NODE0000/SQL00001/SQLOGDIR/S0000026. The output format in the following example differs from the previous examples because for this database.LOG Example 3 This example uses bplist to search for DB2 archive log files. Name of the node.LOG The following list explains the information in this example’s bplist output. Output component 1 Example 2 This example uses bplist to search for all DB2 archive log file backups. The -k log_policy option specifies files backed up using this policy.

Using the NetBackup for DB2 recovery wizard NetBackup for DB2 includes a recovery wizard that solicits information from the user about the desired DB2 restore and recover operations. archive. Templates store encrypted passwords that are decrypted at runtime. Under typical circumstances. You can use the NetBackup for DB2 recovery wizard to create restore templates. The NetBackup for DB2 recovery wizard saves a recovery template locally in a user-specified location on the NetBackup client. The wizard uses the information to create a template that can be used immediately or saved for later use. you can initiate a database restore by using the DB2 Control Center or command line processor. Because recovery can be a complex process. type the following command: /usr/openv/netbackup/bin/jbpSA & Selecting files for restore To select for restore 1 Click the Restore Files tab. For more information. and restore interface ◆ To start the NetBackup Backup. see your DB2 documentation. Archive. or you can write scripts that contain the commands to perform a restore. Archive.Using NetBackup for DB2 Performing a restore 83 Performing a restore As the DB2 user. To start the NetBackup backup. Invoking the NetBackup for DB2 recovery wizard You can launch the NetBackup for DB2 recovery wizard from the Backup. . a recovery template is run immediately and then deleted. Recovery templates are not stored on the server because recovery is always user directed. and Restore interface from the command line. not scheduled. You can access the interface through the NetBackup administration console or from the command line. A NetBackup task can execute a restore template or script containing the necessary DB2 commands to perform the restore. and Restore interface. The recovery process sometimes requires passwords for DB2 database access and system user accounts. it might be necessary to perform manual steps as part of the operation.

4 When you have completed the wizard. Select a node in the left pane to view details in the right pane. In the Policy type drop down list. click the Source client/Policy type tab. the Template Complete screen displays. select DB2. You can choose to run the template immediately after the wizard finishes. The NetBackup for DB2 recovery wizard displays the following screens for you to enter information about the restore operation you want to perform: ■ ■ ■ ■ ■ Welcome Database Login Time Periods Restore Options Recovery Options If you need an explanation of any of the fields on the wizard screens. to change the policy type. In the Backup. login as the DB2 user. select Specify NetBackup Machines and Policy Type. . and Restore interface. Click Restore. complete the following procedure to create and run a template with the recovery wizard. expand a DB2 instance and select the database object(s) you want to restore. For explanations of your choices. To use the recovery wizard 1 2 3 When you login to NetBackup. Click OK. click Help on the wizard screen. click Help. or both. To change the client policy type 1 2 3 4 On the Actions menu. Archive. or more details.84 Using NetBackup for DB2 Performing a restore 2 3 Expand the DB2 resource in the left pane to view a DB2 instance hierarchy. Complete the procedure “To change the client policy type” on page 84. Using the recovery wizard When you are ready to perform a recovery. it is possible that your NetBackup for DB2 client does not have the appropriate policy type specified. to save the template locally. On the Specify NetBackup Machines dialog. If the DB2 node is not visible.

If the template is configured to perform a rollforward. all restore operations are performed before any and all rollforward operations. For more information. Note: When performing a DB2 restore. Caution: The DB2 warning SQL2539W indicates that the requested restore operation will replace the existing database. The template execution status. The first access reads a partial image. For example: /usr/openv/netbackup/bin/bpdbsbdb2 -restore -r \ -t /db2/restore_templates/full_restore. which is reported as “The restore failed to recover the requested files” (status 5) in the Activity Monitor. this warning is logged and the restore proceeds without interruption. Template execution does not support the use of local time when performing a rollforward. The rollforward time specified in the template is passed to DB2. At the command line. The DB2 warning SQL2523W indicates that the backup image originates from a different database of the same name. DB2 accesses the NetBackup image twice when performing a restore.Using NetBackup for DB2 Performing a restore 85 When running a template. the existing database files will be deleted. false alarms are reported in the NetBackup Activity Monitor. and the -t identifies the template. is the best indication of overall success. When running a template to perform a restore. This is handled as an error to prevent DB2 from deleting log files. The next access reads the entire image.tpl Restore templates do not reside in a predetermined location on the master server. which should result in a successful restore (status 0). and it is interpreted as GMT by DB2. They are considered to be temporary in nature and should reside on the . type the following: /usr/openv/netbackup/bin/bpdbsbdb2 -restore -r -t template_name The -r runs a template. The DB2 error SQL1260N indicates that the restored partition is not configured for rollforward recovery. this step is skipped. see the ROLLFORWARD command in your DB2 documentation. Using bpdbsbdb2 The bpdbsbdb2 command allows you to run a recovery template created by the NetBackup recovery wizard. not the activity monitor. That is.

These commands assume that the archive log files reside in a location that is known and accessible to DB2 and Netbackup. . db2.86 Using NetBackup for DB2 Performing a restore client. The procedures in the following sections show how to restore the example database. see “Creating shell scripts using bpdbsbdb2” on page 66. Using DB2 to perform a restore The exact process for recovering a DB2 database differs from site to site depending on the methods used for backing up the archive logs. If VENDOR was in effect in DB2 at the time all the archive logs were created.conf. and the location of the archive logs. see your DB2 documentation.conf. the file might not be found. the settings used in the NetBackup for DB2 configuration file. you can probably use the procedure in this section if the following are true: ■ If ARCFUNC SAVE was in effect in the db2.Restoring archive logs” on page 87 This is the more complex case. ■ ■ The commands in the following procedure restore a DB2 database and its archive logs. If the full path is not specified as part of the restore template name.Simplest case The DB2 commands for recovering a database differ from release to release.Simplest case” on page 86 You can use this procedure if the archive logs are in an accessible location and they were all created using the same parameters in db2. ■ For more information on how to recover a DB2 database. to the level of a recent database backup plus archive logs: ■ “Recovering a DB2 database . SAMPLE.conf file when all archive logs were backed up and the logs were not moved from the ARCDIR and RETDIR directories. Recovering a DB2 database . For information about creating a script from a template using bpdbsbdb2. You can use the procedure in this section to restore a database if the archive logs are in a location that is known and accessible to DB2 and NetBackup. For example. “Recovering a DB2 database . If ARCFUNC COPY was in effect in the db2.conf file when all archive logs were backed up. Use this procedure if you have to browse for archive logs and restore them from secondary storage.

network storage. Refer to “NBDB2 vendor I/O library” on page 14. When this situation exists.conf file for some. For example: db2 restore db db_name load /usr/openv/netbackup/bin/lib .2. if ARCFUNC COPY is in effect and the old archive logs were moved to tape. ■ ■ To restore a DB2 database when the archive logs are in a non-standard location 1 Restore the database.2 and later releases.Restoring archive logs You can use the procedure in this section if you need to restore the archive logs before you perform the rollforward. If ARCFUNC COPY was in effect in the db2. Full path to the NBDB2 library. Recovering a DB2 database . This may be the case if you moved one or more of the needed archive logs to secondary storage such as tape. but not all.conf file at the time the archive logs were backed up and the ARCDIR and RETDIR parameters specify two different locations. perform procedure in this section.Using NetBackup for DB2 Performing a restore 87 To restore a DB2 database when the archive logs are accessible to DB2 and NetBackup ◆ Depending on the release level of DB2. If PARTITIONTYPE RAW was in effect in the db2. Use the procedure in this section to restore the archive logs manually if the following situations exist: ■ If the archive logs are not in the standard locations. of the archive log backups. NetBackup cannot perform a seamless restore of DB2. or some other location. enter one of the following commands: ■ For DB2 8. For example. enter the following two-command sequence: ■ db2 restore db db_name load /usr/openv/netbackup/bin/lib db2 rollforward db db_name to end of logs and stop where: db_name lib Name of the DB2 database. enter the following command: db2 recover db db_name For DB2 releases prior to 8. Issue the DB2 RESTORE DATABASE command to restore the database itself.

You can use either the Backup. DB2 then reapplies the transaction information in the archive logs since the last full backup was performed and brings the database back online. you can use the following command options if PARTITIONTYPE RAW was not specified when any of the log files were backed up: db2 rollforward db sample to end of logs and stop 3 4 bprestore /vedb2/db2/v8/db2V832d/NODE0000/SQL0001/SQLOGDIR/S0000009. If PARTITIONTYPE RAW is specified in the db2. For example. copy the logs in the ARCDIR directory to the RETDIR directory. When the rollforward is initiated. and Restore interface or the bplist(1M) command to browse the archive logs and find those missing from the restore directories. retrieve the logs from the file system manually. Archive. Use operating system commands to copy the missing archive logs to the correct locations in your operating system. you do not have to take any action. Use NetBackup to restore the archive logs.88 Using NetBackup for DB2 Performing a restore where: db_name lib Name of the DB2 database. For more information.LOG 5 The ROLLFORWARD DATABASE command issues messages if it cannot locate all the archive log files it needs. 2 Use NetBackup to browse the archive logs. For example: Bring the database online. and Restore interface or the bprestore(1M) command. Archive. the user exit program looks for only those logs when performing the restore. If some of the log files have been moved to secondary storage. Refer to “NBDB2 vendor I/O library” on page 14. If you receive these messages. If ARCFUNC COPY is in effect and the ARCDIR and RETDIR parameters specify different locations. Use either the NetBackup Backup. use the cp(1) command.conf file. DB2 sends a request to NetBackup to restore the log files it needs. restore these files to the RETDIR directory. If ARCDIR and RETDIR specify the same location. see “Browsing backups” on page 79. The missing logs are those that were written when PARTITIONTYPE RAW was not in effect. For example. browse and . Full path to the NBDB2 library. If a restore requires log files backed up from a file system and log files backed up from a raw device.

OPEN number SESSIONS WITH number BUFFERS Use this option when opening multiple sessions. you should specify the same number of sessions used during the backup. . Using fewer buffers can degrade performance or can cause the restore to fail when reading multiplexed images. For example. Increased size can benefit performance. For more information about the DB2 commands. BUFFER size Use this option to increase or decrease the buffer size if necessary. if the backup image was created 10 days ago and restored today.Using NetBackup for DB2 Performing a restore 89 restore the missing archive log files. RESTORE DATABASE command options You can restore a DB2 database with either the DB2 RESTORE DATABASE command or with its alternative syntax. The number of buffers must be twice the number of sessions. Specifies the number of concurrent data streams used for writing data. the log files are used to restore transactions that occurred after the backup. After the database is successfully restored. Using fewer sessions is allowed. the ROLLFORWARD DATABASE command restores and reapplies the transactions recorded in the archive log files since the last backup was performed. see your DB2 documentation. Specifying more sessions has no benefit. but it might degrade overall restore performance. while decreased size might be necessary if using numerous buffers. and issue the ROLLFORWARD DATABASE command again. The DB2 RESTORE DATABASE command restores a database from NetBackup. RESTORE DB. Option LOAD NBDB2_Library_Path Purpose Instructs DB2 to use the NBDB2 vendor library when performing the restore. DB2 alters the actual size to be a multiple of the size used during the backup. The following list provides reference information for the DB2 RESTORE command options when used in a NetBackup for DB2 environment. See OPEN number SESSIONS. Typically. Use this option if you have multiple backup devices available or if you have multiplexing enabled in NetBackup.

Note: Specifying this option overrides the value specified by the VENDOROPT database configuration parameter. When to use an alternate restore Alternate restores differ from regular restores. Specifies options to be used for the restore operation.90 Using NetBackup for DB2 Performing a restore Option WITHOUT PROMPTING Purpose This option is required for unattended restores. An automated restore coordinates the restoration of a full backup and all associated incremental backups. and one or more differential incremental backups. You can also change the name of the database during the restore. NetBackup logs an error in the activity monitor. for example TSM. INCREMENTAL AUTOMATIC HISTORY FILE When using this option. an optional cumulative incremental backup. When using this option. as follows: . NetBackup logs an error in the activity monitor. which can safely be ignored. Consequently. A single automated restore restores a full backup. and it must be specified in backup scripts executed by NetBackup. exactly as it was entered. without the quotes. DB2 might not read the entire image from NetBackup media. which can safely be ignored. Use this option to restore a series of full and incremental images. Consequently. Performing an alternate restore An alternate restore allows you to restore a DB2 database to a different client or to a different instance. DB2 might not read the entire image from NetBackup media. OPTIONS ”options-string“ PARALLELISM n Specifies the number of buffer manipulators that are to be spawned during the restore operation.The string will be passed to the vendor support library. DB2 will automatically choose an optimal value for this parameter unless you explicitly enter a value.

Instances class1 and class2 are on grade7. Figure 4-5 Alternate restore example Client: grade7 Client: grade8 Instance: class1 Databases: math1. assume that you have two NetBackup clients. art1 Instance: class1 Databases: math1. If you restore a database into an instance that already has a database by that name. In this case. the alternate restore process overwrites the existing database. Databases within an instance must have unique names. art1 Instance: class2 Databases: eng1. Instance class1 is on grade8. the database also retains its original name. art10 . Table 4-13 Types of Restores Permitted Regular restore Same Object Database name Instance Client Alternate Alternate Alternate restore restore restore Same Same Different Alternate restore Same Alternate Alternate Alternate restore restore restore Different Different Different Same Same Same Different Different Same Same Same Different Different Different Same Same Different Different Different For example. grade7 and grade8.Using NetBackup for DB2 Performing a restore 91 ■ Use the regular restore procedures described earlier in this chapter if you want to restore a database into the same instance on the same NetBackup client that hosted it previously. ■ Table 4-13 on page 91 summarizes the types of restores you can perform and whether you need to use regular or alternate restore procedures. Use use alternate restore procedures described in this section if you want to restore a database to a different instance or to a different client or if you must rename the database during the restore. Figure 4-5 on page 91 shows this.

For example. ■ 4 Change the CLIENT_NAME entry to specify the client from which the database was originally backed up. Without renaming. you need to rename art1 to art2 because instance class1 already has a database named art1. add the following line to this file: client2 Edit the bp. During the restore. To prepare the NetBackup master server for alternate restores 1 2 Log onto the NetBackup master server that hosts the policy that backed up database SAMPLE. you need to rename math1 to math2 because class1 on grade8 already has a database named math1. Without renaming. Database eng1 can retain its name because it is unique to instance class1. ■ . You can restore database math1 from instance class1 on client grade7 into instance class1 on client grade8. the existing database art1 would be overwritten. You can restore database art1 from instance class2 on client grade7 into instance class1 on client grade7. ■ ■ Preparing the master server for an alternate restore The examples in the following procedure assume that database SAMPLE was backed up by client2. For example.conf file to change the information for the CLIENT_NAME and SERVER entries. and you want to restore SAMPLE to client1. Perform this step if you created a dest_client_name file. During the restore. 3 (Conditional) Add the name of the NetBackup for DB2 source client to the dest_client_name file.92 Using NetBackup for DB2 Performing a restore The following list shows some of the types of restores you can perform using alternate restore procedures: ■ You can restore database eng1 from instance class2 on client grade7 into instance class1 on client grade8. Change the SERVER entry to specify the master server that hosts the policy that originally backed up the database.Restrictions Or /usr/openv/netbackup/db/altnames/dest_client_name where dest_client_name is the name of a client that is allowed to be a destination client for alternate restores. the existing database math1 would be overwritten. client1. Create one of the following files on the NetBackup master server: /usr/openv/netbackup/db/altnames/No.

1 Modify the db2. see the NetBackup Administrator’s Guide.conf file on the destination client by adding the following new object identifiers: ■ ■ ■ ■ ■ One to specify the alternate restore One to define the new database One to define the old database One to define the new log files One to define the old log files The following example shows the keyword lines needed to specify the alternate restore: OBJECTTYPE ALTERNATE SRCINST db2v832d SRCALIAS SAMPLE DESTINST db2v832t DESTALIAS NEWSAMPL ENDOPER # # # # # # Specifies an alternate restore Names the source instance that Names the source database that Names the destination instance Names the destination database Ends the object identifier was backed up was backed up name alias name The following example shows the keyword lines needed to define the new database: DATABASE NEWSAMPL OBJECTTYPE DATABASE POLICY db2-bkup SCHEDULE Default-Application-Backup ENDOPER The following example shows the keyword lines needed to define the old database: DATABASE SAMPLE OBJECTTYPE DATABASE POLICY db2-bkup SCHEDULE Default-Application-Backup ENDOPER The following example shows the keyword lines needed to define the new data archive log files: DATABASE NEWSAMPL . Performing the alternate restore on the clients The following procedures explain how to restore a DB2 database and its transaction logs. Type the commands in this procedure from the client that is receiving the restored database.Using NetBackup for DB2 Performing a restore 93 For more information on managing client restores. To perform an alternate restore of a DB2 database This procedure builds a request to DB2 to find the backup images that correspond to the database you are trying to restore.

Specify the full path to the NetBackup library.0)" . db2 restore db db_being_restored load lib_path into new_db_name redirect For example: db2 restore db sample load /opt/openv/netbackup/bin/nbdb2.sl into newsampl redirect 3 Set the location of the data files for the tablespace. type one or more commands similar to the following: db2 set tablespace containers for 0 using "(path path)" db2 set tablespace containers for 0 using "(path DB2_install_path/db2v832t/NODE0000/SQL00001/SQLT0000. Type this command in the following format: where path specifies the DB2 install path.94 Using NetBackup for DB2 Performing a restore OBJECTTYPE ARCHIVE POLICY db_a_db2 SCHEDULE Default-Application-Backup #SCHEDULE User ARCFUNC SAVE #ARCFUNC COPY #ARCDIR /home/db2inst1/arcdir #RETDIR /home/db2inst1/arcdir ENDOPER The following example shows the keyword lines needed to define the old data archive log files: DATABASE SAMPLE OBJECTTYPE ARCHIVE POLICY db_a_db2 SCHEDULE Default-Application-Backup #SCHEDULE User ARCFUNC SAVE #ARCFUNC COPY #ARCDIR /home/db2inst1/arcdir #RETDIR /home/db2inst1/arcdir ENDOPER 2 On the destination client. For example. If the name of the new database matches the name of a database presently included in the new instance. Type this command in the following format: where: db_being_restored lib_path new_db_name Specify the name of the database that was backed up. Specify the name for the new database. type the DB2 RESTORE command. the new database overwrites the existing database.

For example: (Optional) Move the logs to the correct directory for the destination database. create a directory for the restored transaction log files. move the logs to the proper location. If the directory into which you restored the log files is not the correct directory for the destination database. Type this command in the following format: db2 rollforward db new_db_name to end of logs and stop For example: db2 rollforward db newsampl to end of logs and stop . On the destination client. For example: Use the bprestore command to restore the logs. a mkdir /db/db2_v5/home/db2inst1/NODE0000/SQL00001/SQLOGDIR b bprestore /db/db2_v5/home/db2inst1/NODE0000/SQL00001/SQLOGDIR/S00001. Type the RESTORE command in the following format: db2 restore db db_bring_restored continue For example: db2 restore db sample continue 5 (Optional) Restore the transaction logs. The user exit program was used to back up the archive logs.Using NetBackup for DB2 Performing a restore 95 4 Restore the database.LOG c d 6 Use the DB2 ROLLFORWARD command to restore the logs. Verify that the correct owner and group permissions are enabled on the log directory. Perform this step if one of the following is true: ■ ■ The archive logs did not originally reside on a raw device.

96 Using NetBackup for DB2 Performing a restore .

You might need to modify other hardware and software configurations.Chapter 5 NetBackup for DB2 with Snapshot Client The chapter contains the following topics: ■ ■ ■ ■ ■ ■ ■ ■ “Installation and licensing requirements” on page 97 “NetBackup for DB2 with Snapshot Client overview” on page 98 “How does NetBackup for DB2 with Snapshot Client work?” on page 101 “Configuring snapshot backups” on page 104 “Restoring data from a snapshot backup” on page 108 “Configuring block-level incremental backups” on page 111 “Snapshot Client effects” on page 116 “Using NetBackup for DB2 with Snapshot Client” on page 118 Installation and licensing requirements To use NetBackup for DB2 with Snapshot Client. you must have the following licensed and installed: ■ ■ NetBackup for DB2 6. For more information about the following.5 NetBackup Snapshot Client 6.5 No additional NetBackup software is required. see the NetBackup Snapshot Client Administrator’s Guide: ■ ■ How to install and configure the NetBackup Snapshot Client Configuration requirements for specific snapshot methods .

Instant recovery makes it possible to perform block-level restores. or third-party copy device Block-level incremental backup A block-level incremental (BLI) backup uses the change tracking capabilities of the VxFS Storage Checkpoint feature. and significantly reduces CPU and network overhead during backups. In a BLI backup. Off-host backup An off-host backup shifts the burden of backup processing onto a separate backup agent. The backup agent reads the data from the client disk and writes it to storage. decreases the amount of backup media required. Snapshot backup captures the data at a particular instant without causing significant client downtime. Client operations and user access continue without interruption during the backup. Instant recovery This feature makes backups available for instant recovery from disk. NetBackup for DB2 can back up DB2 objects by taking snapshot images of the component files. only the changed blocks of data are backed up — not the entire file or file system. Snapshot backup A snapshot is a disk image of the client's data made almost instantaneously. The resulting capture or snapshot can be backed up without affecting the performance or availability of the database. An off-host backup can also be directed to a NetBackup media server. Optionally. Later. NetBackup creates the image without interrupting user access to data. such as an alternate client. A BLI backup saves time.98 NetBackup for DB2 with Snapshot Client NetBackup for DB2 with Snapshot Client overview NetBackup for DB2 with Snapshot Client overview The following sections describe the NetBackup Snapshot Client features that are available for use with NetBackup for DB2. . This reduces the effect on the client's computing resources ordinarily caused by a local backup. the image is retained on disk as well as backed up to storage. Instant recovery combines snapshot technology with the ability to do rapid disk-based restores. it backs up the snapshot version to the storage unit. When used in conjunction with NetBackup Snapshot Client.

Backups and restores remain tightly integrated with DB2 and its catalog. File-based operations Standard NetBackup for DB2 backups and restores are stream-based. NetBackup moves the data provided by the server process. NetBackup captures the data stream content provided by DB2.NetBackup for DB2 with Snapshot Client NetBackup for DB2 with Snapshot Client overview 99 Proxy copy A proxy copy is a special type of backup in which the control of the data transfer is managed by the NetBackup for DB2 agent. In a stream-based backup. proxy copy enables the agent to manage the entire data movement between the disks that contain the data files and the storage devices managed by NetBackup. Stream-based operations Stream-based operations are the standard NetBackup implementation of conventional NetBackup for DB2 backup and restores. Figure 5-1 on page 100 represents a stream-based backup or restore. If the user has specified multiple streams. greatly simplifying administration tasks. the operations are file-based. . then NetBackup for DB2 opens multiple streams and NetBackup catalogs them as separate images. When Snapshot Client is enabled. During the backup and restore operations. The following sections illustrate the differences between these operation types.

. DB2 provides the list of files that require backup or restore to NetBackup for DB2 with Snapshot Client. Figure 5-2 on page 101 represents a file-based backup or restore.100 NetBackup for DB2 with Snapshot Client NetBackup for DB2 with Snapshot Client overview Figure 5-1 NetBackup for DB2 stream-based backup or restore DB2 Server DB2 database disk Control commands Data DB2 database disk NetBackup File-based operations In a file-based operation. NetBackup for DB2 with Snapshot Client performs the data movement.

The agent then initiates file-based . The template or shell script specifies the objects or commands that perform the backup or restore on the client. You can also use the bpdb2proxy command to initiate a NetBackup for DB2 Snapshot Client backup.NetBackup for DB2 with Snapshot Client How does NetBackup for DB2 with Snapshot Client work? 101 Figure 5-2 NetBackup for DB2 with Snapshot Client file-based backup or restore DB2 Server Control commands DB2 database disk NetBackup for DB2 DB2 database disk List of files Data NetBackup Data How does NetBackup for DB2 with Snapshot Client work? NetBackup users or schedules start database backups or restores by specifying a template or shell script in the backup selections list of the DB2 policy. The agent checks that the policy it is using for the backup is configured with the appropriate Snapshot Client attributes.

Enables user connections to the database (brings the database online). Uses DB2 APIs to takes the files out of the quiesced state. Sequence of operation: restore For a restore operation. Database objects supported by advanced backup methods DB2 allows proxy method backups of databases at the node level. NetBackup for DB2 uses the DB2 APIs to take the data files out of quiesce/write suspend mode. NetBackup then creates a snapshot of the files. the NetBackup for DB2 agent performs the following steps: 1 2 3 4 5 Determines the list of files that make up the DB2 database. Reruns the transactions from the log files (performs the rollforward operation). The NetBackup for DB2 agent uses DB2 APIs to put the data files into quiesce/write suspend mode. Disconnects all users from the database (brings the database offline). locates the correct physical backup images. Sequence of operation: backup For a backup operation. Backs up the snapshot image of the data files. The data files being backed up are in quiesce/write suspend mode only for the period of time it takes to create a snapshot of the data. the NetBackup for DB2 agent performs the following steps: 1 2 3 4 5 6 Using the DB2 database and a point in time. Enables DB2 write activity (unquiesces the database). .102 NetBackup for DB2 with Snapshot Client How does NetBackup for DB2 with Snapshot Client work? backups of the DB2 files and uses the NetBackup Snapshot Client interface to perform the data movement. Suspends write activity to the data files (quiesces the database). so NetBackup can use file-based Snapshot Client backup methods to back up databases. Uses the Snapshot Client method to create a snapshot image of the mapped files. After the snapshot has been created. Restores the images to the original database. This puts the database in a rollforward pending state.

Example: Using multiple channels for a DB2 command with proxy method The following NetBackup for DB2 sample command initiates a database backup on a per-node basis. Both the symbolic link and the actual file are backed up and restored. Symbolic links NetBackup for DB2 with Snapshot Client fully supports backups and restores of data files that consist of symbolic links and regular files. For more information. However. Issue this command on each node of the database. if the symbolic link resides on a different file system than the data file it points to. When you use instant recovery. if you selected Retain snapshots for instant recovery. based on file size. be sure to configure policies that allow both kinds of backups. . see “Snapshot Client effects” on page 118 Multistreaming You can use either the -s option on the bpdb2proxy command or the sessions parameter in the Backup Options screen of the backup wizard to specify the number of proxy copy backup streams to start. Snapshot Client methods cannot be used for transaction logs backed up using either the user exit program or the VENDOR method. DB2 starts a non-proxy conventional backup of the transaction logs. the symbolic link must reside on the same file system as the data file. which includes the transaction logs: bpdb2proxy -backup -d sample -s 3 -n 0 The agent splits the files into 3 streams and initiates a file-based backup for each stream. After the proxy backup is done. NetBackup for DB2 attempts to create streams of equal size. When configuring NetBackup for DB2 with Snapshot Client backups. DB2 performs only conventional backups for transaction log files. File-based and stream-based backups require different configurations. NetBackup for DB2 splits the files into a number of groups as specified by either of these parameters. the restore fails.NetBackup for DB2 with Snapshot Client How does NetBackup for DB2 with Snapshot Client work? 103 NetBackup for DB2 cannot use Snapshot Client methods to back up individual tablespaces or container files.

snapshot backup and instant recovery. software requirements. The following list highlights some of the requirements that pertain to database agents: ■ The user identification and group identification numbers (UIDs and GIDs) associated with the files to be backed up must be available to both the primary client and the alternate backup client. Another reason for writing the data files to their own repository is because it is required for an instant recovery point-in-time . There are also special requirements for specific types of backups. One reason for to have two different volumes is to separate the data files from the other files. to enable fast database backups and recoveries. specify an alternate client (UNIX and Windows clients) or a data mover (UNIX clients only) to assume the I/O processing load. so the database activity might freeze until the logs become accessible again. configuration files. Familiarize yourself with this information before you configure any snapshot backups. This process is nearly instantaneous.104 NetBackup for DB2 with Snapshot Client Configuring snapshot backups Configuring snapshot backups You can combine two NetBackup features. the logs are temporarily frozen while NetBackup takes the snapshot. compatibility with certain features. as follows: ■ ■ ■ Allocate one or more volumes or file systems to the database data files. and snapshot methods that are supported. and the transaction logs. Refer to the NetBackup Snapshot Client Administrator’s Guide and the Symantec Support Web site for more information. ■ Another feature. These features are as follows: ■ A snapshot backup occurs when NetBackup creates a point-in-time disk image of the database and copies that image to disk. An instant recovery occurs when NetBackup restores the on-disk snapshot copy of the database. can reduce the I/O processing load on the client that hosts the database. If the logs are configured on the same volumes (or file systems) as the data files. Allocate a different set of volumes or file systems to the DB2 executables. off-host backup. You should allocate at least two different volumes or file systems for database activities. The process cannot access the logs when the database is active. so user access to the database is not interrupted during the backup. To use off-host backup. Configuration requirements Each agent has its own hardware requirements.

and off-host backup. Configure this policy if you use the user exit program. perform any special configuration that is required. see the NetBackup Snapshot Client Administrator’s Guide. (Conditional) An Application Backup schedule to back up the transaction logs. and the license key for this option must be registered. . snapshot retention. This configuration ensures that the entire database can be restored successfully. For information on how a snapshot method is automatically selected and details on the types of backup methods. configure the following policies and schedules: ■ A DB2 policy with the following attributes: ■ Snapshot methods for the file systems in which the database files reside. To perform off-host backups.NetBackup for DB2 with Snapshot Client Configuring snapshot backups 105 rollback. Configure this policy if you use the VENDOR method. DB2 does not support proxy backups of transaction logs. For snapshot or instant recovery backups. ■ ■ Configuring the DB2 policy with Snapshot Client backup methods This section explains how to configure snapshot and instant recovery backups for the DB2 policy. An Automatic Full Backup schedule to perform file-based snapshot and off-host backups of the database. A backup method on the policy attributes dialog box. ■ ■ ■ ■ (Conditional) A Standard policy to perform stream-based backups of transaction logs. DB2 does not support proxy backups of database transaction logs. Your backup configuration must include policies to perform file-based and stream-based backups. Snapshot backups do not back up all database objects. Configuring a snapshot policy The following procedure shows how to configure a snapshot policy with optional instant recovery. ■ The hardware and software that is required for the appropriate snapshot method must be installed and configured correctly. Only data files may exist on the volume or file system being restored. NetBackup Snapshot Client must be installed and configured correctly.

Snapshot policy interface Figure 5-3 Select the policy type Select appropriate storage unit or storage unit group Click Perform snapshot backups (Optional) Click Retain snapshots for instant recovery (Optional) Click Perform off-host backup and specify a method 4 Select a policy storage unit from the Policy storage unit list. Select the DB2 policy type. Click on the Attributes tab. Select a policy storage unit in this step even if you plan to select Instant Recovery Snapshots Only later in this procedure. Figure 5-3 on page 106 shows the interface that lets you configure a snapshot policy. NetBackup uses this storage unit for the stream-based backups of the control files and the transaction logs that are included in this policy. . NetBackup also uses this storage unit if you select Third Party Copy Device when you configure the schedule.106 NetBackup for DB2 with Snapshot Client Configuring snapshot backups To configure a snapshot policy 1 2 3 Open the policy you want to configure.

NetBackup for DB2 with Snapshot Client Configuring snapshot backups

107

Any_available is not supported for the following data movers: NetBackup Media Server or Third-party Copy Device. 5 6 Click Perform snapshot backups. (Optional) Click Advanced Snapshot Options to choose a snapshot method. By default NetBackup chooses a snapshot method for you. To choose a snapshot method, click auto (the default) or click one of the methods that are presented in the list. The snapshot method you can use depends on your hardware environment and software environment. Only certain snapshot methods are supported in certain environments. See the NetBackup Snapshot Client Administrator’s Guide or the supported platforms matrix on the Symantec Support Web site for more information. You can configure only one snapshot method per policy. For example, assume you want one snapshot method for clients a, b, and c, and a different method for clients d, e, and f. Then you need to create two policies for each group of clients and select one method for each policy. (Optional) Select Retain snapshots for instant recovery. When this option is selected, NetBackup retains the snapshot backup image on disk for later use in recovery. (Optional) Select Perform off-host backup. By default, the client that hosts the database performs the backup. If you want to reduce the I/O processing load on the client that hosts the database, specify an alternate client to perform the backup. Select an off-host backup method by specifying the following:

7

8

Use alternate client (UNIX and Windows clients). If you click Use alternate client, also specify the name of the client to perform the backup. This option might require additional configuration. The alternate client must be a client that shares the disk array. Use data mover (UNIX clients only). If you click Use data mover, also select one of the possible data movers:
■ ■

NetBackup Media Server Third-Party Copy Device

9

Click the Schedules tab.

10 Click New. Configure both an Automatic schedule and an Application Backup schedule, as follows:

The Automatic schedule is for the database files. If you want to create only disk images, in the Destination panel, under Instant Recovery, select Snapshots only. This suppresses NetBackup’s

108 NetBackup for DB2 with Snapshot Client Restoring data from a snapshot backup

default behavior, which is to copy the snapshot to a storage unit. When you select Snapshots only, NetBackup creates the on-disk snapshot copy of the database, but it does not copy the snapshot to a storage unit. The on-disk snapshot becomes the only backup copy. Note that the on-disk snapshot is not considered to be a replacement for a traditional backup.

(Conditional) The Application Backup schedule is for the control files and transaction logs. NetBackup uses this storage unit for the stream-based backups of the control files and the logs that are included in this policy. Configure this schedule only if you want to use the VENDOR method for backing up the transaction logs. NetBackup copies the database’s control files and transaction logs to the storage unit you selected. For UNIX clients, if you selected Third-Party Copy Device as an off-host backup method, click Override policy storage unit. Then select a non-SAN Media Manager or other storage unit type that is appropriate to back up the control files and transaction logs.

11 Click the Clients tab. Specify the clients to be included in this policy. 12 Click the Backup Selections tab. Specify a backup template or script. For information about using templates and scripts with a NetBackup for DB2 policy with Snapshot Client, see “Snapshot Client effects” on page 118. 13 Configure other attributes and add any additional schedules and backup selections.

Restoring data from a snapshot backup
The following sections describe how to restore files, volumes, and file systems from a snapshot backup.

Restoring individual files
Data that was backed up with Snapshot Client methods is restored in the same way as data that was backed up without Snapshot Client methods. Use the procedure in “Performing a restore” on page 85 to restore data from a snapshot backup. Use this procedure for the files that were backed up with, or without, instant recovery enabled. In all cases, NetBackup determines the files that were backed up, and it initiates a corresponding restore request to the database agent.

NetBackup for DB2 with Snapshot Client Restoring data from a snapshot backup

109

If instant recovery is enabled, NetBackup attempts to restore the file by using the unique restore methods available with the instant recovery feature. The type of restore method that NetBackup uses depends on your environment and the type of backup performed. If NetBackup is unable to use any of the instant recovery methods, it restores the file in the typical manner. Data is copied from the snapshot to the primary file system. For information on the instant recovery methods that NetBackup uses, see the NetBackup Snapshot Client Administrator’s Guide.

Restoring volumes and file systems using snapshot rollback
You can request that an entire volume or an entire file system be restored from an instant recovery Snapshot backup. This type of a restore is called a point in time rollback. All the data in the snapshot is restored; single file restore is not available in a rollback. You can perform a snapshot rollback from an instant recovery backup that was made with the following methods:
■ ■ ■

VxFS_Checkpoint snapshot vxvm snapshot FlashSnap snapshots

The NetBackup Snapshot Client Administrator’s Guide contains more information on snapshot rollbacks. The following considerations are relevant for NetBackup for DB2 restores:
■ ■

Snapshot rollback overwrites the entire volume. With NetBackup for DB2, snapshot rollback always performs file verification. The agent checks for the following:

The requested files (number and names) are identical to those in the snapshot

The primary volume does not contain any files that were created after the snapshot was made If verification fails, the rollback aborts with 249.

Snapshot rollback should be used with database files only. Database files and archive logs should exist on different file systems or volumes.

Restoring volumes and file systems using block-level restore
The procedure for specifying a snapshot rollback restore depends on the method you choose to perform the restore. Use one of the following methods:

Use the NetBackup for DB2 recovery wizard for the restore. Optional. For SS. as follows: ■ ■ ■ ■ ■ ■ -d dbalias -u user -p password -s session -n node_number -t mm/dd/yyyy [HH:MM:SS] For mm. Optional. Click the Restore Files tab. Troubleshooting If the rollback restore fails. Optional. The node number. type the minute of the hour. See “Performing a restore” on page 85. The time of the backup. For yyyy. Optional. Database alias. type the year. type the second of the minute. For MM. Archive. . User name of the DB2 user. type the month. and Restore Interface. The number of sessions. To specify a snapshot rollback restore using a command ◆ Use the bpdb2proxy command in the following format: /bp/bin/bpdb2proxy -rollbkrestore -d dbalias -u user -p password [-s session] [-n node_number] [-t mm/dd/yyyy [HH:MM:SS]] where: -rollbkrestore Specifies that this restore is from a snapshot rollback. Shut down and restart the database to try to correct this problem. Set the Restore Type to Point in Time Rollback. The default is 0. it might be because the database still has a file open. type the day of the month. For dd. type the hour of the day. Optional. Optional. For HH.110 NetBackup for DB2 with Snapshot Client Restoring data from a snapshot backup To specify a snapshot rollback restore from the Java or Windows interface 1 2 3 4 5 Go to the NetBackup Backup. Follow the restore procedure for typical backups. Password for the DB2 user.

BLI backup supports two types incremental backups: differential and cumulative. The recommended method for performing BLI backups is the proxy BLI agent with NetBackup for DB2. Full. full database backups are costly in terms of time and media. which means only changed blocks are backed up. and it is completely transparent. only modified data blocks need to be backed up. BLI backup saves time. It also remains tightly integrated with NetBackup for DB2 and its catalog. Using most traditional methods for database backup. When performing a restore. Note that restoring a file rewrites all blocks in that file. any change in the database—no matter how small—requires that the entire database is backed up. NetBackup restores an appropriate full backup. differential incremental. How does BLI work? NetBackup supports BLI full backups and BLI incremental backups of DB2 databases. This method supports the other features of NetBackup for DB2. which greatly simplifies administration tasks. BLI backup is particularly useful for any large databases that are sized in terms of hundreds of gigabytes or terabytes. BLI backup does not need to search the entire database for the modified blocks. and significantly reduces CPU and network overhead during backups. so backup images are more up-to-date. or the restore cannot proceed.NetBackup for DB2 with Snapshot Client Configuring block-level incremental backups 111 Configuring block-level incremental backups If only a small portion of a database changes on a daily basis. NetBackup performs this restore process automatically. decreases the amount of backup media that is required. Changed files are not backed up. VxFS Storage Checkpoint facility identifies changed blocks in real time. A database BLI backup is done at the file system block level. The block-level incremental (BLI) backup interface extends the capabilities of NetBackup to back up only changed data blocks. Restoring any of the incremental backup images requires NetBackup to restore the last full backup image and all the subsequent incremental backups until the specified incremental backup image is restored. In addition. BLI backup allows more frequent backups. Using BLI backup. then it applies the changed blocks from the incremental backups. The media that stored the last full backup and the subsequent incremental backups must be available. The first subsequent differential incremental backup and all subsequent cumulative incremental . and cumulative incremental backups are specified as part of the backup schedule. including the policy types and schedules and the convenience of the template generation wizard.

VxFS Storage Checkpoint facility provides a consistent view of file .and I/O-efficient snapshot of file systems. This section uses the following terms to describe BLI backups: ■ Full Backup. but a cumulative BLI backup can reduce the number of incremental backup images that must be applied to a restore operation. The destination VxFS file system does not need to support the Storage Checkpoint feature to restore files. the VxFS Storage Checkpoint enables BLI backups. This speeds up the restore process. Storage Checkpoint The BLI backup methodology uses the Storage Checkpoint facility in the Veritas File System (VxFS). manages. A backup in which NetBackup backs up the entire database file. ■ ■ When NetBackup initiates full database backups.112 NetBackup for DB2 with Snapshot Client Configuring block-level incremental backups backups back up all the blocks in the restored file. A Storage Checkpoint provides a consistent. NetBackup with BLI backup leverages this facility to back up only changed blocks. JFS (AIX). By keeping track of changed blocks. The VxFS Storage Checkpoint facility keeps track of data blocks modified by the database since the last backup. the first subsequent backup results in a full backup. cumulative incremental. and uses the appropriate Storage Checkpoints of the DB2 container file systems. After restoring an entire database. Instead of making a physically separate copy of the file system. saving disk space and significantly reducing I/O overhead. followed by BLI backups. Differential BLI backup. not the entire database. it creates. These Storage Checkpoints identify and maintain a list of modified blocks. not just data blocks changed since the last full or incremental backup. or differential incremental backup) was performed. or HFS (HP-UX) file system. This is a backup of all the data blocks of database files that changed since the last full backup. A cumulative BLI backup image contains only the data blocks of database files that changed since the last full backup. This facility is available through the Storage Foundation for DB2. The restore destination can be a VxFS. a Storage Checkpoint identifies and maintains only changed file system blocks. VxFS Storage Checkpoint is a disk. stable view of a file system at the instant when the file system was snapped or checkpointed. Cumulative BLI Backup. but a VxFS file system with the Storage Checkpoint feature is needed to perform BLI backups of the restored data. for an incremental backup. This is a backup in which NetBackup performs a backup of only those data blocks of database files that changed since the last backup of any type (full. UFS (Solaris).

.NetBackup for DB2 with Snapshot Client Configuring block-level incremental backups 113 systems. the additional space required by each file system is about 1% of the file system size. To support BLI backup. The Checkpoint image is managed and available only through NetBackup or through the VxDBA utility for database backup available with the Veritas Storage Foundation. the VxFS file systems need extra disk space to keep track of the block change information. When using Fulldata Storage Checkpoints. Fulldata Storage Checkpoint The Fulldata Storage Checkpoint makes a copy of the original data block before making a change. When using Nodata Storage Checkpoints. For more information on Storage Checkpoints. The default option used by NetBackup for DB2 with Snapshot Client for backups is to use Fulldata Storage Checkpoint. the NetBackup for DB2 agent keeps DB2 container in quiesce/write suspend mode only for the time needed to create a Storage Checkpoint. The Storage Checkpoint operation is similar to the snapshot file system mechanism. however. unlike a snapshot. During the creation of the Storage Checkpoint. If the database has a heavy workload while a full backup is running. you must enable archive log mode. To take a Storage Checkpoint while the database is online. However. see the Veritas Storage Foundation documentation. the Storage Checkpoint operation is totally transparent to administrators. the data files are left in quiesce/write suspend mode for the duration of the backup. allowing BLI backup to freeze the database image during database backups. so the extra archive log space used is very small. For Nodata Storage Checkpoints. You can take a Storage Checkpoint while the database is online or offline. an additional 10% of the file system size is usually sufficient. Also. is needed to keep a copy of the original block of data that was changed. the file systems might require more space. the Storage Checkpoint persists after a system reboot. The amount of archive logs generated depends on the number of changes made during the backup. Space in the file system. all tablespaces are placed in backup mode. The space required depends on the database workload while the backup is running. By using this option. If the workload is light during the backup or if the backup window is relatively short (such as for incremental backups). the database is in quiesce/write suspend mode for only a few seconds while the Storage Checkpoint is created. Nodata Storage Checkpoint The Nodata Storage Checkpoint sets a bit to indicate that a block has changed.

When Fulldata Storage Checkpoint is in effect. Storage Checkpoint configuration on the client By default. which can remain empty: /usr/openv/netbackup/ext/db_ext/NODATA_CKPT_PROXY If the agent finds this file during run time. too. see the NetBackup Snapshot Client Administrator’s Guide. BLI backups do not back up the transaction logs. the NetBackup for DB2 agent keeps the DB2 database in quiesce/write suspend mode only for the time needed to create a Storage Checkpoint. make sure your configuration meets the following requirements: ■ ■ NetBackup for DB2 is installed. configure the following: ■ ■ The BLI backup method on the policy attributes dialog box. Include policies to perform file-based and stream-based backups. this mode provides the best recoverability for taking offline Storage Checkpoints. .114 NetBackup for DB2 with Snapshot Client Configuring block-level incremental backups While archive log mode is required when the database is online. An Automatic Backup schedule to perform full and incremental file-based backups of the data files. Configuring policies for BLI backups This section explains how to configure BLI backups for DB2 policies. a user must create the following file. Configuration requirements Before configuring BLI backups. To configure a policy for BLI backups. To change the default option to use Nodata Storage Checkpoint. and the license key for this option has been registered. Veritas Storage Foundation for DB2 must be installed and configured. Veritas File System must have Storage Checkpoint licensed. Your backup configuration must ensure that the entire database can be successfully restored. the NetBackup for DB2 with Snapshot Client for proxy BLI backups uses the Fulldata Storage Checkpoint. and configured. licensed. it uses Nodata Storage Checkpoint. NetBackup Snapshot Client is installed and configured. and it keeps the data files in quiesce/write suspend mode for the duration of the backup. ■ ■ For more information on requirements.

specify the template or script. ■ The following procedure describes how to configure a NetBackup for DB2 policy with BLI backups. NetBackup for DB2 checks that a full backup has been performed before proceeding with an incremental backup. configure the following: ■ One or more automatic backup schedules to perform proxy BLI backups of the database. ■ 7 8 On the Clients tab. Specify this schedule if you are using the VENDOR method for backing up the transaction logs. These files are backed up using standard NetBackup for DB2 operations. (Conditional) A User Backup schedule to perform a stream-based backup of transaction logs. and NetBackup for DB2 finds no record of a full backup using the same policy. On the Backup Selections tab. click the Schedules tab. Select Perform block level incremental backups. To perform a whole database proxy backup. If the NetBackup scheduler or user initiates an incremental backup. which automatically includes a backup of the control file. DB2 does not support proxy backups of database control files and archive logs. and Automatic Cumulative Incremental Backup schedules. Specify this schedule if you are using the user exit program to back up the transaction logs.NetBackup for DB2 with Snapshot Client Configuring block-level incremental backups 115 ■ (Conditional) An Application Backup schedule to perform a stream-based backup of transaction logs. Select a Policy storage unit. Click the Attributes tab. NetBackup performs a full backup when it encounters the following situations: . To configure schedules. An Application Backup schedule type to back up the control files and archive logs. choose DB2. From the Policy Type list. specify clients to be backed up with this policy. it performs a full backup. Automatic Differential Incremental Backup. To configure a policy for BLI backups 1 2 3 4 5 6 Open the policy you want to configure. To ensure that it has a proper set of images to restore. Types of BLI backups Proxy BLI backups are performed by Automatic Full Backup.

if you are using Third-party Copy as your off-host backup method. override the policy storage unit by specifying a non-SAN media manager or other storage unit type for the Application Backup schedule. Application Backup . for example. This can be accomplished through the GUI or through a DB2 command. Table 5-1 on page 118 explains these roles. even if you want to perform an incremental backup. Table 5-1 Backup type Backup types for DB2 Description The Application Backup schedule enables stream-based NetBackup operations. ■ NetBackup for DB2 always initiates a full backup under these conditions. if images were expired. The Default-Application-Backup schedule is automatically configured as an Application Backup schedule. Snapshot Client also affects scripts. On UNIX clients. and templates. If NetBackup does not have a valid full backup image for the same policy in its database.116 NetBackup for DB2 with Snapshot Client Snapshot Client effects ■ If the number of backup streams specified has changed from the previous backup. This can occur. Types of backups The backup types available on the Schedules tab of the policy play a different role for NetBackup for DB2 with Snapshot Client backups. schedule properties. Snapshot Client effects The following sections describe the ways in which the Snapshot Client software affects backup types.

Automatic Cumulative Incremental Backup Automatic backup schedules automatically start the backups by running the NetBackup for DB2 scripts or templates. “Schedule properties” on page 46 describes other schedule properties that are specific to database agent backups. DB2 always updates the database headers when performing a checkpoint of the database. NetBackup for DB2 with Snapshot Client uses the Automatic Full Backup. the automatic backup schedule types serve two purposes: ■ ■ Automatic Full Backup. Automatic backup schedules control file-based snapshot backups of the database objects. or Automatic Cumulative Incremental Backup retention period to specify how long to keep proxy file-based backup images. Table 5-2 Property Retention Schedule properties Description Frequency based scheduling: For proxy backups.NetBackup for DB2 with Snapshot Client Snapshot Client effects 117 Table 5-1 Backup type Backup types for DB2 (continued) Description For file-based proxy copy backups. configure Multiple copies on the automatic backup schedule. Table 5-2 on page 119 explains these properties. Automatic Differential Incremental Backup. This means that an incremental backup that copies each changed file in its entirety is likely to include all of a database’s files. Automatic Differential Incremental Backup. Note: Snapshot backups do not support BLI functionality. NetBackup uses the Automatic Full Backup. Multiple copies For proxy file-based backups. Specifying any of the automatic backup types results in a full backup. or Automatic Cumulative Incremental Backup retention period to specify how long to keep proxy file-based backup images. Schedule properties Some schedule properties have a different meaning for Snapshot Client database backups than for a regular database backup. Automatic Differential Incremental Backup. . Calendar based scheduling: For proxy backups. effectively performing a full backup.

you must enable the advanced backup method for your clients by configuring the Snapshot Client methods on the Attributes tab of the policy. At run time. performing NetBackup for DB2 with Snapshot Client backups and restores is similar to regular NetBackup for DB2 operations. from the command line as a DB2 user (with the bpdb2proxy command) All three of these methods require a DB2 policy with Snapshot Client configuration. Performing backups There are three ways to perform NetBackup for DB2 backups with Snapshot Client: ■ ■ ■ Server-directed. See “Creating templates and shell scripts” on page 63. the script must reside on each client included in the policy. and it initiates the proxy file-based backup. Whether you use a template or script. See “Configuring the DB2 policy with Snapshot Client backup methods” on page 107. . both automatic and scheduled from the master server User-directed. via template creation and execution on the client User-directed. Sample scripts are included with the installation. Using NetBackup for DB2 with Snapshot Client After configuration is complete. The following sections describe some of the differences. Include the DB2 bpdb2proxy command in the script to perform the advanced backup method.118 NetBackup for DB2 with Snapshot Client Using NetBackup for DB2 with Snapshot Client Templates and scripts You can use a template created by the backup wizard to perform backups with Snapshot Client. templates reside on the NetBackup master server and are available for use by other [NetBackup Product] clients. Server-directed backups The configuration procedures in this chapter describe the process for configuring policies for DB2 backups with Snapshot Client. These policies specify Snapshot Client backups for the DB2 database. After they are created. the template checks the policy attributes to determine if an Snapshot Client backup method is configured. If you use a script.

the restore fails. . use the bpdb2proxy command. You must be the DB2 user to use the bpdb2proxy command. Archive. You can also create a new template using the DB2 Backup Wizard. User-directed backups using bpdb2proxy Use the bpdb2proxy command to perform an Snapshot Client backup of your DB2 database from the command line. use the NetBackup for DB2 Recovery Wizard to select the files you want to restore and the parameters for the restore. and Restore interface. If the backup image was created with Snapshot Client methods. you can run a template through DB2 Template Administration (by clicking Actions > Administer Templates > DB2). The backup that results from the template is an Snapshot Client backup if the policy for the client is configured for Snapshot Client methods. Note: The backup image you restore with bpdb2proxy must be from an Snapshot Client method backup. User-directed restores using templates To perform a restore from the Backup. Use the bpdb2proxy command in the following format to back up a DB2 database with an Snapshot Client method: /bin/bpdb2proxy -backup -d dbalias -u user -p password Performing restores Perform NetBackup for DB2 Snapshot Client restores from the DB2 client. Specify the policy by adding the client to that policy on the master server. For backups. specify the -backup option with bpdb2proxy. You can also specify the policy in the db2. and run the template from the Template Complete screen. You must be the DB2 user to use the bpdb2proxy command.conf file on the client. specify the -restore option with bpdb2proxy. The following sections describe the restore methods. otherwise. and Restore interface. the restore uses Snapshot Client methods. Archive. For restores.NetBackup for DB2 with Snapshot Client Using NetBackup for DB2 with Snapshot Client 119 User-directed backups using templates To perform a backup from the Backup. User-directed restores using bpdb2proxy To perform a restore from the command line.

. see “Restoring data from a snapshot backup” on page 110.120 NetBackup for DB2 with Snapshot Client Using NetBackup for DB2 with Snapshot Client Use the bpdb2proxy command in the following format to restore a DB2 database with an Snapshot Client method: /bin/bpdb2proxy -restore -d dbalias [-u user] [-p password] Restoring from a snapshot backup For information on restoring files from a snapshot backup.

see the NetBackup Troubleshooting Guide and the /usr/openv/netbackup/logs/README. each debug log corresponds to a NetBackup process and executable. . Note the following with regard to these logs: ■ These logs do not reveal errors that occur when DB2 commands is running unless those errors also affect NetBackup. and the DB2 commands provide reports on database operations.Chapter 6 Troubleshooting NetBackup. The information in these log files can help you troubleshoot problems that occur outside of either the database agent or the DB2 commands. Generally. These reports are useful for finding errors associated with those applications. DB2 might (or might not) write to the NetBackup logs for errors in the application. ■ For information about the debugging log files. Your best sources for DB2 error information are the logs provided by DB2.debug file. NetBackup for DB2. This chapter contains the following topics: ■ ■ ■ ■ ■ ■ “NetBackup reports” on page 121 “Setting the debug level” on page 123 “Minimizing timeout failures on large database restores” on page 124 “Using NET_BUFFER_SZ to speed up a slow restore” on page 124 “False restore failures reported in the activity monitor” on page 125 “Reason codes” on page 125 NetBackup reports The NetBackup server and client software allow you to enable detailed debugging logs.

Accessing the log files The following sections describe the logs created when you create the log directories.122 Troubleshooting NetBackup reports Enabling logging To enable the database agent logs 1 Create the following directories on the client: /usr/openv/netbackup/logs/bpbackup /usr/openv/netbackup/logs/bpbkar /usr/openv/netbackup/logs/bpdb2 /usr/openv/netbackup/logs/bpdbsdb2 /usr/openv/netbackup/logs/bphdb /usr/openv/netbackup/logs/bprestore /usr/openv/netbackup/logs/bpubsdb2 /usr/openv/netbackup/logs/dbclient /usr/openv/netbackup/logs/tar /usr/openv/netbackup/logs/backint For example: cd /usr/openv/netbackup/logs mkdir bphdb 2 Set the access permissions to 777 on these log directories. Use a text editor to view the contents of the logs. NetBackup writes DB2 script output to this file. .mmddyy Unless redirected elsewhere.mmddyy Unless redirected elsewhere. For example: chmod 777 bphdb 3 Enable logging for the nbpem. which use unified logging. and nbrb scheduling processes. You do not need to create log directories for processes that use unified logging. NetBackup writes unified logs to /usr/openv/logs. For information on using logs and reports. db2_stderr. nbjm. bphdb directory on the client The /usr/openv/netbackup/logs/bphdb directory contains the following types of logs: db2_stdout. NetBackup writes DB2 script errors to this file. see the NetBackup Troubleshooting Guide.

.Troubleshooting Setting the debug level 123 log.mmddyy This log contains debugging information and execution status for the DB2 NetBackup client processes linked to the library program provided with NetBackup for DB2. Typically. Technical Support might ask you to set the value higher when a problem is being analyzed. Setting the debug level You can control the amount of information written to the debugging logs in the /usr/openv/netbackup/logs/ directories by changing the debug level.mmddyy bphdb is the NetBackup database backup binary. NetBackup for DB2 uses this client process for DB2 script execution. This log contains debugging information for the bphdb process. the default value of 0 is sufficient. NetBackup server reports NetBackup provides other reports that are useful in isolating problems. see the NetBackup Administrator’s Guide. It is invoked when an automatic backup schedule is run.mmddyy This log contains debugging information and execution status for the NetBackup for DB2 backup and recovery wizards and for the bpdbsbdb2 command line utility. For information on server reports. You can set a debug level to a value ranging from 0 to 5. A level of 5 provides the most detail. backint directory on the client The /usr/openv/netbackup/logs/backint directory contains the following execution log: log. bpdbsbdb2 directory on the client The /usr/openv/netbackup/logs/bpdbsbdb2 directory contains the following execution log: log. One such report is All Logs Entries on the server. However. This log also contains the debugging information and execution status information that is generated when a DB2 template is run from an automatic schedule (when bphdb invokes bpdbsbora to run the template).

you can increase file restore speeds by creating a file called NET_BUFFER_SZ on the NetBackup master server in the NetBackup install directory. add the following options: ■ ■ MEDIA_UNMOUNT_DELAY. 3 To minimize loading and unloading of tapes You can minimize excessive unloading and reloading of tapes between multistreamed backups by making changes on the NetBackup media server. In this situation. Use the following procedures to minimize session timeouts and to allow the restores to complete successfully. To minimize database session timeouts 1 2 In the NetBackup administration console. For database agent clients. MEDIA_REQUEST_DELAY. such as tape stackers.124 Troubleshooting Minimizing timeout failures on large database restores To enable detailed logging ◆ Enable detailed logging by entering the following line in the bp. a restore session can be delayed while waiting for media or device access. and your NetBackup master server is a UNIX machine.conf file: VERBOSE = 5 Minimizing timeout failures on large database restores Large database restores sometimes fail when multiple restore sessions compete for resources. . the restore session times out. Volume 1. For example. Click OK for each client. ◆ In the /usr/openv/netbackup/bp. Use this variable only with non-robotic drives. increase the value significantly from the value recommended in the NetBackup Administrator’s Guide. expand NetBackup Management > Host Properties > Clients Set the Client read timeout property to a large value. Using NET_BUFFER_SZ to speed up a slow restore If file restores are slow. change this setting to 30-60 minutes to minimize timeout errors. The default for the Client read timeout setting is 300 seconds (5 minutes).conf file on the NetBackup media server. If the delay is too long.

Note: This only applies when the NetBackup master server is a UNIX machine. in bytes. This can occur during restores if DB2 reads a portion of a backup image but not the entire image. Cause: The vendor library shared library cannot be found or accessed.Troubleshooting False restore failures reported in the activity monitor 125 To create the NET_BUFFER_SZ file 1 2 3 Log into a UNIX master server. that the vendor library exists. see the log files. Use vi(1) or another editor to create file /usr/openv/netbackup/NET_BUFFER_SZ. False restore failures reported in the activity monitor In some restore scenarios. For example: 32768 bytes = 32K 4 Save and close the file. and that the vendor library has the correct file access permissions. For more information about an error message. DB2 reports a successful restore status. but the NetBackup activity monitor reports failures. 1 Message (from DB2): SQL2071N An error occurred while accessing the shared library “shared_lib_path”. Action: Verify that the correct path is specified. 2 Message (from DB2): . Add a line that specifies the socket size. Reason code: “1”. This section describes the DB2 and NetBackup reason codes. Reason codes Errors can occur while accessing the NetBackup shared library during the processing of a DB2 database utility BACKUP or RESTORE.

126 Troubleshooting Reason codes

SQL2071N An error occurred while accessing the shared library “shared_lib_path”. Reason code: “2”. Cause: Specified the 32-bit vendor library for a 64-bit instance, or vice versa. Action: Use the 32-bit vendor library on 32-bit instances, and use the 64-bit library on 64-bit instances.

300
Message: ERR - No match for a database image file was found based on the following criteria. Cause: The restore criteria of database name, instance, type, and backup time object cannot be found in the NetBackup database. Action: Use bplist to make sure the image you are trying to restore exists. Make sure the correct instance is being used. Make sure the correct values are set in db2.conf and bp.conf. If logging is enabled, check the current log file in the following directory for more information: /usr/openv/netbackup/logs/bpdb2

305
Message: ERR - found more than one object. Cause: Multiple DB2 backup images were found in the NetBackup database that matched the restore criteria of database name, instance, type, and backup time. Action: This should not happen under typical operations. If logging is enabled, check the current log file in the following directory for more information: /usr/openv/netbackup/logs/bpdb2

310
Message: ERR - bp.config failed with status status. Cause: Unable to read configuration file /usr/openv/netbackup/bp.conf.

Troubleshooting Reason codes

127

Action: Make sure this file exists and is properly configured. If logging is enabled, check the current log file in the following directory for more information: /usr/openv/netbackup/logs/bpdb2

330
Message: ERR - Invalid options encountered for action action. Cause: Invalid option(s) encountered for action. Action: Make sure the action parameters are used properly.

335
Message: ERR - in get DB2 UDB level. Cause: NetBackup server and the NetBackup for DB2 shared library are not at the same level. Action: Make sure that the NetBackup and the DB2 shared library are at the same level. Check the log file in the following directory: /usr/openv/netbackup/logs/bpdb2 Check the version number of the shared library and the version number for NetBackup. If they are not the same, install the same level.

380
Message: ERR - db2.conf read status error error. Cause: db2.conf read status error. Action: Make sure the directory is accessible with read and write permissions. Make sure the file exists and has read permission.

385
Message: ERR - Found multiple <DATABASE> entries before an <ENDOPER> entries was encountered. Cause:

128 Troubleshooting Reason codes

Found multiple DATABASE entries before an ENDOPER entry was encountered in the following file: $HOME/db2.conf Action: Remove the extra DATABASE entry.

390
Message: ERR - Found multiple <OBJECTTYPE> entries before an ENDOPER entries was encountered. Cause: Found multiple OBJECTTYPE entries before an ENDOPER entry was encountered in the following file: $HOME/db2.conf Action: Remove the extra OBJECTTYPE entry.

395
Message: ERR - Found multiple <POLICY> entries before an <ENDOPER> entries was encountered. Cause: Found multiple POLICY entries before an ENDOPER entry was encountered in the following file: $HOME/db2.conf Action: Remove the extra POLICY entry.

400
Message: ERR - Found multiple <SCHEDULE> entries before an <ENDOPER> entries was encountered. Cause: Found multiple SCHEDULE entries before an ENDOPER entry was encountered in the following file: $HOME/db2.conf Action: Remove the extra SCHEDULE entry.

405
Message:

conf for <DATABASE database> and <OBJECTTYPE objecttype>. Cause: Found multiple RETDIR entries before an ENDOPER entry was encountered in the following file: $HOME/db2. Cause: Found multiple ARCDIR entries before an ENDOPER entry was encountered in the following file: $HOME/db2. Cause: Policy name or schedule name is not specified in the POLICY or SCHEDULE entry in the following file: $HOME/db2. 420 Message: ERR .need to specify a valid POLICY or SCHEDULE in db2.conf Action: Remove the extra ARCDIR entry.conf . 410 Message: ERR . 415 Message: ERR .Found multiple <RETDIR> entries before an <ENDOPER> entries was encountered.conf Action: Remove the extra RETDIR entry.Found multiple <ARCFUNC> entries before an <ENDOPER> entries was encountered. Cause: Found multiple ARCFUNC entries before an ENDOPER entry was encountered in the following file: $HOME/db2.conf Action: Remove the extra ARCFUNC entry.Found multiple <ARCDIR> entries before an <ENDOPER> entries was encountered.Troubleshooting Reason codes 129 ERR .

Cause: .conf Action: Add an ARCDIR field with an appropriate directory name to the following file: $HOME/db2.need to specify a valid ARCDIR in db2.ARCDIR field needs to be specified in the db2. 430 Message: ERR . Cause: Invalid ARCDIR is specified in db2.130 Troubleshooting Reason codes Action: Add an appropriate policy name or schedule name to the POLICY or SCHEDULE entry.conf file.conf 435 Message: ERR .RETDIR field needs to contain a valid file when OBJECTTYPE is equal to ARCHIVE: string.conf 440 Message: ERR .conf.conf: Errno = error_no : string. Cause: No ARCDIR entry found in the following file: $HOME/db2. 425 Message: ERR . Cause: RETDIR field does not contain a valid file. Action: Add an appropriate directory name to the ARCDIR entry. Action: RETDIR field must contain a valid file when OBJECTTYPE ARCHIVE is specified in the following file: $HOME/db2.COPY or SAVE needs to be specified for ARCFUNC when OBJECTTYPE is equal to ARCHIVE.

. Action: Need to specify a copy or save parameter for ARCFUNC if OBJECTTYPE ARCHIVE is also specified. 445 Message: ERR . Cause: POLICY entry is not specified in the following file: $HOME/db2.conf file.conf 502 Message: NetBackup DB2 Handle Invalid Cause: Internal communication between DB2 and NetBackup has failed.Invalid <OBJECTTYPE> entries: entry.POLICY entry needs to be specified. Cause: Invalid OBJECTTYPE entry in the following file: $HOME/db2.Troubleshooting Reason codes 131 Found OBJECTTYPE ARCHIVE but no ARCFUNC in the db2.conf Action: Add the appropriate policy name to the POLICY entry in the following file: $HOME/db2.conf Action: Add the appropriate object type to the following file: $HOME/db2.conf 450 Message: ERR .conf Action: Add the appropriate object type to the following file: $HOME/db2.OBJECTTYPE entry needs to be specified.conf 455 Message: ERR . Cause: OBJECTTYPE entry is not specified in the following file: $HOME/db2.

This can indicate a problem in obtaining necessary resources. This can result from improper configuration. 513 Message: NetBackup Begin Action Failed Cause: NetBackup encountered errors when attempting to start the requested operation. Cause: This can result from using an unsupported version of DB2. 510 Message: NetBackup Read Config Failed Cause: NetBackup encountered errors in reading configuration settings. Action: Check that the NetBackup client and server settings have been configured.132 Troubleshooting Reason codes 505 Message: The input parameters supplied by DB2 are not valid.conf file exists and has been configured. 511 Message: NetBackup Write Config Failed Cause: NetBackup encountered errors in preparing for the requested operation. This can result from improper configuration. Also verify that the db2. 514 Message: NetBackup Create Image Failed . 507 Message: NetBackup Initialize Failed Cause: NetBackup encountered errors in preparing for the requested operation.

524 Message: NetBackup Commit Action Failed Cause: . 516 Message: NetBackup Find Image Failed Cause: NetBackup encountered errors when attempting to locate a backup image. 520 Message: NetBackup Read Failed Cause: NetBackup encountered errors when reading a backup image. 523 Message: NetBackup Commit Data Failed Cause: NetBackup encountered errors when attempting to close the backup image. 518 Message: NetBackup Write Failed Cause: NetBackup encountered errors when writing a backup image. 515 Message: NetBackup Get Image Failed Cause: NetBackup encountered errors when attempting to access a backup image.Troubleshooting Reason codes 133 Cause: NetBackup encountered errors when attempting to create a backup image.

. 526 Message: NetBackup Abort Action Failed Cause: NetBackup encountered errors when attempting to abort the previously requested operation.134 Troubleshooting Reason codes NetBackup encountered errors when attempting to complete the requested operation. and DB2 is attempting to delete any incomplete images. 528 Message: NetBackup Delete Image Failed Cause: NetBackup encountered errors when attempting to expire an incomplete backup image. This typically indicates that the previous operation has failed.

Appendix

A

Configuration for a DB2 EEE (DPF) environment
This appendix includes the following topics:
■ ■ ■

“Installing NetBackup for DB2” on page 135 “Configuring NetBackup for DB2” on page 135 “Creating DB2 templates or scripts for a DB2 EEE environment” on page 136

The IBM DB2 Enterprise Extended Edition (EEE) environment is a database that is distributed across multiple hosts or partitions. In a non-EEE environment, the database is typically centralized on a single host. The Database Partitioning Feature (DPF) is equivalent to the EEE. This appendix contains instructions for installing and configuring NetBackup for DB2 in an Extended Enterprise Edition (EEE) or Database Partitioning Feature (DPF) environment. In this appendix, all instructions that refer to an EEE environment are also applicable for a DPF environment.

Installing NetBackup for DB2
In a DB2 EEE (DPF) environment, install the NetBackup client and NetBackup for DB2 software on every client used by DB2.

Configuring NetBackup for DB2
The configuration process for NetBackup for DB2 in a DB2 EEE environment is the same as the configuration process for NetBackup for DB2 in a non-EEE environment with the exception of the procedure for adding a backup policy.

136 Creating DB2 templates or scripts for a DB2 EEE environment

Creating DB2 templates or scripts for a DB2 EEE environment
Templates and scripts operate on a single NetBackup client. If your EEE/DPF environment spans multiple machines, create at least one template or script for each machine. For example, assume your database spans two hosts, and host H1 contains partition P1, and host H2 contains partitions P2 and P3. You need at least 2 templates:
■ ■

One template for partition P1 on host H1 One template for partitions P2 and P3 on host H2.

Caution: Proper backup and restore of the catalog partition is the user's responsibility. Generally, it is recommended that the catalog partition is the first node backed up and the first partition restored. For more information, see your DB2 documentation. For information on creating Backup templates, see “Creating a backup template using the NetBackup for DB2 backup wizard” on page 64. For information on creating recovery templates, see “Using the NetBackup for DB2 recovery wizard” on page 83. Rollforward recovery to a point-in-time (PIT) is not supported. DB2 requires that PIT recovery be run via the same operation for all partitions and tablespaces on all machines. Templates do not span machines.

Appendix

B

Using NetBackup for DB2 with SAP®
This appendix contains the following topics:
■ ■ ■ ■

“Installation of the DB2 user exit program” on page 137 “Backup and restore of DB2 databases” on page 138 “Archive and restore of DB2 log files” on page 138 “Backup of SAP files” on page 138

When a DB2 database is used by SAP software, NetBackup for DB2 can be used within that environment for backup and restore of SAP data. This chapter provides guidelines for using SAP, DB2, and NetBackup together.

Installation of the DB2 user exit program
DB2 allows for the presence of a single user exit program to manage archiving of database log files. Both SAP and NetBackup deliver user exit programs for exclusive use by DB2. The user exit program resides in the DB2 database directory as db2uext2. The use of the NetBackup user exit program is required because it automatically archives log files to a storage unit and because it enables on-demand recovery of log files by DB2. Take precautions when installing SAP to prevent overwriting the NetBackup user exit program. Always preserve the NetBackup db2uext2 file before installing SAP and restore afterwards.

For instance. Backup of SAP files Be certain to include any and all SAP files when planning for SAP recovery. Caution: Do not use SAP CCMS. or brrestore commands to initiate backups or restores. brarchive commands. SAP must not be running when attempting to restore the database. Archive and restore of DB2 log files Follow the standard NetBackup instructions in this document for configuring the user exit program. You can use either DB2 or NetBackup to initiate database backups and restores. Caution: Do not use SAP CCMS. not just the DB2 database. Archive. sapdba.138 Backup and restore of DB2 databases Backup and restore of DB2 databases Follow the standard NetBackup instructions in this document for backup and restore of the DB2 database(s) used by SAP. any regular files used by SAP can be backed up using standard NetBackup file backup procedures. They depend on the SAP user exit program for proper operation. or the SAP Logfile Management window in the DB2 Control Center for log file archival. . They do not invoke NetBackup. brbackup. sapdba. DB2 will automatically invoke the user exit program to archive and recover the necessary log files. and Restore online help. consult the “Performing Backups” section in the NetBackup Backup. For file backup instructions.

119 bpdbm daemon 28 bpdbsbdb2 command syntax 77 running a backup template 77 running a recovery template 85 bphdb log 123 bplist command 79. 118 wizard. 59 ARCFUNC SAVE keyword 54. Archive.conf 49 overview 16 restoring 87 restoring from a raw partition 59 automatic backup create scripts 68 overview 74 policy 74 Automatic Backup schedule configuring 41 Automatic Cumulative Incremental Backup schedule overview 43 Snapshot Client effects 117 Automatic Differential Incremental Backup schedule overview 43 Snapshot Client effects 117 Automatic Full Backup schedule 42. invoking 66. 48 overview 46 Backup. 78 Backup Selections list adding selections 47. and Restore 79 using bplist 80 . 59 ARCHIVE LOG command 15 archive logs backing up 32. 74. 74 configuring policies 50 keywords for backing up in db2.Index A Application Backup schedule backup window 41 configuring 40 environment variables 62 for Block-level Incremental backups 115 overview 40. 28 browse for restore using Backup. 43 Snapshot Client effects 117 with Snapshot Client 105 B backup archive log 74 automatic configure scripts 68 using scripts 74 database 74 manual 75 partitions 75 tablespaces 75 user-directed 75 with Snapshot Client methods 102. 80 bpplclients command 21. 118 BACKUP command 15 BACKUP DATABASE command 13. Archive.conf administrator 124 client file 60 DB2 script parameters 69 in a cluster 60 user file 61 variables 69 bpdb2proxy command 110. see Snapshot Client bp. and Restore interface invoking 64 overview 79 backups manual 70 Block-level Incremental backup. 43 retention 41 with Snapshot Client 105 ARCDIR keyword 58 ARCFUNC COPY keyword 55.

119 bpdbsbdb2 77. 56. 89 ROLLFORWARD 15 ROLLFORWARD DATABASE 13. 25.conf creating 53. 74.conf file 60 storing templates and scripts 70 cluster software prerequisites 21 cluster_config script 21.140 C client list for installation 25 CLIENT NAME variable 60 client read timeout property 124 cluster bp. 85 bplist 79. 30 I initbpdbm command 28 install script 23. see Snapshot Client D daemons. 29 compatibility information 19 configuration database debug level 123 files. 28 DISCONNECT 15 get_license_key 22. policies for backing up 52. 56 keywords 53. 16 . 78 bpdb2proxy 110. 31 QUIESCE 67 RECOVER DATABASE 13 RESTORE DATABASE 13. 30 install_dbext command 27. 74 Media Manager 20 variables 69 db2_all_backup_mpp example script 68 db2_all_restore_mpp example script 68 db2_backup example script 68 db2_restore example script 68 DB2NODE variable 67 db2uext2. 80 bpplclients 21. 56 overview 13. 100 FlashSnap snapshots 109 Fulldata Storage Checkpoint 113 G get_license_key command 22. 31 commands ARCHIVE LOG 15 BACKUP 15 BACKUP DATABASE 13. 58 object identifiers 53. see processes DATABASE keyword 59 database software prerequisites for installation 20 DB2 DPF environment configuration procedure 135 DB2 EEE environment configuration procedure 135 db2. see user exit program debug logs accessing 122 enabling 121 in /usr/openv/netbackup/logs 122 troubleshooting with log files 121 debugging level 123 DESTALIAS keyword 59 DESTINST keyword 59 DISCONNECT command 15 E ENDOPER keyword 59 environment variables 61. 50 TERMINATE 15 update_dbclients 21. 69 execution log 123 F file-based operations 99. 29. 30 initbpdbm 28 install_dbext 27. 31 installation database software prerequsites 20 local 29 platform compatibility 19 prerequisites 19 prerequisites in a cluster 21 remote 21 requirements for NetBackup software 20 instance adding instances 34 browsing for an instance 64 instant recovery.

63 maximum jobs per client 36 Media Manager configuring backup media 20 multiple copies feature 45. 32 settings 73 nbjm scheduling process 122 nbpem scheduling process 122 nbrb scheduling process 122 NET_BUFFER_SZ file 124 Nodata Storage Checkpoint 113 NODE keyword 59 K keywords ARCDIR 58 ARCFUNC COPY 55. specifying 49. 30 local installation procedure 29 log files archiving 49 enabling 122 M manual backup of a policy 75 master server. 59 DATABASE 59 db2.141 J Java interface 36 N NBDB2 vendor I/O library overview 13. 117 multiplexing overview 12 multi-streamed backups 124 multistreamed backups 103 Q QUIESCE command 67 . 14. 87 platform compatibility 19 point in time rollback 109 policy configuration adding clients 46 attributes 39 backup selections list 46 for archive logs 50 for configuration files 52 for databases 38 for Snapshot Client 105. backing up 75 PARTITIONTYPE RAW keyword 59. See Snapshot Client optimizing file restores 124 P parameters for scripts 69 partitions. nbjm.conf 58 DESTALIAS 59 DESTINST 59 ENDOPER 59 NODE 59 OBJECTTYPE ALTERNATE 59 OBJECTTYPE ARCHIVE 59 OBJECTTYPE DATABASE 59 OBJECTTYPE TABLESPACE 59 PARTITIONTYE RAW 87 PARTITIONTYPE RAW 59 POLICY 59 RETDIR 59 SCHEDULE 60 SRCALIAS 60 SRCINST 60 summary 58 O OBJECTTYPE ALTERNATE keyword 59 OBJECTTYPE ARCHIVE keyword 59 OBJECTTYPE DATABASE keyword 59 OBJECTTYPE TABLESPACE keyword 59 offhost backup. 114 overview 37 planning 37 schedules 40 testing 70 POLICY keyword 59 processes bpdbm 28 log files for NetBackup processes 122 scheduling (nbpem. 59 ARCFUNC SAVE 54. nbrb) 122 proxy copy 99 L licensing information 22.

89 restores snapshot rollback 109. 109 Snapshot Client Block-level Incremental backup configuring a policy 114 overview 98. 110. 50 S SAP. 68 install 23.142 R raw partitions 87 reason codes 125 RECOVER DATABASE command 13 Recovery Wizard also see wizard overview 83 use with Snapshot Client 118 remote folder button 48 remote installation procedure 21 reports All Log Entries report 123 database operations 121 NetBackup server reports 123 reports See also log files RESTORE DATABASE command 13. 119 RETDIR keyword 59 retention period for frequency-based schedules 45 for Snapshot Client 117 robust logging 122 ROLLFORWARD command 15 ROLLFORWARD DATABASE command 13. 104. 30 modifying 68 parameters 69 scheduler 74 storing 69 type of operation 68 server-directed backups 118 skipped clients 25 snapshot backup 98. 110 using DB2 86 with Snapshot Client methods 102. 29. using NetBackup for DB2 with 137 SCHEDULE keyword 60 schedules adding 40 automatic backup 74 frequency 44 properties 44 properties for Snapshot Client 117 retention 45 retention for Snapshot Client 117 types of schedules 40 scripts cautions for using 43. 108. 75 templates . 110 SRCALIAS keyword 60 SRCINST keyword 60 Storage Checkpoint 112 stream-based operations 99 T tablespaces backup 74. 31 creating 62 creating from templates 67 creating manually 68 errors in executing 68 examples 16. 111 configuring policies 105 effect on backup schedules 44 effects on backups and restores 118 effects on policies and schedules 116 file-based operations 99. 105. 100 instant recovery configuration requirements 104 overview 98 policy configuration 105 restore method 109 offhost backup configuration 104 configuring 107 overview 98 overview 98 proxy copy 99 snapshot backup configuration 104 configuration requirements 104 database objects included 105 overview 98 policy configuration 105 restore method 109 stream-based operations 99 theory of operations 101 snapshot rollback 109. 68 cluster_config 21.

creating 66 button on Backup Selections tab 48 creating scripts from templates 66 overview 13. 38 specifying in DB2 32 used with BACKUP DATABASE command 78 Veritas Storage Foundation 114 VxFS_Checkpoint snapshot 109 vxvm snapshot 109 W Windows interface 36 wizard . 51 V variables environment 61 for scripts 69 VENDOR method for archive logging db2. 49. 16 policies needed 33. 29 user exit program archive log backup 32. Archive. 15 recovery 15. 25. 66 overview 13. 62 recovery 83 running from Backup. minimizing 124 transaction logs see archive logs troubleshooting false restore failures reported 125 reason codes 125 backup 15. 74 overview 15. 83 use with Snapshot Client 118 U unified logging 122 update_dbclients command 21.conf keywords needed 58 overview 16. 50.143 administration 76 administration interface 74 advantages over scripts 43 backup. 62. 38. 74 policies needed 32. and Restore 76 running with bpdpsbdb2 77 storing 69 use with Snapshot Client 119 TERMINATE command 15 testing policy configuration 70 The 118 timeout failures.

144 .