Symantec Netbackup ™ For Db2 Administrator'S Guide: Windows
Symantec Netbackup ™ For Db2 Administrator'S Guide: Windows
Windows
Release 7.0
Symantec NetBackup for DB2 Administrator's Guide
The software described in this book is furnished under a license agreement and may be used
only in accordance with the terms of the agreement.
Legal Notice
Copyright © 2009 Symantec Corporation. All rights reserved.
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.
This Symantec product may contain third party software for which Symantec is required
to provide attribution to the third party (“Third Party Programs”). Some of the Third Party
Programs are available under open source or free software licenses. The License Agreement
accompanying the Software does not alter any rights or obligations you may have under
those open source or free software licenses. Please see the Third Party Legal Notice Appendix
to this Documentation or TPIP ReadMe File accompanying this Symantec product for more
information on the Third Party Programs.
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.
THE 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
as defined in FAR 12.212 and subject to restricted rights as defined in FAR Section 52.227-19
"Commercial Computer Software - Restricted Rights" and DFARS 227.7202, "Rights in
Commercial Computer Software or Commercial Computer Software Documentation", as
applicable, and any successor regulations. Any use, modification, reproduction release,
performance, display or disclosure of the Licensed Software and Documentation by the U.S.
Government shall be solely in accordance with the terms of this Agreement.
Symantec Corporation
350 Ellis Street
Mountain View, CA 94043
http://www.symantec.com
Technical Support
Symantec Technical Support maintains support centers globally. Technical
Support’s primary role is to respond to specific queries about product features
and functionality. The Technical Support group also creates content for our online
Knowledge Base. The Technical Support group works collaboratively with the
other functional areas within Symantec to answer your questions in a timely
fashion. For example, the Technical Support group works with Product Engineering
and Symantec Security Response to provide alerting services and virus definition
updates.
Symantec’s maintenance offerings include the following:
■ A range of support options that give you the flexibility to select the right
amount of service for any size organization
■ Telephone and Web-based support that provides rapid response and
up-to-the-minute information
■ Upgrade assurance that delivers automatic software upgrade protection
■ Global support that is available 24 hours a day, 7 days a week
■ Advanced features, including Account Management Services
For information about Symantec’s Maintenance Programs, you can visit our Web
site at the following URL:
www.symantec.com/techsupp/
Customer service
Customer service information is available at the following URL:
www.symantec.com/techsupp/
Customer Service is available to assist with the following types of issues:
■ Questions regarding product licensing or serialization
■ Product registration updates, such as address or name changes
■ General product information (features, language availability, local dealers)
■ Latest information about product updates and upgrades
■ Information about upgrade assurance and maintenance contracts
■ Information about the Symantec Buying Programs
■ Advice about Symantec's technical support options
■ Nontechnical presales questions
■ Issues that are related to CD-ROMs or manuals
Maintenance agreement resources
If you want to contact Symantec regarding an existing maintenance agreement,
please contact the maintenance agreement administration team for your region
as follows:
Symantec Early Warning Solutions These solutions provide early warning of cyber attacks, comprehensive threat
analysis, and countermeasures to prevent attacks before they occur.
Managed Security Services These services remove the burden of managing and monitoring security devices
and events, ensuring rapid response to real threats.
Consulting Services Symantec Consulting Services provide on-site technical expertise from
Symantec and its trusted partners. Symantec Consulting Services offer a variety
of prepackaged and customizable options that include assessment, design,
implementation, monitoring, and management capabilities. Each is focused on
establishing and maintaining the integrity and availability of your IT resources.
Educational Services Educational Services provide a full array of technical training, security
education, security certification, and awareness communication programs.
To access more information about Enterprise services, please visit our Web site
at the following URL:
www.symantec.com
Select your country or language from the site index.
Contents
Feature Description
Media and device All devices supported by Media Manager are available to
management NetBackup for DB2.
Scheduling facilities NetBackup scheduling facilities on the master server can be used
to schedule automatic and unattended DB2 backups.
This feature also lets you choose the times when these operations
can occur. For example, to prevent interference with normal
daytime operations, you can schedule your database backups to
occur only at night.
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, thereby reducing the time necessary
to complete the operation.
14 Introduction to NetBackup for DB2
Features of NetBackup for DB2
Feature Description
Transparent DB2 and All backups and restores run simultaneously and transparently
regular file system without any action from the NetBackup administrator.
backup and restore
The database administrator can run database backup and restore
operations
operations through NetBackup. An administrator or any other
authorized user can use NetBackup to run database backups and
restores.
Sharing the same It is possible to share the same devices and media used for other
storage units used for backups or to give DB2 exclusive use of certain devices and media.
other file backups NetBackup for DB2 can use Media Manager, disk, and PureDisk
storage units.
Centralized and From the NetBackup master server, you can schedule database
networked backup backups or start them manually for any client. The DB2 databases
operations can also reside on hosts that are different from the devices on
which NetBackup stores the backups.
Graphical user NetBackup provides the following graphical user interfaces for
interfaces client users and administrators:
A database administrator can also use the IBM DB2 control center
or command line processor to start user-directed backup and
restore operations.
Templates The NetBackup for DB2 database wizards can create backup and
recovery templates. You can launch the backup wizard and the
recovery wizard from the Backup, Archive, and Restore interface.
The wizards generate platform-independent templates that
contain configuration information that the software uses when
performing backups and restores. Because the wizard-generated
templates do not support all the features native to DB2, you may
want to write a customized backup or restore script in an
operating-system defined scripting language. You can use a
template as the base for a script.
Introduction to NetBackup for DB2 15
NetBackup for DB2 overview
Feature Description
Parallel backup and NetBackup for DB2 supports the parallel backup and restore
restore operations capabilities of the . For example, this permits the user to run more
than one tape device at a time for a single DB2 backup or restore,
thereby reducing the time necessary to complete the operation.
Network (TCP/IP)
NetBackup software:
– NetBackup master server
– NetBackup media server
(if the system is a media server)
C:\Program Files\Veritas\NetBackup\bin\nbdb2.dll.
Platform Name
You specify the library as the argument to the LOAD parameter of the DB2 BACKUP
and RESTORE commands.
object in the Backup, Archive, and Restore interface. After you supply information
about the operation, the wizard creates a template that you can run immediately
or store on the server (for backup templates). You can use the stored backup
templates in scheduled backups through a NetBackup policy. You can also use
them to perform manual backups on the NetBackup for DB2 client.
install_path\NetBackup\dbext\db2\samples
To use the sample files, copy the sample files to working directories and modify
them for your own use.
Table 1-3 DB2 Syntax for Log Archiving and NetBackup for DB2 Terminology
NetBackup for DB2 uses the term "user NetBackup for DB2 uses the term
exit" to describe these DB2 settings: "VENDOR" to describe this DB2 setting:
LOGARCHMETH1=LOGRETAIN LOGARCHMETH1=VENDOR:...\library
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. The full specification for this archive log method is as follows:
LOGARCHMETH1=VENDOR:install_path\NetBackup\bin\nbdb2.dll
When a user exit program is used, archive logs are backed up by means of the
NetBackup for DB2 user exit program. The DB2 syntax for specifying the user exit
program includes the USEREXIT and LOGRETAIN keywords that are specified in a
configuration parameter.
20 Introduction to NetBackup for DB2
NetBackup for DB2 overview
Chapter 2
Installing NetBackup for
DB2
This chapter includes the following topics:
■ Verifying the operating system and platform compatibility for NetBackup for
DB2
■ See “Configuration and licensing requirements for NetBackup for DB2 with
Snapshot Client” on page 24.
■ NetBackup for DB2 backs up and restores the archive log files as a byte stream.
This method uses the DB2 backup API and the DB2 restore API.
To use the VENDOR archive method
1 Quiesce the DB2 database.
Perform this procedure and the configuration procedures at a time when
minimal changes are made to the DB2 database.
2 Specify the archive method. The syntax is as follows:
LOGARCHMETH1=VENDOR:install_path\NetBackup\bin\nbdb2.dll
3 Verify your DB2 configuration to ensure that the appropriate log archiving
method for your site is enabled.
If necessary, edit your DB2 configuration specifications to specify the log
archiving method.
4 Verify your DB2 configuration to ensure that the appropriate log archiving
method for your site is enabled.
If necessary, edit your DB2 configuration specifications to specify the log
archiving method.
install_path\NetBackup\dbext\DB2\db2uext2.exe
For example:
C:\Program Files\IBM\SQLLIB\bin\db2uext2.exe
DB2 expects the db2uext2 executable to reside in the DB2 installation location.
If you reinstall or move the DB2 installation, manually copy db2uext2.exe from
the NetBackup location into the DB2 location.
Chapter 3
Configuring NetBackup for
DB2
This chapter includes the following topics:
■ About backing up archive log files with the user exit program
■ Environment variables
■ Creating a backup template using the NetBackup for DB2 backup wizard
number_of_sessions The number of backup sessions between the backup server and
NetBackup on the client. Each separate session starts a new backup
job on the client.
number_of_policies The number of policies of any type that can back up this client at the
same time. This number can be greater than one. For example, a client
can be in two policies in order to back up two different databases.
These backup windows can overlap.
Note: Enter a large enough value for the Maximum jobs per client attribute to
meet the number of jobs that DB2 runs. You may need to experiment with different
values at your site.
11 When you have added all the schedules, clients, and backup selections you
need, click OK.
Table 3-1 Policy attribute descriptions for NetBackup for DB2 policies
Attribute Description
Policy type Determines the types of clients that can be in the policy. In some cases the policy type
determines the types of backups that NetBackup can perform on those clients. To use the
DB2 database agent, you must define at least one policy of type that is DB2.
Keyword phrase For NetBackup for DB2, the Keyword phrase entry is ignored.
See “About NetBackup for DB2 with Snapshot Client” on page 91.
Table 3-2 Example settings for an NetBackup for DB2 Application Backup
schedule
Retention 2 weeks
00:08:00 - 22:00:00
Table 3-3 Example settings for NetBackup for DB2 automatic backup schedules
18:00:00 - 22:00:00
Automatic Full Backup An Automatic full backup contains a copy of all the data. Note
that a full backup is not the same as a whole database backup.
"Full" is an indicator that the backup is not one of the incremental
backup types.
This type of backup takes less space and time than a cumulative
incremental backup. The backup includes only the data that
changed since the last backup of any type.
This type of backup takes less time and space than a full backup.
The backup contains only the data that changed since the last full
backup.
Configuring NetBackup for DB2 35
About configuring a backup policy for a DB2 database
Property Description
Type of backup 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.
See “About the NetBackup for DB2 backup types” on page 33.
36 Configuring NetBackup for DB2
About configuring a backup policy for a DB2 database
Property Description
Schedule type You can schedule a backup in one of the following ways:
■ Frequency
This setting is used only for scheduled backups. It is not used for user-directed backups.
Frequency specifies the period of time that can elapse until the next backup or archive
operation begins on this schedule. For example, assume that the frequency is seven
days and a successful backup occurs on Wednesday. The next full backup does not
occur until the following Wednesday. Typically, incremental backups have a shorter
frequency than full backups.
■ Calendar
This setting is used only for scheduled backups. It is not used for user-directed backups.
The Calendar option allows you to schedule backup operations that are based on specific
dates, recurring week days, or recurring days of the month.
Retention The retention period for an Application Backup schedule refers to the length of time that
NetBackup keeps backup images (stream-based backups). The retention period for an
automatic schedule controls how long NetBackup keeps records of when scheduled backups
occurred (proxy backups). For example, if your database is backed up once every Sunday
morning, you should select a retention period of at least 2 weeks.
The retention period is affected by the type of schedule you select, as follows:
■ Frequency-based scheduling
Set a retention period that is longer than the frequency setting for the schedule. For
example, if the frequency setting is set to one week, set the retention period to be more
than one week. 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. This means that if you set the retention period to expire the
record too early, the scheduled backup frequency is unpredictable. However, if you set
the retention period to be longer than necessary, the NetBackup catalog accumulates
unnecessary records.
■ Calendar-based scheduling
The retention period setting is not significant for calendar-based scheduling.
Multiple copies If you want to specify multiple copies of a backup for the policy, configure Multiple copies
on the Application Backup schedule.
For a NetBackup for DB2 policy, clients you want to add must have the following
software installed:
■ DB2
■ NetBackup client or server
■ The backup or restore script(s), unless you use templates
To add clients to a NetBackup for DB2 policy
1 In the Policy dialog box, click the Clients tab.
To access the Policy dialog box, double-click the policy name in the Policies
list in the NetBackup Administration Console.
2 Click New.
3 Type the name of the client and press Enter (Windows) or click Add (Java).
If DB2 is installed in a NetBackup cluster, specify the virtual DB2 name as
the client name.
4 (Windows) To add another client, repeat step 2 and step 3.
5 (Java) To add another client, repeat step 3.
6 If this client is the last client you want to add, click OK.
7 (Java) In the Policy dialog box, click Close.
Note: Be sure to specify the correct template and script names in the backup
selections list to prevent an error or possibly a wrong operation. Make sure that
the template or script resides on the client before you try to add it to the backup
selections list.
To add a template to the backup selections list from the Java interface
1 Open the Policy dialog box.
To access the Policy dialog box, double-click the policy name in the Policies
list in the NetBackup Administration Console.
2 Click the Backup Selections tab.
3 Click New.
4 From the Script or Template list, select a template or type the name of a
template.
Include the .tpl extension. Do not include the full path. For example,
weekly_full_backup.tpl.
5 Click Add to add the template to the list.
6 Click OK.
Configuring NetBackup for DB2 39
About configuring a backup policy for a DB2 database
To add a script to the backup selections list from the Java interface
1 Open the Policy dialog box.
To access the Policy dialog box, double-click the policy name in the Policies
list in the NetBackup Administration Console.
2 Click the Backup Selections tab.
3 Click New.
4 In the Script or Template box, type the full path name of a script on the client.
For example:
/backup_scripts/db/cold_backup.sh
C:\backup_scripts\db\cold_backup.cmd
Alternatively, you can type the name of the template with the .tpl extension.
Do not include the full path. For example, weekly_full_backup.tpl.
4 From the Template list, choose the correct template.
5 Click OK.
6 Click OK.
To add a script to the backup selections list from the Windows interface
1 In the Policy dialog box, click the Backup Selections tab.
To access the Policy dialog box, double-click the policy name in the Policies
list in the NetBackup Administration Console.
2 Click New.
40 Configuring NetBackup for DB2
Testing configuration settings
Alternatively, you can type the full path name of the script on the client. For
example:
/backup_scripts/db/cold_backup.sh
C:\backup_scripts\db\cold_backup.cmd
Note: Add the server names to the master server before you configure the server
list on the client. To add server names on the client, see the following topic:
See “Specifying the NetBackup master server from the client” on page 57.
Object Description
DB2 resource If NetBackup for DB2 is detected on the client, the browser window
displays the DB2 resource. This resource is the top-level DB2 object
in the browser. DB2 is the DB2 resource.
Configuring NetBackup for DB2 43
About backing up archive log files with the user exit program
Object Description
Database You cannot select a database for backup directly, but by selecting all
partitions below it, you can effectively select the whole database. If
you select the database for backup, you cannot select other databases.
If you select objects within the database, you cannot select objects
within other databases at the same time.
The display includes only partitions that reside on the same NetBackup
client. It does not display other partitions on remote hosts. For more
information, see the Caution that follows this table.
install_path\NetBackup\dbext\db2\samples
install_path\NetBackup\dbext\db2\db2.conf
4 In the db2.conf file, create an object identifier for backing up the database.
This object identifier starts with the following keyword lines:
DATABASE SAMPLE
OBJECTTYPE DATABASE
...
Configuring NetBackup for DB2 47
Configuring the runtime environment
5 In the db2.conf file, create an object identifier for backing up the archive
logs.
The form depends on how the archive logs are backed up, as follows:
■ If you use ARCFUNC SAVE:
DATABASE SAMPLE
OBJECTTYPE ARCHIVE
SCHEDULE USER_BACKUP_SCHED_LOGSCHED
In the POLICY line, specify the name of the MS-Windows or Standard policy
for backing up the archive logs.
In the SCHEDULE line, specify the User Backup schedule that you created
earlier for backing up the archive logs.
■ If you use ARCFUNC COPY:
DATABASE SAMPLE
OBJECTTYPE ARCHIVE
ARCDIR C:\MyLogs\arcdir\
RETDIR C:\MyLogs\arcdir\
In the ARCDIR line, specify the full path to the location of the archive logs.
In the RETDIR line, specify the full path to the location from which the
archive logs are retrieved. Typically, the RETDIR location is the same as
the ARCDIR location.
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 C:\MyLogs\arcdir\
#RETDIR C:\MyLogs\arcdir\
#ARCDIR /home/db2inst1/arcdir
#RETDIR /home/db2inst1/arcdir
ENDOPER
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 C:\MyLogs\arcdir\
RETDIR C:\MyLogs\arcdir\
ARCDIR /home/db2inst1/arcdir
RETDIR /home/db2inst1/arcdir
ENDOPER
3 Copy the sample db2.conf file from its location in the sample directory to its
active location.
Its location in the sample directory is as follows:
install_path\NetBackup\dbext\db2\samples
install_path\NetBackup\dbext\db2\db2.conf
4 In the db2.conf file, create an object identifier for backing up the database.
This object identifier starts with the following keyword lines:
DATABASE SAMPLE
OBJECTTYPE DATABASE
. . .
5 In the db2.conf file, create an object identifier for backing up the archive
logs.
DATABASE SAMPLE
OBJECTTYPE ARCHIVE
POLICY DB2_TYPE_POL_LOGPOL # a DB2 type policy
SCHEDULE DEFAULT-APPLICATION-BACKUP
In the POLICY line, specify the name of a DB2 policy. This policy can be the
same policy that you use to back up the database.
In the SCHEDULE line, specify a Default-Application-Backup schedule.
6 You may need to add other entries to the db2.conf file.
See “Keyword summary” on page 51.
7 Save and close the db2.conf file.
8 Repeat this procedure on each client computer.
See “Example db2.conf file (with VENDOR method)” on page 50.
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
Keyword summary
Rules are available on how to specify keywords in the db2.conf file.
The rules are as follows:
■ A db2.conf file consists of a series of entries that define a policy and a schedule
that are based upon an OBJECTTYPE.
■ Specify a different POLICY name for the DATABASE object. Also specify a policy
name for ARCHIVE object when you use ARCFUNC SAVE.
52 Configuring NetBackup for DB2
Configuring the runtime environment
■ ARCFUNC SAVE
■ ARCFUNC COPY
■ PARTITIONTYPE RAW
■ RETDIR
Table 3-7 describes the keywords and values that are used.
Table 3-7 Keyword value pairs for the db2.conf file (continued)
NODE number Specifies the DB2 node number. Do not specify this
keyword unless you operate within a DB2 Enterprise
Extended Edition (EEE) environment. Not required.
No default.
PARTITIONTYPE RAW Specifies that NetBackup search for archive log files
that are backed up from a raw partition during a
restore. Not Required. For the POLICY, specify the
name of a DB2 policy. This policy can be the same as
the one that you use to back up the database. In the
SCHEDULE line, specify a Default-Application-Backup
schedule.
54 Configuring NetBackup for DB2
Configuring the log on account for the NetBackup Client Service
Table 3-7 Keyword value pairs for the db2.conf file (continued)
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. You can use the DB2_FULL, DB2_INCR, and DB2_CINC variables within a
script to specify a backup type.
Note: Only NetBackup’s backup and restore templates and scripts use the
environment variables in the following table. These variables are unknown to the
DB2 backup and restore commands. For example, the backup and restore
commands do not process the DB2_POLICY variable. Instead, the templates and
scripts use the POLICY name. This policy is defined in the
install_path\NetBackup\dbext\db2\db2.conf file.
Environment Purpose
variable
DB2_POLICY Name of the NetBackup for DB2 policy from which the Automatic
Backup was started. This policy name is not necessarily the same
policy name that is in the db2.conf file. This variable is set only
if the backup is initiated from the server, either automatically by
the NetBackup scheduler or manually through the administrator
interface.
Environment Purpose
variable
Templates
The NetBackup for DB2 backup wizard creates backup templates. This wizard is
initiated from the NetBackup Backup, Archive, and Restore interface.
See “Creating a backup template using the NetBackup for DB2 backup wizard”
on page 57.
The NetBackup for DB2 backup wizard does not support all of the commands and
options that are provided by DB2. If a template does not provide all of the required
functionality, you must write a script.
Configuring NetBackup for DB2 57
Specifying the NetBackup master server from the client
Shell scripts
Sample backup and recovery shell scripts are installed on the client with the
NetBackup for DB2 agent. Modify these scripts to meet your individual
requirements.
Shell scripts are written by the user and must conform to DB2 shell syntax.
See “Creating DB2 scripts manually” on page 60.
NetBackup for DB2 also provides a utility, bpdbsbdb2, that can generate a shell
script from a backup wizard template. 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.
See “Creating shell scripts using bpdbsbdb2” on page 59.
Note: Because the Backup, Archive, and Restore interface only displays local or
resident partitions, templates that are created on the local client do not back up
partitions on remote hosts. Create additional templates for the other remote
partitions by running the wizard on those clients. To back up the entire EEE/DPF
configuration, specify multiple templates in the policy backup selections list.
Creating a backup template with the NetBackup for DB2 Backup Wizard
After you select the DB2 objects to back up, use the NetBackup for DB2 Backup
Wizard to create a backup template for that DB2 element. The following procedure
uses the Backup, Archive, and Restore interface on the NetBackup for DB2 client.
To create a backup template by using the NetBackup for DB2 Backup Wizard
1 Log on to Windows as the DB2 user.
2 In the Backup, Archive and Restore interface, select the DB2 object(s) you
want to back up.
3 Click Actions > Backup.
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
Configuring NetBackup for DB2 59
Creating shell scripts using bpdbsbdb2
■ Template Summary
Click Help on the wizard panel for more information.
4 When you complete the wizard, the Template Complete screen appears. You
can save the template for later use, run the template immediately, or both.
Click Help for details about saving and running the template you created.
5 When you are satisfied with the template, click Finish to save, run, or save
and run the template you created.
When you run a backup template from the wizard, NetBackup performs a full
backup.
where:
Caution: It is the user's responsibility to review and customize any and all scripts
that are generated from templates. Generated scripts are intended to be modified
for the user's environment and preferences. For example, settings such as
passwords or catalog partition numbers are not generated in the template-to-script
conversion, so they require manual editing. In addition, generated scripts do not
handle all possible error and failure cases and should be used at your own risk.
60 Configuring NetBackup for DB2
Creating DB2 scripts manually
Use the DB2CMD command processor to run scripts that you generated for Windows.
This processor is provided with DB2, DB2CMD C:\TEMP\SCRIPT.CMD. For more
information, see the DB2 Commands User’s Guide.
Script execution permissions should be reviewed and modified as desired by the
user.
For security purposes, user names and passwords are not included in generated
scripts. They must be added if needed.
The DB2 QUIESCE command is generated when the Disconnect users and prohibit
access template option is specified. However, this command fails if your version
is before DB2 V8.1.
When attempting a point-in-time restore, customize the time value. The command
DB2 RESTORE ... TAKEN AT strictly interprets the specified time and succeeds
only if a backup image with the same time exists. For more information, see your
IBM DB2 documentation. This limitation does not exist for templates, which search
for an appropriate image.
If a template enables roll-forward recovery, then roll-forward commands are
generated for all partitions that are specified in the template, whether or not that
partition is configured for roll-forward recovery.
If a script performs a roll-forward recovery, customize the DB2NODE variable. In
single partition environments, this variable can typically be empty (for example,
"DB2NODE="). In a multiple partition environment, set this variable to the catalog
partition number.
■ db2_backup_db_online.cmd
■ db2_restore_db.cmd
■ db2_mpp_backup_offline.cmd
■ db2_mpp_restore_db.cmd
install_path\NetBackup\dbext\db2\samples\
Note: Be sure to modify these scripts for your environment. Do not store your
scripts in the sample directory because they are lost if you upgrade or reinstall.
Always relocate your scripts to a safe location. For clustered environments, this
location must be available after a failover.
Although each script can have multiple DB2 commands operations, a separate
script is required for each type of operation. For example, you need separate
scripts for backups and restores.
Note: Always specify the correct script when configuring automatic backups or
when starting operations through NetBackup. 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.
Script parameters
The NetBackup for DB2 templates and scripts read parameters from the
environment when they perform backup and restore operations.
The parameters can come from the following sources:
■ Environment Variables
■ NetBackup db2.conf
62 Configuring NetBackup for DB2
Storing templates and scripts
Parameters from these sources can be evaluated within the scripts. For example,
the DB2_POLICY value is the name of the policy used to perform the backup.
See “Configuring the runtime environment” on page 46.
Templates
The backup wizard saves a backup template to a location specific to NetBackup
on the current NetBackup master server. NetBackup retrieves a backup template
from the master server as part of a backup (server-directed, scheduled, or
user-directed) and runs it on the client. A backup template is associated with a
policy by specifying its name in the policy file or script list. Because backup
templates are stored on the server in a known location, 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 location that is specified should include a fully qualified path to a
directory where the user has write access.
See “Using the NetBackup for DB2 recovery wizard” on page 76.
Templates store the encrypted passwords that are decrypted at runtime.
Shell scripts
DB2 scripts must reside on the NetBackup client. Backup scripts are associated
with a policy by specifying the file name (including path) in the policy file or script
list. For server-directed or scheduled backups, each client in the policy's client
list must have a copy of the script with the same name in the same location.
See “Adding backup selections to a DB2 policy” on page 37.
The backup processes and recovery processes sometimes require passwords for
DB2 database access and system user accounts.
■ Performing a backup
■ Browsing backups
■ Performing a restore
Caution: Always specify the correct DB2 script or template when configuring
automatic backups or when starting operations through NetBackup. 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.
Performing a backup
This section describes the different ways you can perform a backup and explains
the relationships between settings.
66 Performing backups and restores of DB2
Performing a backup
■ By running a script from the operating system command line. You can create
scripts from scratch, or you can base a script on a template that you created
earlier.
■ Through templates that are initiated from the template wizards or Template
Administration interface.
■ Through templates and scripts that are specified in policies. When you back
up a NetBackup policy, it uses the templates and scripts that are specified in
the policy.
The main types of DB2 backups are as follows:
■ A database backup is a copy of the entire DB2 database or tablespace. This
backup is accomplished by issuing a DB2 BACKUP DATABASE command. A
database backup can be initiated through NetBackup by an automatic backup
of a DB2 policy, a manual backup of a DB2 policy, or a user-directed backup.
■ An archive log backup is a backup of an archive log file for DB2. If VENDOR is
enabled in the DB2 configuration files, NetBackup for DB2 backs up the archive
logs along with the database files. If the user exit program is enabled in the
DB2 configuration file, you need a separate policy and schedule to back up the
archive logs.
■ A configuration file backup is a backup of the DB2 configuration files that you
need to recover the database in the case of a disaster.
You can use an Windows policy with a User Backup schedule to back up the
files.
For information on which files to back up, see your IBM DB2 documentation.
When the NetBackup scheduler invokes a schedule for an automatic backup, the
DB2 scripts run as follows:
■ In the same order as they appear in the file list
■ On all clients that are listed in the client list
The DB2 scripts initiate the database backup.
Further information is available on how to add a new schedule or change an
existing schedule for automatic backups.
See “Overview of using NetBackup for DB2” on page 65.
When a backup template is run from a NetBackup schedule, the schedule
determines the backup type (automatic full, automatic cumulative incremental,
or automatic differential incremental).
The following information applies only if you use the user exit program to back
up the archive logs:
■ If an online backup of a partition is requested, the user exit program must be
enabled. If not, an offline partition backup is attempted. An offline backup is
also attempted if the database is in backup-pending mode.
■ If a tablespace backup is requested, the user exit program must be enabled. If
not, template execution fails because DB2 does not support offline tablespace
backups.
More information is available for templates.
See “Running a NetBackup for DB2 backup template” on page 67.
residing with the same partition are processed together. Consider, for example,
if tablespace T1 resides in partition P1, and tablespaces T2 and T3 reside in partition
P2.
Delete Removes the selected template. You must be the root user or the
template creator to delete a template.
Rename Changes the name of the selected template. You must be the root user
or the template creator to rename a template.
The templates that are created by the NetBackup for DB2 template generation
wizard are stored in a predetermined location on the master server.
See “Creating a backup template using the NetBackup for DB2 backup wizard”
on page 57.
Performing backups and restores of DB2 69
Performing a user-directed backup from the NetBackup for DB2 client
Using bpdbsbdb2
The bpdbsbdb2 command runs a backup template that is created by the NetBackup
for DB2 Backup Wizard. At the command prompt, issue the bpdbsbdb2 in the
following format:
You can run this command from the DB2 command window on the client.
Depending on the release of DB2 that you use, issue the BACKUP DATABASE
command in one of the following formats to perform a backup.
For example:
The db2.conf specifies several variables that the backup operation uses. You can
override the policy name and schedule name variables directly on the command
line by using the OPTIONS entry. The following example overrides the policy
name and the schedule name:
The db2.conf file specifies several variables that the backup operation uses. You
can override the policy name and schedule name variables directly on the command
line by using the OPTIONS entry. The following example overrides the policy
name and the schedule name:
For more information on the DB2 BACKUP DATABASE command, see your DB2
documentation.
Table 4-1 lists the command options when used in a NetBackup for DB2
environment.
Option Purpose
LOAD NBDB2_library_path Instructs DB2 to use the NBDB2 vendor library when it
performs the backup.
OPEN number SESSIONS Specifies the number of concurrent data streams used
for writing data. Use this option if you have multiple
backup devices available, or you have multiplexing
enabled in NetBackup.
WITH number BUFFERS Use this option when opening multiple sessions. See
OPEN number SESSIONS. The number of buffers must
be twice the number of sessions.
BUFFER size Use this option to increase or decrease the buffer size,
if necessary. Increased size can benefit performance,
but decreased size might be necessary if using numerous
buffers. DB2 recommends that the size be a multiple of
the extent size. The DB2 DFT_EXTENT_SZ setting
defines the default extent size.
Option Purpose
OPTIONS "options-string" Specifies options that are to be used for the backup
operation. The string passes to the vendor support
library, for example TSM, exactly as it was entered,
without the quotes.
Browsing backups
This section describes how to browse backup images. You can also use the DB2
LIST HISTORY command.
In this example, the DB2 resource is expanded down to the tablespace level. You
can select a tablespace or tablespaces, a partition or partitions, or one entire
database (by selecting all of its partitions) for the restore.
Example 1
The -t 18 option on this command specifies the DB2 backup type. The bplist
output shows the DB2 database backup images that are stored in the NetBackup
database.
DB2:\SAMPLE\node0000\1999120210473\SAMPLE.0.DB2.node00.0.1999120210473.1
DB2:\SAMPLE\node0000\1999120117120\SAMPLE.0.DB2.node00.0.1999120117120.1
DB2:\SAMPLE\node0000\1999112915411\SAMPLE.3.DB2.node00.4.1999112915411.1
DB2:\SAMPLE\node0000\1999112914204\SAMPLE.0.DB2.node00.0.1999112914204.1
Table 4-2 shows how to interpret one of the lines from the listing.
(Filename)
■ node0000
Node number. In non-partitioned database systems, node
number is always zero (node0000). In partitioned database
systems, the number is nodexxxx, where xxxx is the
number assigned to the node in the db2nodes.cfg file.
■ 0
Last archive log number.
■ 19991202105152
Timestamp. Includes the date (year, month, day) and time
(hour, minute, second).
■ 1
Session number. This file extension identifies the session
number that was specified on the DB2 BACKUP command.
Performing backups and restores of DB2 75
Performing a restore
Example 2
This example uses bplist to search for all DB2 archive log file backups. The -k
DB2_Log_Policy option specifies files that are backed up with this policy. The
policy name originates from the settings in the db2.conf file for archive log files.
The bplist output shows the list of DB2 archive log files that are stored in
NetBackup.
Example 3
This example uses bplist to search for DB2 archive log files. The -k log_policy
option specifies files that are backed up with this policy. The output format in the
following example differs from the previous examples because for this database,
the VENDOR archive log method is enabled in DB2:
Performing a restore
The following sections describe restore methods.
76 Performing backups and restores of DB2
Performing a restore
■ When you perform a DB2 restore, false alarms are reported in the NetBackup
Activity Monitor. DB2 accesses the NetBackup image twice when you perform
a restore. The first access reads a partial image, which is reported as "The
restore failed to recover the requested files" (status 5) in the Activity Monitor.
The next access reads the entire image, which should result in a successful
restore (status 0). The template execution status, not the activity monitor, is
the best indication of overall success.
■ The DB2 warning SQL2539W indicates that the requested restore operation
replaces the existing database. That is, the existing database files are deleted.
When running a template to perform a restore, this warning is logged and the
restore proceeds without interruption.
■ The DB2 warning SQL2523W indicates that the backup image originates from
a different database of the same name. This warning is handled as an error to
prevent DB2 from deleting log files.
■ The DB2 error SQL1260N indicates that the restored partition is not configured
for roll-forward recovery. If the template is configured to perform a
roll-forward, this step is skipped.
To use the recovery wizard
1 Log onto NetBackup as the DB2 user.
2 In the Backup, Archive, and Restore interface, choose File > Select Files and
Folders to Restore > from Normal Backup.
3 Expand a DB2 instance and select the database object(s) you want to restore.
4 Click Actions > Restore.
5 Enter information about the restore operation you want to perform in the
following screens:
■ Welcome
■ Database Login
■ Time Periods
■ Restore Options
■ Recovery Options
78 Performing backups and restores of DB2
Performing a restore
If you need an explanation of any of the fields on the wizard screens or more
details, click Help on the wizard screen.
6 Run the template immediately after the wizard finishes, to save the template
locally, or both. For explanations of your choices, click Help.
Template execution does not support the use of local time when performing
a roll-forward. The roll-forward time that is specified in the template is passed
to DB2, and it is interpreted as GMT by DB2. For more information, see the
ROLLFORWARD command in your DB2 documentation.
Using bpdbsbdb2
The bpdbsbdb2 command lets you run a recovery template that the NetBackup
Recovery wizard creates.
At the command line, type the following:
Where db_name is the name of the DB2 database you want to restore.
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. When this situation exists,
NetBackup cannot perform a seamless restore of DB2. You may have moved
one or more of the needed archive logs to secondary storage such as tape,
network storage, or some other location. For example, if ARCFUNC COPY is in
effect and the old archive logs were moved to tape, perform procedure in this
section.
■ If ARCFUNC COPY was in effect in the db2.conf file at the time the archive logs
were backed up and the ARCDIR and RETDIR parameters specify two different
locations.
■ If PARTITIONTYPE RAW was in effect in the db2.conf file for some (not all) of
the archive log backups.
For more information about the DB2 commands, see your DB2 documentation.
To restore a DB2 database when the archive logs are in a non-standard location
1 Restore the database.
Issue the DB2 RESTORE DATABASE command to restore the database itself. For
example:
where db_name is the name of the DB2 database you are to restore.
2 Use NetBackup to browse the archive logs.
If a restore requires log files that are backed up from a file system and log
files that are backed up from a raw device, retrieve the logs from the file
system manually.
You can use the Backup, Archive, and Restore interface or the bplist
command to browse the archive logs and find those missing from the restore
directories.
If PARTITIONTYPE RAW is specified in the db2.conf file, the user exit program
looks for only those logs when you perform the restore. The missing logs are
those that were written when PARTITIONTYPE RAW was not in effect.
See “Browsing backups” on page 72.
Performing backups and restores of DB2 81
Performing a restore
3 Use operating system commands to copy the missing archive logs to the
correct locations in your operating system.
For example, use your mouse to copy the files from one location to another.
If ARCFUNC COPY is in effect and the ARCDIR and RETDIR parameters specify
different locations, copy the logs in the ARCDIR directory to the RETDIR
directory. If ARCDIR and RETDIR specify the same location, you do not have
to take any action. If some of the log files have been moved to secondary
storage, restore these files to the RETDIR directory.
4 Use NetBackup to restore the archive logs.
Use either the NetBackup Backup, Archive, and Restore interface or the
bprestore command. For example:
bprestore C:\vedb2\db2\v8\db2V82d\NODE0000\SQL0001\SQLOGDIR\S00009.LOG
Table 4-4 provides reference information for the command options when used in
a NetBackup for DB2 environment.
Option Purpose
LOAD NBDB2_Library_Path Instructs DB2 to use the NBDB2 vendor library when
you perform the restore.
OPEN number SESSIONS Specifies the number of concurrent data streams used
for writing data. Use this option if you have multiple
backup devices available or if you have multiplexing
enabled in NetBackup.
WITH number BUFFERS Use this option when opening multiple sessions. See
OPEN number SESSIONS.
BUFFER size Use this option to increase or decrease the buffer size
if necessary. Increased size can benefit performance,
while decreased size may be necessary if you use
numerous buffers. DB2 alters the actual size to be a
multiple of the size that is used during the backup.
INCREMENTAL When you use this option, DB2 may not read the entire
image from NetBackup media. Consequently, NetBackup
logs an error in the activity monitor, which can safely
be ignored.
Performing backups and restores of DB2 83
Performing an alternate restore
Option Purpose
HISTORY FILE When you use this option, DB2 may not read the entire
image from NetBackup media. Consequently, NetBackup
logs an error in the activity monitor, which can safely
be ignored.
For example, assume that you have two NetBackup clients, grade7 and grade8.
Instances class1 and class2 are on grade7. Instance class1 is on grade8.
Figure 4-2 illustrates this example.
Instance: class2
Databases: eng1, art1
The following list shows some of the types of restores you can perform with
alternate restore procedures:
■ You can restore database eng1 from instance class2 on client grade7 into
instance class1 on client grade8. 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. During the restore, you need to rename
Performing backups and restores of DB2 85
Performing an alternate restore
math1 to math2 because class1 on grade8 already has a database named math1.
Without renaming, the existing database math1 would be overwritten.
■ You can restore database art1 from instance class2 on client grade7 into
instance class1 on client grade7. During the restore, you need to rename art1
to art2 because instance class1 already has a database named art1. Without
renaming, the existing database art1 would be overwritten.
■ install_path\NetBackup\db\altnames\dest_client_name
client2
7 From the Source client for restores list, select the client.
For example, client2.
8 From the Destination clients for restores list, select the client to which you
want to restore.
For example, client1.
The following example shows the keyword that are needed to define the new
database:
DATABASE NEWSAMPL
OBJECTTYPE DATABASE
POLICY db2-bkup
SCHEDULE Default-Application-Backup
CLIENT_NAME Client1
ENDOPER
Performing backups and restores of DB2 87
Performing an alternate restore
The following example shows the keyword that are needed to define the old
database:
DATABASE SAMPLE
OBJECTTYPE DATABASE
POLICY db2-bkup
SCHEDULE Default-Application-Backup
CLIENT_NAME Client1
ENDOPER
The following example shows the keyword that are needed to define the new
data archive log files:
DATABASE NEWSAMPL
OBJECTTYPE ARCHIVE
POLICY db_a_db2
SCHEDULE Default-Application-Backup
#SCHEDULE User
CLIENT_NAME Client1
ARCFUNC SAVE
#ARCFUNC COPY
#ARCDIR C:\home\db2inst1\arcdir
#RETDIR C:\home\db2inst1\arcdir
ENDOPER
The following example shows the keyword that are needed to define the old
data archive log files:
DATABASE SAMPLE
OBJECTTYPE ARCHIVE
POLICY db_a_db2
SCHEDULE Default-Application-Backup
#SCHEDULE User
CLIENT_NAME Client1
ARCFUNC SAVE
#ARCFUNC COPY
#ARCDIR C:\home\db2inst1\arcdir
#RETDIR C:\home\db2inst1\arcdir
88 Performing backups and restores of DB2
Performing an alternate restore
ENDOPER
where:
db_being_restored Specify the name of the database that was backed up.
new_db_name Specify the name for the new database. If the name of
the new database matches the name of a database
presently included in the new instance, the new database
overwrites the existing database.
For example:
For example:
For example:
mkdir C:\db\db2_v5\home\db2inst1\NODE0000\SQL00001\SQLOGDIR
bprestore install_path\db\db2_v5\home\db2inst1\
NODE0000\SQL00001\SQLOGDIR\S00001.LOG
3 (Optional) Move the logs to the correct directory for the destination database.
If the directory into which you restored the log files is not correct for the
destination database, move the logs to the proper location.
4 Verify that the correct owner and group permissions are enabled on the log
directory.
90 Performing backups and restores of DB2
Performing an alternate restore
Chapter 5
Using Snapshot Client with
NetBackup for DB2
This chapter includes the following topics:
■ About supported platforms for NetBackup for DB2 with Snapshot Client
Proxy copy
A proxy copy is a special type of backup in which the NetBackup for DB2 agent
manages the control of the data transfer. During the backup and restore operations,
the proxy copy enables the agent to manage the entire data movement between
the disks that contain the data files and the storage devices that are managed by
NetBackup.
Backups and restores remain tightly integrated with DB2 and its catalog, greatly
simplifying administration tasks.
File-based operations
In a file-based operation, DB2 provides the list of files that require backup or
restore to NetBackup for DB2 with Snapshot Client. NetBackup for DB2 with
Snapshot Client performs the data movement.
Figure 5-1 represents a file-based backup or restore.
Using Snapshot Client with NetBackup for DB2 93
About NetBackup for DB2 with Snapshot Client
Figure 5-1 NetBackup for DB2 with Snapshot Client file-based backup or restore
DB2 Server
Control commands
List of files
Data Data
NetBackup
Stream-based operations
Stream-based operations are the standard NetBackup implementation of
conventional NetBackup for DB2 backup and restores. In a stream-based backup,
NetBackup moves the data that is provided by the server process. NetBackup
captures the data stream content that is provided by DB2. If the user has specified
multiple streams, then NetBackup for DB2 opens multiple streams and NetBackup
catalogs them as separate images.
Figure 5-2 represents a stream-based backup or restore.
94 Using Snapshot Client with NetBackup for DB2
About supported platforms for NetBackup for DB2 with Snapshot Client
DB2 Server
DB2 database disk DB2 database
disk
Control commands
Data
NetBackup
The agent checks that the policy it uses for the backup is configured with the
appropriate Snapshot Client attributes. The agent then initiates file-based backups
of the DB2 files and uses the NetBackup Snapshot Client interface to perform the
data movement.
The NetBackup for DB2 agent uses DB2 APIs to put the data files into quiesce/write
suspend mode. NetBackup then creates a snapshot of the files. After the snapshot
is created, NetBackup for DB2 uses the DB2 APIs to take the data files out of
quiesce/write suspend mode. The data files that are backed up are in quiesce/write
suspend mode only for the period of time it takes to create a snapshot of the data.
NetBackup for DB2 cannot use Snapshot Client methods to back up individual
tablespaces or container files.
DB2 performs only conventional backups for transaction log files. You cannot use
Snapshot Client methods for transaction logs backed up with either the user exit
program or the VENDOR method.
File-based and stream-based backups require different configurations. When you
configure NetBackup for DB2 with Snapshot Client backups, be sure to configure
policies that allow both kinds of backups.
See “About Snapshot Client effects” on page 104.
The agent splits the files into three streams and initiates a file-based backup for
each stream. After the proxy backup is done, DB2 starts a non-proxy conventional
backup of the transaction logs.
Issue this command on each node of the database.
Use Alternate If you select Alternate client, also specify the name of the client
client (UNIX and to perform the backup. This option may require additional
Windows clients) configuration. The alternate client must be a client that shares
the disk array.
■ Use snapshot rollback with database files only. Database files and archive logs
should exist on different file systems or volumes.
4 Select Actions > Select Restore Type > Point in Time Rollback.
5 Use the NetBackup for DB2 recovery wizard for the restore.
See “Performing a restore” on page 75.
where:
Automatic Full Backup For file-based proxy copy backups, the automatic backup schedule
types serve the following purposes:
Automatic Differential
Incremental Backup, ■ Automatically start the backups by running the NetBackup for
DB2 scripts or templates.
Automatic Cumulative
■ Control file-based snapshot backups of the database objects.
Incremental Backup
If you specify any of the automatic backup types, a full backup is
performed.
Property Description
For proxy backups, NetBackup uses the retention period for the
automatic type of backup to specify how long to keep proxy
file-based backup images.
For proxy backups, NetBackup for DB2 with Snapshot Client uses
the retention period for the automatic type of backup to specify
how long to keep proxy file-based backup images.
Multiple copies For proxy file-based backups, configure Multiple copies on the
automatic backup schedule.
106 Using Snapshot Client with NetBackup for DB2
Using NetBackup for DB2 with Snapshot Client
Performing backups
NetBackup for DB2 performs backups with Snapshot Client in the following ways:
■ Server-directed, both automatic and scheduled from the master server
■ User-directed, by template creation and execution on the client
■ User-directed, from the command line as a DB2 user (with the bpdb2proxy
command)
All of these methods require a DB2 policy with Snapshot Client configuration.
Server-directed backups
The configuration procedures in this chapter describe the process for configuring
policies for DB2 backups with Snapshot Client.
See “Configuring the DB2 policy with Snapshot Client backup methods” on page 98.
These policies specify Snapshot Client backups for the DB2 database.
Using Snapshot Client with NetBackup for DB2 107
Using NetBackup for DB2 with Snapshot Client
Performing restores
Perform NetBackup for DB2 Snapshot Client restores from the DB2 client. The
following sections describe the restore methods.
Note: The backup image you restore with bpdb2proxy must be from a Snapshot
Client method backup, otherwise, the restore fails.
108 Using Snapshot Client with NetBackup for DB2
Using NetBackup for DB2 with Snapshot Client
Use the bpdb2proxy command in the following format to restore a DB2 database
with a Snapshot Client method:
■ Enabling the debug logs for NetBackup for DB2 for Windows manually
in the application to the NetBackup logs. Your best sources for DB2 error
information are the logs provided by DB2.
■ Generally, each debug log corresponds to a NetBackup process and executable.
Information about the debugging log files is available.
See the NetBackup Troubleshooting Guide.
Also refer to the following file:
install_path\NetBackup\logs\README.debug file
install_path\NetBackup\logs\mklogdir.bat
Or, you can manually create the directories for the log files you want created.
See “Enabling the debug logs for NetBackup for DB2 for Windows manually”
on page 111.
Troubleshooting NetBackup for DB2 111
Enabling the debug logs for NetBackup for DB2 for Windows manually
install_path\NetBackup\logs\bpbackup
install_path\NetBackup\logs\bpbkar32
install_path\NetBackup\logs\bpdbsbdb2
install_path\NetBackup\logs\bphdb
install_path\NetBackup\logs\bprestore
install_path\NetBackup\logs\bpubsdb2
install_path\NetBackup\logs\dbclient
install_path\NetBackup\logs\tar32
install_path\NetBackup\logs\bpdb2
For example:
cd install_path\NetBackup\logs
mkdir bphdb
This log contains debugging information for the bphdb process. bphdb is the
NetBackup database backup binary. It is invoked when an automatic backup
schedule is run. NetBackup for DB2 uses this client process for DB2 script
execution.
mmddyy.log
This log contains debugging information and execution status for the NetBackup
for DB2 backup and recovery wizards and for the bpdbsbdb2 command line utility.
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 bpdbsbdb2 to run the template).
Note: Information from both the Verbose and the Database debug settings is logged
to the same file, mmddyy.log
Troubleshooting NetBackup for DB2 113
About NetBackup server reports
300
Message:
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 want to restore exists. Make sure the
correct instance is used.
Make sure the correct values are set in db2.conf.
If logging is enabled, check the current log file in the following directory for more
information:
install_path\NetBackup\logs\bpdb2\
305
Message:
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 error should not occur under typical operations. If logging is enabled, check
the current log file in the following directory for more information:
install_path\NetBackup\logs\bpdb2\
116 Troubleshooting NetBackup for DB2
About the error message codes
310
Message:
Cause:
Unable to read configuration file.
Action:
Make sure the file exists and is properly configured.
If logging is enabled, check the current log file in the following directory for more
information:
install_path\NetBackup\logs\bpdb2\
330
Message:
Cause:
Invalid option(s) encountered for action.
Action:
Make sure the action parameters are used properly.
335
Message:
Cause:
NetBackup server and the NetBackup for DB2 DLL are not at the same level.
Action:
Make sure that the NetBackup and the DB2 DLL are at the same level. Check the
log file in the following directory:
install_path\NetBackup\logs\
Check the version number of the DLL and the version number for NetBackup. If
they are not the same, install the same level.
Troubleshooting NetBackup for DB2 117
About the error message codes
380
Message:
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:
Cause:
Found multiple DATABASE entries before an ENDOPER entry was encountered in the
following file:
install_path\NetBackup\dbext\db2.conf
Action:
Remove the extra DATABASE entry.
390
Message:
Cause:
Found multiple OBJECTTYPE entries before an ENDOPER entry was encountered in
the following file:
install_path\NetBackup\dbext\db2.conf
Action:
118 Troubleshooting NetBackup for DB2
About the error message codes
395
Message:
Cause:
Found multiple POLICY entries before an ENDOPER entry was encountered in the
following file:
install_path\NetBackup\dbext\db2.conf
Action:
Remove the extra POLICY entry.
400
Message:
Cause:
Found multiple SCHEDULE entries before an ENDOPER entry was encountered in the
following file:
install_path\NetBackup\dbext\db2.conf
Action:
Remove the extra SCHEDULE entry.
405
Message:
Cause:
Found multiple ARCFUNC entries before an ENDOPER entry was encountered in the
following file:
install_path\NetBackup\dbext\db2.conf
Action:
Remove the extra ARCFUNC entry.
410
Message:
Cause:
Found multiple ARCDIR entries before an ENDOPER entry was encountered in the
following file:
install_path\NetBackup\dbext\db2.conf
Action:
Remove the extra ARCDIR entry.
415
Message:
Cause:
Found multiple RETDIR entries before an ENDOPER entry was encountered in the
following file:
install_path\NetBackup\dbext\db2.conf
Action:
Remove the extra RETDIR entry.
120 Troubleshooting NetBackup for DB2
About the error message codes
420
Message:
Cause:
Policy name or schedule name is not specified in the POLICY or SCHEDULE entry
in the following file:
install_path\NetBackup\dbext\db2.conf
Action:
Add an appropriate policy name or schedule name to the POLICY or SCHEDULE
entry.
425
Message:
Cause:
Invalid ARCDIR is specified in db2.conf.
Action:
Add an appropriate directory name to the ARCDIR entry.
430
Message:
Cause:
No ARCDIR entry found in the following file:
install_path\NetBackup\dbext\db2.conf
Troubleshooting NetBackup for DB2 121
About the error message codes
Action:
Add an ARCDIR field with an appropriate directory name to the following file:
install_path\NetBackup\dbext\db2.conf
435
Message:
Cause:
RETDIR field does not contain a valid file.
Action:
RETDIR field must contain a valid file when OBJECTTYPE ARCHIVE is specified in
the following file:
install_path\NetBackup\dbext\db2.conf
440
Message:
Cause:
Found OBJECTTYPE ARCHIVE but no ARCFUNC in the db2.conf file.
Action:
Specify a copy or save parameter for ARCFUNC if OBJECTTYPE ARCHIVE is also
specified.
445
Message:
Cause:
122 Troubleshooting NetBackup for DB2
About the error message codes
install_path\NetBackup\dbext\db2.conf
Action:
Add the appropriate object type to the following file:
install_path\NetBackup\dbext\db2.conf
450
Message:
Cause:
OBJECTTYPE entry is not specified in the following file:
install_path\NetBackup\dbext\db2.conf
Action:
Add the appropriate object type to the following file:
install_path\NetBackup\dbext\db2.conf
455
Message:
Cause:
POLICY entry is not specified in the following file:
install_path\NetBackup\dbext\db2.conf
Action:
Add the appropriate policy name to the POLICY entry in the following file:
install_path\NetBackup\dbext\db2.conf
502
Message:
Troubleshooting NetBackup for DB2 123
About the error message codes
Cause:
Internal communication between DB2 and NetBackup failed.
505
Message:
Cause:
This error can occurr when you use an unsupported version of DB2.
507
Message:
Cause:
NetBackup encountered errors in preparing for the requested operation. This can
result from improper configuration.
510
Message:
Cause:
NetBackup encountered errors in reading configuration settings.
Action:
Check that the NetBackup client and server settings are configured. Also verify
that the db2.conf file exists and that it is configured.
511
Message:
Cause:
124 Troubleshooting NetBackup for DB2
About the error message codes
513
Message:
Cause:
NetBackup encountered errors when attempting to start the requested operation.
This error can indicate a problem in obtaining necessary resources.
514
Message:
Cause:
NetBackup encountered errors when attempting to create a backup image.
515
Message:
Cause:
NetBackup encountered errors when attempting to access a backup image.
516
Message:
Cause:
NetBackup encountered errors when attempting to locate a backup image.
518
Message:
Troubleshooting NetBackup for DB2 125
About the error message codes
Cause:
NetBackup encountered errors when writing a backup image.
520
Message:
Cause:
NetBackup encountered errors when reading a backup image.
523
Message:
Cause:
NetBackup encountered errors when attempting to close the backup image.
524
Message:
Cause:
NetBackup encountered errors when attempting to complete the requested
operation.
526
Message:
Cause:
NetBackup encountered errors when attempting to abort the previously requested
operation.
126 Troubleshooting NetBackup for DB2
About the error message codes
528
Message:
Cause:
NetBackup encountered errors when attempting to expire an incomplete backup
image. This error typically indicates that the previous operation has failed, and
DB2 is attempting to delete any incomplete images.
Appendix A
Configuration for a DB2 EEE
(DPF) environment
This appendix includes the following topics:
For complete instructions on how to create this type of schedule, see the
following:
See “Configuring an Application Backup schedule” on page 31.
■ In the client list, include all clients you want to back up, including the DB2
catalog node.
■ Create a Standard type policy with a User Backup type schedule if the following
apply:
■ The userexit program for logging is turned on in DB2 UDB.
■ The client is a UNIX machine.
See “About backing up archive log files with the user exit program” on page 41.
■ If you use the VENDOR method, see the following:
See “Creating a db2.conf file (vendor method)” on page 49.
Note: 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.
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.
132 Using NetBackup for DB2 with SAP®
Backup and restore of DB2 databases
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.
Note: Do not use SAP CCMS, sapdba, brbackup, or brrestore commands to initiate
backups or restores. They do not invoke NetBackup.
Note: SAP must not be running when you attempt to restore the database.
Note: Do not use SAP CCMS, sapdba, brarchive commands, or the SAP Logfile
Management window in the DB2 Control Center for log file archival. They depend
on the SAP user exit program for proper operation.
A backup (continued)
Application Backup schedule automatic
configuring 32 configure scripts 61
environment variables 56 using scripts 66
overview 32, 34 database 66
retention 32 manual 67
with Snapshot Client 98 partitions 67
ARCDIR keyword 52 tablespaces 67
ARCFUNC COPY keyword 48, 52 user-directed 67
ARCFUNC SAVE keyword 47, 52 with Snapshot Client methods 95, 106
ARCHIVE LOG command 17 wizard
archive logs invoking 106
backing up 24, 66 BACKUP command 17
configuring policies 43 BACKUP DATABASE command 15, 66, 69–70
keywords for backing up in db2.conf 41 backup media required 23
overview 18 Backup Selections list
restoring 79 adding scripts 39
restoring from a raw partition 53 adding selections 38–39
automatic backup adding templates 38–39
create scripts 61 overview 37
overview 66 backups
policy 66 manual 40
automatic backup schedule wizard
configuring 32 invoking 58
Automatic Cumulative Incremental Backup schedule bp.conf
overview 34 variables 61
Snapshot Client effects 105 bpdb2proxy command 103, 107
Automatic Differential Incremental Backup schedule bpdbsbdb2
overview 34 command syntax 69
Snapshot Client effects 105 running a backup template 69
Automatic Full Backup schedule 33–34 running a recovery template 78
Snapshot Client effects 105 bpdbsbdb2 command 59
with Snapshot Client 98 bphdb log 112
bplist command 72–73
browse for restore
B using Backup
Backup Archive. See and Restore
Archive using bplist 73
and Restore interface. See invoking. See
overview
backup C
archive log 66 client read timeout property 114
134 Index
keywords (continued) P
OBJECTTYPE TABLESPACE 53 parameters for scripts 61
PARTITIONTYE RAW 80 partitions
PARTITIONTYPE RAW 53 backing up 67
POLICY 54 PARTITIONTYPE RAW keyword 53, 80
RETDIR 54 point in time rollback 102
SCHEDULE 54 policy configuration
SRCALIAS 54 adding clients 37
SRCINST 54 attributes 31
summary 51 backup selections list 37
for archive logs 43
L for configuration files 45
license keys, adding 24 for databases 30
log files for Snapshot Client 98
archiving 41 overview 29
enabling 110 schedules 31
testing 40
POLICY keyword 54
M processes
manual backup of a policy 67 log files for NetBackup processes 111
master server proxy copy 92
specifying 41, 57
maximum jobs per client 28
multiple copies feature 36, 105 Q
multiplexing QUIESCE command 60
overview 13
multistreamed backups 96 R
raw partitions 80
N reason codes 115
NBDB2 vendor I/O library RECOVER DATABASE command 15
overview 15–16 Recovery Wizard
settings 66 also see wizard 76
NET_BUFFER_SZ file 114 overview 76
NetBackup Client Service log on account, use with Snapshot Client 106
configuring 54 remote folder button 40
NODE keyword 53 reports 109
See also log files
All Log Entries report 113
O NetBackup server reports 113
OBJECTTYPE ALTERNATE keyword 53 RESTORE DATABASE command 15, 81
OBJECTTYPE ARCHIVE keyword 53 restores
OBJECTTYPE DATABASE keyword 53 snapshot rollback 102–103
OBJECTTYPE TABLESPACE keyword 53 using DB2 78
offhost backup. See Snapshot Client with Snapshot Client methods 95, 102, 104, 107
configuration 96 RETDIR keyword 54
configuring 100 retention period
overview 92 for Snapshot Client 105
optimizing file restores 114 ROLLFORWARD command 17
ROLLFORWARD DATABASE command 15, 42
136 Index
S T
SAP tablespaces
using NetBackup for DB2 with 131 backup 66–67
SCHEDULE keyword 54 templates
schedules administration 68
adding 31 administration interface 66
automatic backup 66 advantages over scripts 35
frequency 36 backups
properties 35 creating 59
properties for Snapshot Client 105 creating scripts from templates 59
retention for Snapshot Client 105 overview 14, 56
types of schedules 31 recovery 76
scripts running from Backup
cautions for using 35, 61 Archive. See and Restore
creating 57, 59 running with bpdpsbdb2 69
creating from templates 59 storing 62
creating manually 60 use with Snapshot Client 107
errors in executing 61 TERMINATE command 17
example backup scripts 60 testing policy configuration 40
example restore scripts 60 timeout failures
examples 18, 60 minimizing 113
modifying 61 troubleshooting
parameters 61 false restore failures reported 114
scheduler 66 reason codes 115
storing 62
type of operation 61 U
server-directed backups 106
unified logging 111
snapshot backup 91, 96, 98, 102
user exit program
configuration 96
archive log backup 24, 41, 66
configuration requirements 97
overview 17–18
database objects included 98
policies needed 26, 43–44
overview 91
policy configuration 98
restore method 102 V
Snapshot Client variables
configuring policies 98 environment 55
effect on backup schedules 35 for scripts 61
effects on backups and restores 106 VENDOR method for archive logging
effects on policies and schedules 104 db2.conf keywords needed 52
file-based operations 92 overview 18, 66
overview 91 policies needed 25
proxy copy 92 specifying in DB2 24
stream-based operations 93 used with BACKUP DATABASE command 70
theory of operations 94 vxvm snapshot 102
snapshot rollback 102–103
SRCALIAS keyword 54 W
SRCINST keyword 54 Windows interface 28
stream-based operations 93 wizard
backup 18, 56
Index 137
wizard (continued)
overview 14, 18
recovery 18, 76
use with Snapshot Client 106