NetBackup81 AdminGuide DB2
NetBackup81 AdminGuide DB2
Release 8.1
Veritas NetBackup™ for DB2 Administrator's Guide
Last updated: 2017-09-26
Legal Notice
Copyright © 2017 Veritas Technologies LLC. All rights reserved.
Veritas, the Veritas Logo, and NetBackup are trademarks or registered trademarks of Veritas
Technologies LLC or its affiliates in the U.S. and other countries. Other names may be
trademarks of their respective owners.
This product may contain third party software for which Veritas 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. Refer to the third party legal notices document accompanying this
Veritas product or available at:
https://www.veritas.com/about/legal/license-agreements
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 Veritas Technologies
LLC and its licensors, if any.
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, et seq.
"Commercial Computer Software and Commercial Computer Software Documentation," as
applicable, and any successor regulations, whether delivered by Veritas as on premises or
hosted services. 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.
http://www.veritas.com
Technical Support
Technical Support maintains support centers globally. All support services will be delivered
in accordance with your support agreement and the then-current enterprise technical support
policies. For information about our support offerings and how to contact Technical Support,
visit our website:
https://www.veritas.com/support
You can manage your Veritas account information at the following URL:
https://my.veritas.com
If you have questions regarding an existing support agreement, please email the support
agreement administration team for your region as follows:
Japan CustomerCare_Japan@veritas.com
Documentation
Make sure that you have the current version of the documentation. Each document displays
the date of the last update on page 2. The latest documentation is available on the Veritas
website:
https://sort.veritas.com/documents
Documentation feedback
Your feedback is important to us. Suggest improvements or report errors or omissions to the
documentation. Include the document title, document version, chapter title, and section title
of the text on which you are reporting. Send feedback to:
NB.docs@veritas.com
You can also see documentation information or ask a question on the Veritas community site:
http://www.veritas.com/community/
https://sort.veritas.com/data/support/SORT_Data_Sheet.pdf
Contents
Feature Description
Media and device All devices supported by Media Manager are available to NetBackup
management 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.
Introduction to NetBackup for DB2 10
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 client
interfaces 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 containing
configuration information the software uses during backups and
restores. Before you can create, modify, delete, or rename
templates on the master server, the client must exist in a policy or
in the NetBackup image catalog. 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. You should
use an operating-system defined scripting language to create the
scripts and use a template as the base for a script.
Introduction to NetBackup for DB2 11
NetBackup for DB2 overview
Feature Description
Parallel backup and NetBackup for DB2 supports the parallel backup and restore
restore operations capabilities of DB2 commands. 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)
Component Description
NBDB2 vendor I/O The DB2 BACKUP and RESTORE commands use the NBDB2 vendor
library I/O library to send data buffers between a DB2 database and
NetBackup.
On Windows: install_path\NetBackup\bin\nbdb2.dll
On UNIX: /usr/openv/netbackup/bin
User exit program The NetBackup for DB2 user exit program, db2uext2, provides
one method for backing up and restoring the DB2 archive log files.
Use this method at the following times:
The user exit program backs up and restores the archive logs as
files. The file is called db2uext2.64. NetBackup for DB2 supports
this method for protecting the archive logs on all supported DB2
releases.
On Windows: %DB2_INSTANCE%\bin\db2uext2.exe
On UNIX: $DB2_INSTANCE/sqllib/adm/db2uext2.
Component Description
Sample configuration The installation software installs the following sample files:
file (db2.conf) and
■ A sample configuration file (db2.conf file). The db2.conf file
script files
includes specifications for backups and restores, and it provides
information on policies and schedules. 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. The scripts contain DB2 BACKUP or RESTORE
commands for use with NetBackup.
Alternatively, users can use the NetBackup for DB2 wizards to
create backup and restore templates. You can use the templates
in place of scripts, and you can convert templates into scripts.
On Windows: install_path\NetBackup\dbext\db2\samples
On UNIX:
/usr/openv/netbackup/ext/db_ext/db2/scripts.
To use the sample files, copy the sample files to working directories
and modify them for your own use.
NetBackup for DB2 NetBackup for DB2 provides wizards that enable you to create
backup wizard and backup and recovery templates. You invoke the wizards by browsing
recovery wizard for and selecting a DB2 database 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.
Table 1-3 shows the DB2 syntax you can use to specify these methods within DB2.
It indicates the term that the DB2 for NetBackup uses to describe each method.
LOGARCHMETH1=LOGRETAIN LOGARCHMETH1=VENDORlibrary
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:
On Windows: LOGARCHMETH1=VENDOR:install_path\NetBackup\bin\nbdb2.dll
On UNIX: LOGARCHMETH1=VENDOR:/usr/openv/netbackup/bin/library
For library, specify an operating system-specific library.
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 that defines the user exit
program includes the USEREXIT, LOGRETAIN, and LOGARCHMETH1 keywords that are
specified in a configuration parameter.
Chapter 2
Installing NetBackup for
DB2
This chapter includes the following topics:
Step 1 Verify the installation prerequisites. See “Verifying the operating system and platform
compatibility” on page 17.
http://www.netbackup.com/compatibility
Step 2 Verify that master server has a valid See “About the license for NetBackup for DB2” on page 19.
license for NetBackup for DB2 and any
NetBackup options or add-ons that you
want to use.
Step 3 Specify a log archive method. See “About log archiving” on page 19.
Step 4 (UNIX) specify the DB2 home path. See “Specifying the DB2 home path (UNIX)” on page 22.
Step 5 Add a new database instance. See “About adding new DB2 instances” on page 22.
Note: To use NetBackup for DB2 with Snapshot Client, you must have a license
for NetBackup Snapshot Client.
Verify that the following requirements are met for the NetBackup server:
■ The NetBackup server software is installed and operational on the NetBackup
server.
See the NetBackup Installation Guide.
■ Make sure that you configure any backup media that the storage unit uses. The
number of media volumes that are required depends on several things:
■ The devices that are used and storage capacity of the media
■ The sizes of the databases that you want to back up
■ The amount of data that you want to archive
■ The size of your backups
■ The frequency of backups or archives
■ The length of retention of the backup images
See the NetBackup Administrator’s Guide, Volume I.
Verify that the following requirements are met for the NetBackup clients:
■ The NetBackup client software is installed on the computer that has the
databases you want to back up.
If the database is clustered, you must use the same version of NetBackup on
each node in the cluster.
■ To use the new features that are included in NetBackup for DB2 in NetBackup
8.1, you must upgrade your NetBackup for DB2 clients to NetBackup 8.1. The
NetBackup media server must use the same version as the NetBackup for DB2
client or a higher version than the client.
Note: In a DB2 EEE environment, install the NetBackup client software on every
node and client that DB2 uses.
The following topics describe the archive methods and how to specify an archive
method in DB2.
See “Using the VENDOR archive method” on page 20.
See “Using the user exit archive method” on page 20.
The terms “VENDOR” and “user exit” describe the methods that DB2 supports for
log archiving. Ensure that you understand how the terms are used in this manual.
See “About NetBackup for DB2 terminology” on page 14.
■ 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:
On Windows:
LOGARCHMETH1=VENDOR:install_path\NetBackup\bin\nbdb2.dll
On UNIX: LOGARCHMETH1=VENDOR:/usr/openv/netbackup/bin/library
For the library name, refer to the following topic.
See “About the NetBackup for DB2 components” on page 12.
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.
Installing NetBackup for DB2 22
Specifying the DB2 home path (UNIX)
install_path\NetBackup\dbext\DB2\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.
■ On UNIX, if you install a new DB2 instance after you install NetBackup, you
need to add this new instance to the NetBackup configuration. This action
ensures that all new DB2 instances are included in backup operations.
See “Specifying the DB2 home path (UNIX)” on page 22.
Chapter 3
Configuring NetBackup for
DB2
This chapter includes the following topics:
■ About backing up archive log files with the user exit program
The Java and Windows interfaces are nearly identical. If interface differences exist
in the configuration procedures, the term “Windows” or “Java” appears in the
procedure to differentiate between the two interfaces.
Table 3-1 shows the three major parts of NetBackup for DB2 configuration.
Task Description
Configure a backup policy for a DB2 A backup policy for a database defines the backup
database criteria for a specific group of one or more clients.
To back up the database environment, you must
define at least one DB2 policy with the appropriate
schedules.
Configure the run-time environment To configure your run-time environment, you must
create a db2.conf file. This task includes a
description of the environment variables that
NetBackup creates.
security requirements may prohibit global read-write access. If so, you can restrict
permissions of specific directories to a single group or user. You can restrict
permissions in this way if the processes the group or a user runs initiate all backup
and restore operations for that directory.
Check that the /usr/openv/netbackup/logs/user_ops directory tree has 777
permissions. The items in this directory need to be accessible for the applications
to operate correctly.
10 When you have added all the schedules, clients, and backup selections you
need, click OK.
Table 3-2 Policy attribute descriptions for NetBackup for DB2 policies
Attribute Description
Policy type Determines the types of clients that can be backed up with the policy. For DB2 databases,
select the policy type DB2.
Keyword phrase For NetBackup for DB2, the Keyword phrase entry is ignored.
Snapshot Client and This group contains the options that enable backups with Snapshot Client.
Replication Director
See “NetBackup for DB2 with Snapshot Client features” on page 93.
Note: For NetBackup 8.1, if you installed NetBackup on more than one node
in the DB2 cluster, you must perform additional configuration.
See “Reviewing the auto-discovered mappings in Host Management”
on page 38.
Configuring NetBackup for DB2 28
About configuring a backup policy for a DB2 database
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 59.
Note: If you installed NetBackup on more than one node in the DB2 cluster,
you must perform additional configuration. You must approve each valid
Auto-Discovered Mapping that NetBackup discovers in your environment.
See “Reviewing the auto-discovered mappings in Host Management”
on page 38.
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.
Configuring NetBackup for DB2 30
About adding backup selections to a DB2 policy
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 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.
Note: All scripts must be stored and run locally. One recommendation is that scripts
should not be world-writable. Scripts are not allowed to be run from network or
remote locations. Any script that is created and saved in the NetBackup db_ext
(UNIX) or dbext (Windows) location needs to be protected during a NetBackup
uninstall.
For more information about registering authorized locations and scripts, review the
knowledge base article:
http://www.veritas.com/docs/000126002
Add templates or scripts to the backup selections list only if you want to set up a
policy for automatic backups. These templates or scripts are run for manual backups
and for automatic schedules as specified under the Schedules tab. NetBackup
Configuring NetBackup for DB2 31
About adding backup selections to a DB2 policy
runs the templates or scripts in the order that the templates or scripts appear in the
backup selections list.
Note: Be sure to specify the correct template name in the backup selections list to
prevent an error or a wrong operation.
Note: Be sure to specify the correct script name in the backup selections list to
prevent an error or a wrong operation.
/backup_scripts/db/cold_backup.sh
C:\backup_scripts\db\cold_backup.cmd
Table 3-3 Example settings for a NetBackup for DB2 application backup
schedule
Retention 2 weeks
00:08:00 - 22:00:00
Table 3-4 Example settings for NetBackup for DB2 automatic backup
schedules
Table 3-4 Example settings for NetBackup for DB2 automatic backup
schedules (continued)
18:00:00 - 22:00:00
Property Description
Type of backup Specifies the type of backup that this schedule can control. The selection list shows only
the backup types that apply to the policy you want to configure.
Schedule type You can schedule an automatic backup in one of the following ways:
■ Frequency
Frequency specifies the period of time that can elapse until the next backup operation
begins on this schedule. For example, assume that the frequency is 7 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
The Calendar option lets you schedule the backup operations that are based on specific
dates, recurring week days, or recurring days of the month.
Configuring NetBackup for DB2 36
About adding schedules to a NetBackup for DB2 policy
Property Description
Retention The retention period for an application backup schedule refers to the length of time that
NetBackup keeps backup images. The retention period for an automatic schedule controls
how long NetBackup keeps records of when scheduled backups occurred. For example, if
your database is backed up once every Sunday morning, you should select a retention
period of at least 2 weeks.
The type of schedule you select affects the retention period 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. This comparison
is done to determine whether a backup is due. So 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. If using Snapshot Client, also specify Multiple copies
on the automatic schedule.
Automatic Full Backup An Automatic full backup contains a copy of all the data. A full
backup is not the same as a whole database backup. Full means
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 backup takes less time and space than a full backup; it contains
only the data that changed since the last full backup.
Note: For the types of backup schedules, the information in this topic pertains to
stream-based backups. If you use the Snapshot Client option, some of the
information in that table may differ.
More information about backup schedules and Snapshot Client features is available.
See “NetBackup for DB2 with Snapshot Client features” on page 93.
Configuring NetBackup for DB2 38
Performing a manual backup
■ If the DB2 server is clustered, the host is associated with its node name and
the virtual name of the cluster.
client01.lab04.com client01
client01.lab04.com clustername
client01.lab04.com clustername.lab04.com
client02.lab04.com client02
client02.lab04.com clustername
client02.lab04.com clustername.lab04.com
Configuring NetBackup for DB2 40
Reviewing the auto-discovered mappings in Host Management
4 When you finish approving the valid mappings for the hosts, click on the Hosts
tab at the bottom of the Hosts pane.
For hosts client01.lab04.com and client02.lab04.com, you see Mapped
Host Names/IP Addresses that are similar to the following:
5 If you need to add a mapping that NetBackup did not automatically discover,
you can add it manually.
Click on the Hosts tab, then right-click in the Hosts pane and click Add Shared
or Cluster Mappings. For example, provide the name of the virtual name of
the cluster. Then click Select Hosts to choose the node names in the cluster
to which you want to map that virtual name.
Table 3-7 Example mapped host names for a DB2 cluster environment
Cluster with two nodes Physical name of Node 1 Virtual name of DB2 server
Do not specify ARCFUNC SAVE or ARCFUNC COPY if the VENDOR DB2 configuration
parameter is in effect. In environments with VENDOR in effect, NetBackup ignores
the information that pertains to these commands.
Whether to specify ARCFUNC SAVE or ARCFUNC COPY depends on the amount of user
intervention you intend to provide.
Determine which command to use, as follows:
■ If you specify ARCFUNC SAVE, NetBackup backs up the archive logs according
to the policy and schedule you specify.
If DB2 later issues a ROLLFORWARD request, the user exit program looks for the
archive logs on a backup volume. At restoration time, no user intervention is
required. The sequential recovery can be slow if there are numerous, large log
files.
■ If you specify ARCFUNC COPY, NetBackup copies the archive logs to the location
that is specified on the ARCDIR statement in the db2.conf file.
Configuring NetBackup for DB2 42
About backing up archive log files with the user exit program
The disk to which the archive logs are copied eventually fills with archived log
files. Most users want to configure a user archive schedule so they can archive
the entire ARCDIR directory to NetBackup volumes.
This method requires some user intervention during the recovery. Specifically,
you must restore these files before the rollforward operation. Advanced users
prefer this approach because of performance and flexibility benefits.
For information about how to restore files to disk, see the NetBackup
Administrator’s Guide, Volume I.
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.
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.
Partition The partition is the highest selectable DB2 object. A partition represents
a collection of storage within a database in which tablespaces are
stored. Partitions contain tablespaces and log folders. Within a database,
you can select one or more partitions.
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.
Note: If you installed NetBackup on more than one node in the DB2 cluster,
you must perform additional configuration. You must approve each valid
Auto-Discovered Mapping that NetBackup discovers in your environment.
See “Reviewing the auto-discovered mappings in Host Management”
on page 38.
Configuring NetBackup for DB2 44
About backing up archive log files with the user exit program
Note: If you installed NetBackup on more than one node in the DB2 cluster,
you must perform additional configuration. You must approve each valid
Auto-Discovered Mapping that NetBackup discovers in your environment.
See “Reviewing the auto-discovered mappings in Host Management”
on page 38.
Creating a db2.conf file for use with the user exit program
The NetBackup for DB2 configuration file, db2.conf, consists of a series of keywords
and values. This file defines how to back up the database and the archive logs. It
must be created on each NetBackup for DB2 client.
The installation package installed a file named db2.conf that you can customize.
The following procedures show you how to customize this file. Follow the instructions
in this section if you use the user exit program to perform backups.
To create a db2.conf file for use with the user exit program
1 Before you create the db2.conf file, you need to create the policies to back
up the archive logs and the configuration files.
See “Configuring a policy to back up the archive logs” on page 43.
See “Configuring a policy to archive the archive logs” on page 44.
See “Configuring a policy to back up the configuration files” on page 28.
2 Log on to a client computer.
Configuring NetBackup for DB2 46
Configuring the run-time environment
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:
Windows: install_path\NetBackup\dbext\db2\samples
UNIX: /usr/openv/netbackup/ext/db_ext/db2/scripts
The active location for the db2.conf file is as follows:
Windows: install_path\NetBackup\dbext\db2\db2.conf
UNIX: $DB2_Instance_Home/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.
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
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
Configuring NetBackup for DB2 48
Configuring the run-time environment
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
Configuring NetBackup for DB2 49
Configuring the run-time environment
RETDIR /home/db2inst1/arcdir
ENDOPER
DATABASE SAMPLE
OBJECTTYPE DATABASE
. . .
Configuring NetBackup for DB2 50
Configuring the run-time environment
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 “db2.conf keywords” on page 52.
7 Save and close the db2.conf file.
8 Repeat this procedure on each client computer.
See “Example db2.conf file (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
Configuring NetBackup for DB2 51
Configuring the run-time environment
#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
CLIENT_NAME=client_name
CLIENT_NAME=client_name
db2.conf keywords
The db2.conf file provides definitions NetBackup uses to perform DB2 backup and
restore operations.
■ Each definition is a grouping of keyword value pairs.
■ Each definition contains an OBJECTTYPE keyword and value.
■ Each definition ends with the ENDOPER keyword.
■ All other keyword value pairs are optional, depending on the OBJECTTYPE.
■ Within a definition, the keyword value pairs can appear in any order.
■ The keywords are not case-sensitive, but the values are case-sensitive.
■ When a pound character (#) appears in the first column, the line is treated as a
comment.
■ Backup and restore operations have two definitions, one for OBJECTTYPE
DATABASE or TABLESPACE and one for OBJECTTYPE ARCHIVE.
■ NetBackup searches each definition from top to bottom and uses the first value
specified for each keyword found. Later definitions for the same keyword are
ignored.
The db2.conf file specifies the keywords that are described in this topic. If
LOGARCHMETH1 VENDOR is configured in your DB2 environment, NetBackup for DB2
ignores the following keywords.
The following keywords:
■ ARCDIR
■ ARCFUNC SAVE
■ ARCFUNC COPY
■ PARTITIONTYPE RAW
■ RETDIR
Table 3-9 describes the keywords and values that are used.
Table 3-9 Keyword value pairs for the db2.conf file (continued)
For UNIX: Lets you set the permissions on a backup image at backup
BKUP_IMAGE_PERM time. Possible values are the following:
DATABASE db_name DB2 database name. No default. Required for all definitions
except OBJECTTYPE ALTERNATE.
Table 3-9 Keyword value pairs for the db2.conf file (continued)
FORCE_BACKUP_CLIENT The local client name. The client name is needed when DB2
performs an archive backup immediately following an
alternate restore from another client. This client name allows
the backup to be taken using the correct client name for the
local host. The CLIENT_NAME still references the source
client that is used to select the backup images that the restore
needs.
NODE number Specifies the DB2 node number that must match the local
node in order for the other keywords and values to be used.
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 an Application
Backup schedule.
Table 3-9 Keyword value pairs for the db2.conf file (continued)
RETDIR dir Full path to the location from which the archive logs are
retrieved. No default.
SCHEDULE sched_name NetBackup schedule name in the policy. The default is the
first schedule of the correct type in the policy.
Note: Only the NetBackup 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 command and the
restore command do not process the DB2_POLICY variable. Instead, the templates
and scripts use the POLICY name. This policy is defined in the
$DB2_INSTANCE_HOME/db2.conf file (UNIX) or the
install_path\NetBackup\dbext\db2\db2.conf file (Windows).
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.
DB2_SCHED Name of the NetBackup schedule. Enabled only if the backup is initiated from the
server, either automatically by the NetBackup scheduler or manually through the
administrator interface.
DB2_USER_INITIATED Set to 1 if this backup is a user-initiated backup type (Application Backup backup).
Configuring the logon account for the NetBackup Client Service for
NetBackup for DB2
Because the NetBackup Client Service is started by default under the SYSTEM
account, you also must give special attention to database user authentication. The
SYSTEM account does not have permission to connect to the target database if you
use OS authentication instead of passwords.
If you use OS authentication, run the NetBackup Client Service under an account
that has SYSADM, SYSCTRL, or SYSMAINT privileges for DB2. The account name
must comply with the DB2 naming rules.
For more information on naming rules and authentication, see your DB2
documentation.
To configure the logon account for the NetBackup Client Service for
NetBackup for DB2
1 Open the Windows Services application.
2 Double-click on the NetBackup Client Service entry.
3 Click on the Log On tab.
Configuring NetBackup for DB2 58
About NetBackup for DB2 templates and shell scripts
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 59.
The NetBackup for DB2 backup wizard does not support all of the
commands and options that DB2 provides. If a template does not provide
all of the required functionality, you must write a script.
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 the user writes, must conform to DB2 syntax. On UNIX,
they must conform to the UNIX shell syntax.
■ /usr/openv/netbackup/bp.conf
Note: The Backup, Archive, and Restore interface only displays local or resident
partitions. Any 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.
To create a backup template by using the NetBackup for DB2 backup wizard
1 Start the Backup, Archive, and Restore interface:
■ On the Windows Start menu, choose All Programs > Veritas NetBackup
> Backup, Archive, and Restore.
■ On UNIX, issue the following command:
Configuring NetBackup for DB2 60
About NetBackup for DB2 templates and shell scripts
/usr/openv/netbackup/bin/jbpSA &
where:
Note: The user needs to review and customize any and all scripts that are generated
from templates. Generated scripts are intended to be modified for the user's
environment and preferences. For example, settings such as passwords or catalog
partition numbers are not generated in the template-to-script conversion, so they
require manual editing. In addition, generated scripts do not handle all possible
error and failure cases and should be used at your own risk.
Use the DB2CMD command processor to run the scripts that you generated for
Windows. This processor is provided with DB2, DB2CMD C:\TEMP\SCRIPT.CMD.
An authorized DB2 user needs to run the scripts that are generated for UNIX.
The user needs to review and modify script execution permissions as desired.
For security purposes, user names and passwords are not included in generated
scripts. Add them as needed.
The DB2 QUIESCE command is generated when the Disconnect users and prohibit
access template option is specified. However, this command fails if your version
is before DB2 V8.1.
When attempting a point-in-time restore, customize the time value. The command
DB2 RESTORE ... TAKEN AT strictly interprets the specified time and succeeds
only if a backup image with the same time exists. For more information, see your
IBM DB2 documentation. This limitation does not exist for templates, which search
for an appropriate image.
If a template enables roll-forward recovery, then roll-forward commands are
generated for all partitions that are specified in the template, whether or not that
partition is configured for roll-forward recovery.
Configuring NetBackup for DB2 62
About NetBackup for DB2 templates and shell scripts
■ db2_backup_db_online.cmd
■ db2_restore_db.cmd
■ db2_mpp_backup_offline.cmd
■ db2_mpp_restore_db.cmd
On UNIX, the NetBackup for DB2 installation software includes the following scripts:
■ db2_backup
■ db2_restore
■ db2_all_backup_mpp
■ db2_all_restore_mpp
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.
Configuring NetBackup for DB2 63
About NetBackup for DB2 templates and shell scripts
3 Use a text editor such as Notepad (Windows) or vi(1) (UNIX) to open the
script.
4 Follow the instructions in the script.
5 On UNIX, include an su - user line (user is the DB2 instance account) in
your scripts. Otherwise, the scripts do not run with the proper permissions and
environment variables.
6 Test the scripts that you created by starting a manual backup of this policy.
See “Performing a manual backup” on page 38.
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
■ UNIX: NetBackup bp.conf
■ NetBackup db2.conf
Parameters from these sources can be evaluated within the scripts. For example,
the DB2_POLICY value is the name of the policy that is used to perform the backup.
Template storage 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.
See “Using the NetBackup for DB2 recovery wizard” on page 77.
Shell script storage 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.
Template and shell Templates and the shell scripts pertain to NetBackup for DB2
script storage in a environments that are not installed in a cluster.
NetBackup cluster
Refer to the template storage and shell script storage entries in this
table.
If you operate 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.
Chapter 4
Performing backups and
restores of DB2
This chapter includes the following topics:
■ Using the Backup, Archive, and Restore interface to browse DB2 resources
Note: 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.
Also, NetBackup for DB2 does not generate an error when a backup DB2 template
or script is used for a restore operation.
■ Issue a DB2 command from the DB2 control center or command-line processor.
The DB2 BACKUP and RESTORE commands use the policies, schedules, and
settings that are specified in the following sources:
■ The NetBackup for DB2 vendor I/O library.
On UNIX, this library is named nbdb2.ext, where ext differs depending on
your platform.
On Windows, this library is named nbdb2.dll.
■ The NetBackup for DB2 configuration file. This file is named db2.conf.
■ Run 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.
■ Use the templates that are initiated from the template wizards or Template
Administration interface.
■ Use the templates and the 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:
database copy 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, manual
backup of a DB2 policy, or user-directed backup.
archive log 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.
For information on which files to back up, see your IBM DB2
documentation.
Performing backups and restores of DB2 67
About backups from the NetBackup master server
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 the NetBackup for DB2 template generation wizard creates are
stored in a predetermined location on the master server.
See “Creating a backup template using the NetBackup for DB2 backup wizard”
on page 59.
Performing backups and restores of DB2 69
About user-directed backups
Where -r runs a template, -t identifies the template, and -i identifies the instance
to use.
For example:
Format Description
For lib, specify the same path as shown for the preceding format
(Format 1).
Table 4-2 lists the command options when used in a NetBackup for DB2
environment.
Performing backups and restores of DB2 71
About user-directed backups
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 the options that are to be used for the backup
operation. The string passes to the vendor support library,
for example nbdb.so, exactly as it was entered, without
the quotes.
Note: You can also use the DB2 LIST HISTORY command to browse backup images.
Performing backups and restores of DB2 73
Using the Backup, Archive, and Restore interface to browse DB2 resources
This interface does not let you browse previous backups. Instead, it browses the
existing DB2 instances and databases. You can select these DB2 objects and use
the NetBackup for DB2 recovery wizard to prepare recovery templates for the
objects.
See “Using the NetBackup for DB2 recovery wizard” on page 77.
The following shows a sample restore window in the Backup, Archive, and Restore
interface for UNIX and for Windows.
In this example, the DB2 resource is expanded down to the tablespace level. You
can select for restore one or more tablespaces, one or more partitions, or one entire
database (by selecting all of its partitions).
-t 18 This example searches all DB2 backup images for a client named camel, which is also the master
server. The information comes from the NetBackup catalog on the master server. The user exit
program backs up the archive files.
The bplist -t 18 option specifies the DB2 backup type. The bplist output shows the DB2
database backup images that are stored in the NetBackup database.
Windows:
UNIX:
Where:
0 is the type of backup taken. Zero (0) indicates a full database backup. Three (3) indicates a
tablespace backup.
node0000 is the node number. In non-partitioned database systems, the 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.
20091202105150 is the timestamp, which includes the date (year, month, day) and time (hour,
minute, second).
1 is the session number. This file extension identifies the session number that was specified on
the DB2 BACKUP command.
Performing backups and restores of DB2 76
About browsing DB2 backup images with bplist
-k This example searches all DB2 backup images for a client named cow, which is also the master
DB2_Log_Policy server. The information comes from the NetBackup catalog on the master server. This example
assumes that the user exit program is used to back up the archive files.
The -k DB2_Log_Policy option specifies the 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.
Windows:
UNIX:
-k log_policy This example uses bplist to search the DB2 archive log files for a client named cow. The -k
log_policy option specifies the files that are backed up with this policy. The VENDOR is set
and the user exit program is not used to back up the archive logs:
Example
location:C:\DB2\SAMPLE\LOGFILE\node0000\db2v864d\C0000000_S0000000.LOG
Example location:/DB2/SAMPLE/LOGFILE/node0000/db2v864d/C0000000_S0000000.LOG
Where:
You can find more information on the bplist command in the NetBackup
Commands Reference Guide.
3 Expand a DB2 instance and select the database objects you want to restore.
4 Windows: Click Actions > Restore
UNIX: Click 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
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.
■ For DB2 8.2 and later releases, enter the following command:
db2 recover db db_name
where db_name is the name of the DB2 database you are to restore.
UNIX: db2 restore db db_name load /usr/openv/netbackup/bin/lib
Where:
3 Use operating system commands to copy the missing archive logs to the correct
locations in your operating system. For example:
On Windows, use your mouse to copy the files from one location to another.
On UNIX, use the cp command.
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:
Windows: bprestore
install_path\vedb2\db2\v8\db2V82d\NODE0000\SQL0001\SQLOGDIR\S00009.LOG
UNIX: bprestore
/vedb2/db2/v8/db2V82d/NODE0000/SQL0001/SQLOGDIR/S00009.LOG
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 85
Performing a database 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.
OPTIONS "options-string" Specifies the options to be used for the restore operation.
The string passes to the vendor support library, for
example nbdb2.so, exactly as it was entered, without
the quotes.
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-3 illustrates this example.
Instance: class2
Databases: eng1, art1
Performing backups and restores of DB2 87
About an alternate restore
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 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.
The following example shows the definition that is needed to define the new
database:
DATABASE NEWSAMPL
OBJECTTYPE DATABASE
POLICY db2-bkup
SCHEDULE Default-Application-Backup
CLIENT_NAME Client1 # Restore to (and backup from) local host
ENDOPER
The following example shows the definition that is needed to define the old
database:
DATABASE SAMPLE
OBJECTTYPE DATABASE
POLICY db2-bkup
SCHEDULE Default-Application-Backup
Performing backups and restores of DB2 89
About an alternate restore
The following example shows the definition that is needed to define the new
archive log files:
DATABASE NEWSAMPL
OBJECTTYPE ARCHIVE
POLICY db2_archive
SCHEDULE Default-Application-Backup
#SCHEDULE User # Swap '#' on SCHEDULE for user-exit
CLIENT_NAME Client1 # Restore to (and backup from) local host
ARCFUNC SAVE
ENDOPER
The following example shows the definition that is needed to define the old
archive log files:
DATABASE SAMPLE
OBJECTTYPE ARCHIVE
POLICY db2_archive
SCHEDULE Default-Application-Backup
#SCHEDULE User # Swap '#' on SCHEDULE for user-exit
CLIENT_NAME Client2 # Restore from backup of remote host
ARCFUNC SAVE
ENDOPER
Performing backups and restores of DB2 90
About an alternate restore
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:
Windows:
UNIX:
UNIX:
For example:
3 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.
Chapter 5
Using Snapshot Client with
NetBackup for DB2
This chapter includes the following topics:
Table 5-1 Snapshot Client features used with NetBackup for DB2
Feature Description
Snapshot backup A snapshot backup occurs when NetBackup and DB2 coordinate
to create a point-in-time disk image of the database for backup.
This process is nearly instantaneous; so user access to the
database is not interrupted during the backup. The snapshot can
then be backed up to storage and or retained for instant recovery.
Instant recovery This feature enables instant recovery of the database from a
previously created snapshot. It combines snapshot technology with
the ability to do rapid disk-based restores.
Off-host backup The off-host backup shifts the burden of reading the snapshot to a
separate host. The database host is only involved in performing
the snapshot. The snapshot is mounted, read, and transferred to
storage by either an alternate client, the media server, or a
third-party copy device.
Proxy operations A proxy backup or restore is a special type of operation where DB2
does not read or write the database files. Instead, NetBackup for
DB2 acts as a proxy and performs all of the data movement.
NetBackup coordinates with DB2 to ensure that the correct files
are in the correct state for the operation.
Backups and restores remain tightly integrated with DB2 and its
catalog, greatly simplifying administration tasks.
File-based operations DB2 provides the list of files that require backup or restore to
NetBackup for DB2 with Snapshot Client. It then acts as a proxy
to perform the data movement.
Table 5-1 Snapshot Client features used with NetBackup for DB2
(continued)
Feature Description
bpdb2proxy This NetBackup for DB2 command is used in backup and restore
scripts to initiate snapshot backup and restore.
Note: NetBackup for DB2 does not support the USE SNAPSHOT
parameter on the DB2 BACKUP DATABASE command.
NetBackup for DB2 The templates that the wizard creates, automatically initiate
wizards snapshot operations if the policy is configured for snapshots.
that results in file-based backups of the DB2 files using NetBackup to perform the
data movement.
The NetBackup for DB2 agent uses DB2 APIs to put the data files into a quiesced
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 quiesced mode.
The data files are in quiesced mode only for the period of time it takes to create a
snapshot.
Note: Before you can perform the very first snapshot backup, DB2 requires a
stream-based backup of the database.
DB2 performs only conventional backups for transaction logs; use either the user-exit
or VENDOR method. You cannot use Snapshot Client methods for transaction logs.
Snapshot backups and log archiving require different configurations. When you
configure NetBackup for DB2 with Snapshot Client backups, be sure to configure
the policies to allow both kinds of backups.
See “How Snapshot Client software affects backup types” on page 119.
DB2 Server
VENDOR log
archive method
Control commands
Data
NetBackup
Figure 5-2 NetBackup for DB2 with Snapshot Client file-based backup or
restore
DB2 Server
Control commands
List of files
User-exit log
Data
archive method
NetBackup
The agent groups the database files into three streams and initiates a file-based
backup for each stream. After the backup is done, DB2 starts a conventional backup
of the transaction logs using either the user-exit or vendor method.
Issue this command on each node of the database.
Note: If the policy used by the backup is not configured for Snapshot Client, the
backup fails.
Using Snapshot Client with NetBackup for DB2 100
About configuring Snapshot Client with NetBackup for DB2
■ DB2 does not support snapshot backups of database transaction logs. If DB2
is configured to use the user exit program, review the following topic:
See “About backing up archive log files with the user exit program” on page 41.
backups. This configuration ensures that the entire database can be restored
successfully.
■ On UNIX, the user identification and group identification numbers (UIDs and
GIDs) associated with the files to be backed up must be available. The UID and
GID must be available to both the primary client and the alternate backup client.
The UID on the primary client and the alternate backup client must be the same.
Similarly, the GID on the primary client and the alternate backup client must be
the same.
■ Ensure that the data files reside on a volume or a file system that does not
contain archive logs, control files, or executables.
■ Allocate a different set of volumes or file systems to the DB2 executables versus
the configuration files and transaction logs.
One reason to have two different volumes is to separate the data files from the
other files. If the logs are configured on the same volumes as the data files, the
volumes the logs are temporarily frozen while NetBackup takes the snapshot.
The logs and the database activity may freeze until the logs become accessible
again.
Another reason for writing the data files to their own repository is because it is
required for an instant recovery point-in-time rollback. Only data files can exist
on the volume that you want to restore.
■ The hardware and software that is required for the appropriate snapshot method
must be installed and configured correctly.
■ NetBackup Snapshot Client must be installed and configured correctly, and the
master server must have a valid license for this option.
■ To perform off-host backups, specify the off-host in the backup policy and ensure
that host has the software and permissions to mount the snapshot.
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 Data mover If you click Data mover, also select one of the following possible
(UNIX clients only). data movers:
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 Full
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
See “ BLI incremental backup options using NetBackup for DB2” on page 115.
About NetBackup for DB2 restores of 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:
■ UNIX: VxFS_Checkpoint snapshot
■ vxvm snapshot
■ FlashSnap snapshots
See the NetBackup Snapshot Client Administrator’s Guide.
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 status 249.
■ 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 database restore” on page 77.
Where:
-options <options string> Specifies the options that are to be used for the restore
operation. Currently, the only option is
DB2_RESTORE_PRIORITY. By default, the preset priority
for restore jobs is 90000, which is the highest preset job
priority of any other NetBackup job. The available range
is 0 - 99999. The higher the number, the greater the job
priority.
including the policy types and schedules and the convenience of the template
generation wizard. It also remains tightly integrated with DB2 and its catalog, which
greatly simplifies administration tasks.
/usr/openv/netbackup/ext/db_ext/NODATA_CKPT_PROXY
If the agent finds this file during run time, it uses Nodata Storage Checkpoint, and
it keeps the database containers in quiesced (write suspend). The database
containers are kept in this mode for the duration of the backup.
■ If the number of backup streams that is specified changed from the previous
backup. This change can be made through the GUI or through a DB2 command.
■ If NetBackup does not have a valid full backup image for the same policy in its
database. For example, this situation can occur if images were expired.
NetBackup for DB2 always initiates a full backup under these conditions, even if
you want to perform an incremental backup.
Note: BLI is not currently supported for DB2 Snapshot backups on Microsoft
Windows clients, the examples in this section use UNIX Bourne shell syntax. Modify
as appropriate if using a different shell.
The following three options describe how to initiate DB2 BLI incremental backups.
Some of these options also contain examples of a policy setup that you use and
how to modify the backup script
The policy only has one db2.conf file, and it is set for stream-based backups.
The backup script sets and exports the appropriate environment variables before
the backup is initiated.
DB2_INCR=0
DB2_CINC=0
DB2_FULL=0
if [ <some_condition> ]; then
DB2_INCR=1
DB2_SCHED="Diff"
elif [ <some_other_condition> ]; then
DB2_CINC=1
DB2_SCHED="Cum"
else
DB2_FULL=1
Using Snapshot Client with NetBackup for DB2 117
About configuring NetBackup for DB2 block-level incremental backups on UNIX
DB2_SCHED="Full"
fi
DB2_POLICY=DB2_Policy
DB2_SCHEDULED=1
/usr/openv/netbackup/bin/bpdb2proxy <options>
# or
/usr/openv/netbackup/bin/bpdbsbdb2 <options>
The policy has three db2.conf files, one for each type of automatic backup schedule.
Using Snapshot Client with NetBackup for DB2 118
About Snapshot Client effects
The backup script copies the correct db2.conf file into place before the backup is
initiated.
if [ <some_condition> ]; then
cp db2.conf.with_diff_sched $DB2_Instance_Home/db2.conf
elif [ <some_other_condition> ]; then
cp db2.conf.with_cum_sched $DB2_Instance_Home /db2.conf
else
cp db2.conf.with_full_sched $DB2_Instance_Home /db2.conf
fi
/usr/openv/netbackup/bin/bpdb2proxy <options>
# or
/usr/openv/netbackup/bin/bpdbsbdb2 <options>
See “Configuring policies for BLI backups with NetBackup for DB2” on page 113.
See “About the types of NetBackup for DB2 BLI backups” on page 114.
See “About configuring the db2.conf for a snapshot policy” on page 104.
Full backup The automatic backup schedule types automatically start the
backups by running the NetBackup for DB2 scripts or templates.
Differential incremental
They also store the snapshot backups.
backup,
Note: For most snapshot types, any automatic backup schedule
Cumulative incremental
(full, cumulative, or differential) results in a full volume snapshot.
backup
BLI is the only snapshot method that can perform an incremental
backup.
Property Description
Application Schedules:
Property Description
Multiple Copies For snapshot backup, configure Multiple copies on the automatic
backup schedule.
All of these methods require a DB2 policy with Snapshot Client configuration.
User-directed backups using To perform a backup from the Backup, Archive, and Restore
templates interface, run a template through DB2 Template
Administration (click Actions > Administer Templates >
DB2). You can also create a new template using the DB2
Backup Wizard, and run the template from the Template
Complete screen.
Windows:install_path\NetBackup\bin\bpdb2proxy
-backup -d dbalias -u user -p password
UNIX: /usr/openv/netbackup/bin/bpdb2proxy
-backup -d dbalias -u user -p password
Server-directed backups The following describes the process for configuring policies
for DB2 backups with Snapshot Client.
Restore using the Backup, Use the NetBackup for DB2 Recovery Wizard to select the
Archive, and Restore files you want to restore and the parameters for the restore.
interface (user-directed) If the backup image was created with Snapshot Client
methods, the restore uses Snapshot Client methods.
Restore using the command Use the bpdb2proxy command. You must be the DB2 user
line (user-directed) to use the bpdb2proxy command. When performing a
restore, specify the -restore option with bpdb2proxy.
Note: The backup image you restore with bpdb2proxy
must be from a Snapshot Client method backup, otherwise,
the restore fails.
Windows: install_path\NetBackup\bin\bpdb2proxy
-restore -d dbalias -u user -p password
UNIX: /usr/openv/netbackup/bin/bpdb2proxy
-restore -d dbalias -u user -p password
Restore from a snapshot See “About NetBackup for DB2 restores of volumes and file
backup systems using snapshot rollback” on page 107.
Chapter 6
Troubleshooting
NetBackup for DB2
This chapter includes the following topics:
■ Enabling the debug logs for a NetBackup for DB2 client automatically (Windows)
install_path\NetBackup\logs\README.debug file
UNIX:
/usr/openv/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.
install_path\NetBackup\logs\bpubsdb2
■ bphdb
For any backup that is initiated from an automated schedule on the master
server.
install_path\NetBackup\logs\bphdb
■ bpdbsbdb2
For any template-based backup or restore.
install_path\NetBackup\logs\bpdbsbdb2
■ bpdb2
For any backup or restore of the database and or LOGARCHMETH2=VENDOR
log backups.
install_path\NetBackup\logs\bpdb2
■ bpbkar
For any snapshot backup and or user-exit log backup.
install_path\NetBackup\logs\bpbkar
■ tar
For any snapshot restore and or user-exit log restore.
install_path\NetBackup\logs\tar
2 Verify the user or group that the DB2 process (process that loads bpdb2) has
appropriate permissions to write to the following directories if they exist. If the
following directories do not exist, the directories are created automatically with
the correct permissions.
install_path\NetBackup\logs\user_ops
install_path\NetBackup\logs\user_ops\dbext
install_path\NetBackup\logs\user_ops\dbext\logs
Also verify that the user or group that the DB2 process runs as has appropriate
permissions to write to the log directories in step 1.
Troubleshooting NetBackup for DB2 126
Enabling the debug logs manually (UNIX)
3 On the NetBackup server or servers, create the debug log directories for the
legacy processes that interact with the DB2 agent.
On the master server:
install_path\NetBackup\logs\bprd
install_path\NetBackup\logs\bptm
4 The debug logs for unified processes on the server and the client hosts are
created automatically by NetBackup.
NetBackup writes unified logs to install_path\NetBackup\logs.
For information on how to use logs and reports, see the NetBackup
Troubleshooting Guide.
/usr/openv/netbackup/logs/bpubsdb2
■ bphdb
For any backup that is initiated from an automated schedule on the master
server.
/usr/openv/netbackup/logs/bphdb
■ bpdbsbdb2
For any template-based backup or restore.
/usr/openv/netbackup/logs/bpdbsbdb2
■ bpdb2
For any backup or restore of the database and or LOGARCHMETH2=VENDOR
log backups.
/usr/openv/netbackup/logs/bpdb2
Troubleshooting NetBackup for DB2 127
Enabling the debug logs manually (UNIX)
■ bpbkar
For any snapshot backup and or user-exit log backup.
/usr/openv/netbackup/logs/bpbkar
■ nbtar
For any snapshot restore and or user-exit log restore.
/usr/openv/netbackup/logs/tar
2 Verify the user or group that the DB2 process (process that loads bpdb2) has
appropriate permissions to write to the following directories if they exist. If the
following directories do not exist, the directories are created automatically with
the correct permissions.
/usr/openv/logs/user_ops
/usr/openv/logs/user_ops/dbext
/usr/openv/logs/user_ops/dbext/logs
Also verify that the user or group that the DB2 process runs as has appropriate
permissions to write to the log directories in step 1.
3 On the NetBackup server or servers, create the debug log directories for the
legacy processes that interact with the DB2 agent.
On the master server:
/usr/openv/logs/bprd
/usr/openv/logs/bptm
4 The debug logs for unified processes on the server and the client hosts are
created automatically by NetBackup.
NetBackup writes unified logs to /usr/openv/logs.
For information on how to use logs and reports, see the NetBackup
Troubleshooting Guide.
Troubleshooting NetBackup for DB2 128
Enabling the debug logs manually (UNIX)
/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/bpdb2
chmod 777 /usr/openv/netbackup/logs/bpdb2
For example:
cd /usr/openv/netbackup/logs
mkdir bphdb
2 The user_ops, each of the log directories, and any subdirectories should have
777 permissions. They must exist and be accessible for the applications to
operate correctly.
For example:
See “About permissions for NetBackup for DB2 log files (UNIX)” on page 24.
3 Enable logging for the nbpem, nbjm, and nbrb scheduling processes that use
unified logging.
NetBackup writes unified logs to /usr/openv/logs.
You do not need to create log directories for processes that use unified logging.
Information on how to use logs and reports is available.
See the NetBackup Troubleshooting Guide.
Troubleshooting NetBackup for DB2 129
About the NetBackup for DB2 log files
Unless it is redirected elsewhere, NetBackup writes DB2 script errors to this file.
■ mmddyy.log
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.
Unless it is redirected elsewhere, NetBackup writes DB2 script errors to this file.
■ log.mmddyy
This log contains debugging information for the bphdb process. bphdb is the
NetBackup database backup binary. It is invoked when an automatic backup
Troubleshooting NetBackup for DB2 130
Setting the debug level on a Windows client
schedule is run. NetBackup for DB2 uses this client process for DB2 script
execution.
This log contains debugging information and execution status for the NetBackup
for DB2 client process.
log.mmddyy
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.
The information 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 131
Setting the debug level on a UNIX client
VERBOSE = X
the following procedure to minimize session timeouts and to allow the restores to
complete successfully.
To minimize timeout failures on large database restores
1 In the NetBackup Administration Console, expand NetBackup Management
> Host Properties > Clients.
2 Double-click the client.
3 Select the Timeouts properties.
4 Set the Client read timeout property to a large value.
The default for the Client read timeout setting is 300 seconds (5 minutes).
For database agent clients, increase the value significantly from the
recommended value.
See the NetBackup Administrator’s Guide, Volume 1.
For example, change this setting to 30-60 minutes to minimize timeout errors.
5 Click OK for each client.
Note: This change may delay detecting problems during subsequent backups.
Consider putting the original value back in place once any restore that requires a
change is complete.
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 that the image you want to restore
exists. Make sure that the correct instance is used.
Make sure that the correct values are set in db2.conf. Also, on UNIX
check the values in bp.conf.
If logging is enabled, check the current log file in the following directory
for more information:
Windows: install_path\NetBackup\logs\bpdb2\
UNIX: /usr/openv/netbackup/logs/bpdb2
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:
Windows: install_path\NetBackup\logs\bpdb2\
UNIX: /usr/openv/netbackup/logs/bpdb2
Cause:
Action: Make sure that the file exists and is properly configured.
If logging is enabled, check the current log file in the following directory
for more information:
Windows: install_path\NetBackup\logs\bpdb2\
UNIX: /usr/openv/netbackup/logs/bpdb2
Troubleshooting NetBackup for DB2 135
About the error message codes
Action: Make sure that the action parameters are used properly.
Cause: NetBackup server and the NetBackup for DB2 shared library
(UNIX) DB2 DLL (Windows) or are not at the same level.
Action: Make sure that the NetBackup and the NetBackup for DB2 shared
library (UNIX) or the DB2 DLL (Windows) are at the same level. Check
the log file in the following directory:
Windows: install_path\NetBackup\logs\
UNIX: /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.
Action: Make sure that the directory is accessible with read and write
permissions. Make sure that the file exists and has read permission.
Windows: install_path\NetBackup\dbext\db2.conf
UNIX: $HOME/db2.conf
Windows: install_path\NetBackup\dbext\db2.conf
UNIX: $HOME/db2.conf
Windows: install_path\NetBackup\dbext\db2.conf
UNIX: $HOME/db2.conf
Windows: install_path\NetBackup\dbext\db2.conf
UNIX: $HOME/db2.conf
Windows: install_path\NetBackup\dbext\db2.conf
UNIX: $HOME/db2.conf
Windows: install_path\NetBackup\dbext\db2.conf
UNIX: $HOME/db2.conf
Windows: install_path\NetBackup\dbext\db2.conf
UNIX: $HOME/db2.conf
Windows: install_path\NetBackup\dbext\db2.conf
UNIX: $HOME/db2.conf
430 Message: ERR - ARCDIR field needs to be specified in the db2.conf file.
Windows: install_path\NetBackup\dbext\db2.conf
UNIX: $HOME/db2.conf
435 Message: ERR - RETDIR field needs to contain a valid file when
OBJECTTYPE is equal to ARCHIVE: string.
Windows: install_path\NetBackup\dbext\db2.conf
UNIX: $HOME/db2.conf
Windows: install_path\NetBackup\dbext\db2.conf
UNIX: $HOME/db2.conf
Windows: install_path\NetBackup\dbext\db2.conf
UNIX: $HOME/db2.conf
Windows: install_path\NetBackup\dbext\db2.conf
UNIX: $HOME/db2.conf
505 Message: The input parameters supplied by DB2 are not valid.
Cause: This error can occur when you use an unsupported version of
DB2.
Action: Check that the NetBackup client and server settings are configured.
Also verify that the db2.conf file exists and that it is configured.
■ 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 user exit 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. It also enables on-demand recovery of log files
by DB2.
Using NetBackup for DB2 with SAP® 146
Backup and restore of DB2 databases used by SAP
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.
■ On Windows:
C:\Program Files\Veritas\NetBackup\bin>nbsetconfig
nbsetconfig> DB_SCRIPT_PATH=c:\db_scripts
nbsetconfig> DB_SCRIPT_PATH=e:\oracle\fullbackup\full_rman.sh
nbsetconfig>
<ctrl-Z>
Note: Review the NetBackup Command Reference Guide for options, such
as reading from a text file and remotely setting clients from a NetBackup server
using bpsetconfig. If you have a text file with the script location or authorized
locations listed, nbsetconfig or bpsetconfig can read from that text file. An
entry of DB_SCRIPT_PATH=none does not allow any script to execute on a client.
The none entry is useful if an administrator wants to completely lock down a
server from executing scripts.
Register authorized locations 149
Registering authorized locations used by a NetBackup database script-based policy
A B
Application Backup schedule backup
environment variables 57 archive log 66
for block level incremental backups 113 automatic 38
overview 36 database 66
with Snapshot Client 100 manual 38, 67
application backup schedule partitions 67
configuring 33 tablespaces 67
overview 33 with Snapshot Client methods 96, 120
retention 34 wizard 60, 120
Approving the auto-discovered mappings in Host Backup Archive and Restore interface 72
Management 38 BACKUP command 12
ARCDIR keyword 53 BACKUP DATABASE command 11, 66, 70
ARCFUNC COPY keyword 48, 53 backup media required 18
ARCFUNC SAVE keyword 47, 53 Backup Selections list
ARCHIVE LOG command 12 adding scripts 32
archive logs adding selections 31
backing up 20, 66 adding templates 31
configuring policies 43 overview 30
keywords for backing up in db2.conf 41 block level incremental backup
overview 14 client-initiated
restoring 81 using environment variables 115
restoring from a raw partition 55 using multiple db2.conf files 117
automatic backup configuring 113
configure scripts 62 initiating 115
create scripts 62 overview 110
overview 67 server-initiated 115
policy 67 bp.conf
using scripts 67 client file 51
automatic backup schedules DB2 script parameters 63
configuring 34 in a cluster 51
Automatic Cumulative Incremental Backup schedule user file 52
overview 37 variables 63
Snapshot Client effects 119 bpdb2proxy command 109, 121
Automatic Differential Incremental Backup schedule bpdbsbdb2
overview 37 command syntax 69
Snapshot Client effects 119 running a backup template 69
Automatic Full Backup schedule 34 running a recovery template 79
overview 37 bpdbsbdb2 command 60
Snapshot Client effects 119 bphdb log
with Snapshot Client 100 UNIX 129
Index 151
R scripts (continued)
raw partitions 81 examples 12, 62
reason codes 133 modifying 63
RECOVER DATABASE command 11 overview 58
Recovery Wizard parameters 63
also see wizard 77 scheduler 67
overview 77 type of operation 62
use with Snapshot Client 120 server-directed backups 121
reports 124 snapshot backup 94, 100, 107
See also debug logs configuration requirements 100
All Log Entries report 131 configure db2.conf 104
All Logs Entries 124 database objects included 100
NetBackup server reports 131 policy configuration 100
restore restore method 106
Point-in-time rollback 107 Snapshot Client
snapshot rollback 107 configuring policies 100
with Snapshot Client methods 107 effects on backups and restores 120
RESTORE DATABASE command 11, 84 effects on policies and schedules 118
restores file-based operations 98
snapshot rollback 109 overview 93
using DB2 80 proxy operations 94
with Snapshot Client methods 96, 110, 121 stream-based operations 97
RETDIR keyword 56 theory of operations 95
retention period snapshot rollback 107, 109
for Snapshot Client 119 SnapVault 107
robust logging 128 SRCALIAS keyword 56
ROLLFORWARD command 12 SRCINST keyword 56
ROLLFORWARD DATABASE command 11, 41–42 Storage Checkpoint 112
stream-based operations 97
S
SAP T
using NetBackup for DB2 with 145 tablespaces
SCHEDULE keyword 56 backup 66–67
schedules templates
adding 32 administration 68
automatic backup 67 administration interface 66
frequency 35 advantages over scripts 31
properties 35 backups
properties for Snapshot Client 119 creating 60
retention for Snapshot Client 119 creating scripts from templates 60
types of schedules 32 overview 10, 58
scripts recovery 77
cautions for using 31, 62 running from Backup Archive and Restore 68
creating 58, 60 running with bpdpsbdb2 69
creating from templates 61 use with Snapshot Client 121
creating manually 62 TERMINATE command 12
errors in executing 62 testing policy configuration 38
example backup scripts 62 timeout failures
example restore scripts 62 minimizing 132
Index 154
transaction logs
see archive logs 113
troubleshooting
false restore failures reported 133
reason codes 133
U
unified logging 126–128
user exit program
archive log backup 20, 41, 66
overview 12, 14
policies needed 21, 43–44
V
variables
environment 56
for scripts 63
VENDOR method for archive logging
db2.conf keywords needed 53
overview 14, 66
policies needed 20
specifying in DB2 20
used with BACKUP DATABASE command 70
Veritas Storage Foundation 113
VxFS_Checkpoint snapshot 107
vxvm snapshot 107
W
Windows interface 23
wizard
backup 12, 58
overview 10
recovery 12, 77
use with Snapshot Client 120