NetBackup811 AdminGuide Oracle
NetBackup811 AdminGuide Oracle
Oracle Administrator's
Guide
Release 8.1.1
Veritas NetBackup™ for Oracle Administrator's Guide
Last updated: 2018-02-16
Legal Notice
Copyright © 2018 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 [email protected]
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:
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
Configuring the Maximum jobs per client for NetBackup for Oracle
..................................................................................... 54
Instance management for an Oracle Intelligent Policy .......................... 55
About the NetBackup Discovery Service ..................................... 56
Viewing the Oracle database instance repository .......................... 57
Manually adding an Oracle database instance to the repository
..................................................................................... 58
Registering an Oracle database instance .................................... 61
About Oracle database instance groups ...................................... 64
Adding an instance to an instance group ..................................... 64
Automatic Registration of an instance group ................................ 65
About instance actions ............................................................ 67
About Oracle Intelligent Policies (OIP) .............................................. 68
Creating an Oracle Intelligent Policy (OIP) ................................... 70
Oracle database upgrade effect on Oracle Intelligent Policies
..................................................................................... 73
Configuring NetBackup for Oracle automatic backup schedules
..................................................................................... 74
About NetBackup for Oracle schedule properties using Oracle
Intelligent Policy ............................................................... 75
Oracle Intelligent Policy - Storage and Retention ........................... 76
About Oracle Intelligent Policy master server behavior ................... 78
Instances and Databases tab .................................................... 78
Backup Selections tab ............................................................. 80
Oracle tab ............................................................................. 83
About using a NetBackup appliance share for Oracle backups
(Copilot) ......................................................................... 86
Configuring an OIP using a share on the NetBackup appliance
(Copilot) ......................................................................... 88
About script- or template-based Oracle policies .................................. 90
Adding a new script- or template-based Oracle policy .................... 91
About policy attributes ............................................................. 92
About backup schedules, templates, and scripts ........................... 93
About schedule properties ....................................................... 93
Script- or template-based policy - Storage and Retention ................ 95
Adding clients to a policy .......................................................... 97
About adding backup selections to an Oracle policy ....................... 98
About configuring the run-time environment ............................... 100
About creating templates and shell scripts ................................. 107
Configuring the logon account for the NetBackup Client Service for
NetBackup for Oracle ............................................................ 116
Testing configuration settings for NetBackup for Oracle ...................... 117
Contents 6
NetBackup for Oracle XML export and XML import ............................ 300
NetBackup for Oracle XML export and import archiving features
.................................................................................... 300
XML export archive process .................................................... 301
Sequence of operation: XML export archive ............................... 303
Contents 11
Network (TCP/IP)
NetBackup software:
– NetBackup master server
– NetBackup media server
Feature Description
Media and device All devices that the Media Manager supports are available to
management NetBackup for Oracle.
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 and NetBackup for Oracle lets you take advantage of NetBackup’s
restores multiplexing capabilities. Multiplexing directs multiple data
streams to one backup device, thereby reducing the time
necessary to complete the operation.
Transparent Oracle and All backups and restores run simultaneously and transparently
regular file system backup without any action from the NetBackup administrator. The
and restore operations database administrator can run database backup and restore
operations through NetBackup. An administrator or any other
authorized user can use NetBackup to run database backups
and restores.
Feature Description
You can create the instance groups that each contain a set of
instances that are registered with a common set of credentials.
A default instance group can be created for the newly
discovered instances that are then automatically registered into
this group.
Sharing the same storage You can share the same devices and media that are used for
units that are used for other other backups or give Oracle exclusive use of certain devices
file backups and media. NetBackup for Oracle can use the Media Manager,
disk, PureDisk storage units, etc.
Centralized and networked From the NetBackup master server, you can schedule database
backup operations backups or start them manually for any client or instance. The
Oracle databases can also reside on the hosts that are different
from the devices on which NetBackup stores the backups.
Introduction 16
NetBackup for Oracle features
Feature Description
Graphical user interfaces NetBackup provides the following graphical user interfaces for
client users and administrators:
Templates The NetBackup for Oracle database wizards can create backup
and recovery templates for script- or template-based Oracle
policies. You can launch the backup wizard and the recovery
wizard from the Backup, Archive, and Restore (BAR) interface.
The wizards generate platform-independent templates
containing the configuration information that the software uses
when it performs backups and restores.
Oracle Guided Recovery Guided Recovery clones an Oracle database from a backup,
cloning and simplifies the process of creating a new database from
backups of an existing database. Guided Recovery uses an
Oracle cloning wizard that executes on the OpsCenter graphical
user interface.
Parallel backup and restore NetBackup for Oracle supports the parallel backup and restore
operations RMAN capabilities. For example, you can run more than one
tape device at a time for a single Oracle backup or restore.
This capability reduces the time necessary to complete the
operation.
Feature Description
Support for Replication Replication director can be used to create snapshots of the
Director Oracle database. The snapshots can then be replicated to other
NetApp disk arrays or backup the snapshot to a storage unit.
To use Replication Director, the Oracle database must exist
on a NetApp NAS disk array. Replication Director is not
supported on SAN storage at this time.
Support on a NetBackup
Note: This feature requires a NetBackup appliance running
appliance for backup to an
software version 2.7.1 or later.
appliance share (Copilot)
This feature enhances the Oracle Intelligent Policy by giving
you options for protecting an Oracle database using a share
on a NetBackup appliance. This feature gives you better control
of backups when an Oracle database backup is placed in a
database share by the DBA. This feature also lets you choose
a database share as the destination for the first backup copy.
The backup copy is a full set of database data file copies
created, incrementally updated, and protected by NetBackup.
You must create a share on the appliance for this option using
the NetBackup Appliance Shell Menu.
Immediate backup for The Oracle DBA can start an immediate backup from the client
Oracle DBA using the nboraadm -immediate command. The Oracle
DBA can start the backup instead of waiting for the backup to
be initiated based on the NetBackup schedule. This command
option is useful if the Oracle DBA wants to perform a backup
before maintenance. The command must be initiated from the
client where the instance resides.
Introduction 18
NetBackup for Oracle terminology
Feature Description
Support for Container and Oracle 12c introduced the container databases (CDB) and
Pluggable databases pluggable databases (PDB). The Oracle Intelligent Policy is
enhanced and allows a backup to include single or multiple
PDBs.
This feature also lets you select one or more Oracle 12c
instances along with non-Oracle 12c instances in OIP.
Term Definition
Full backup A full backup backs up all the blocks into the backup set, skipping only
data file blocks that have never been used. Note that a full backup is
not the same as a whole database backup; "full" is an indicator that the
backup is not incremental.
Term Definition
Multilevel RMAN lets you create multilevel backups. RMAN can create multilevel
incremental incremental backup. A value of 0 or 1 denotes each incremental level.
backup
A level 0 incremental backup, which is the base for subsequent
incremental backups, copies all blocks containing data. You can create
a level 0 database backup as backup sets or image copies.
Differential In a differential level 1 backup, RMAN backs up all blocks that have
incremental changed since the most recent incremental backup at level 1 (cumulative
backup or differential) or level 0. For example, in a differential level 1 backup,
RMAN determines which level 1 backup is the most recent backup.
RMAN backs up all blocks that have been modified after that backup.
If no level 1 is available, then RMAN copies all blocks that have changed
since the base level 0 backup.
repository contains all discovered and manually created Oracle instances that reside
in the NetBackup environment. Instance management lets you add, change, delete,
and register instances with a set of credentials.
See “Instance management for an Oracle Intelligent Policy” on page 55.
To create an Oracle Intelligent Policy, you can use the Policy Configuration Wizard
or the Policies utility. The Policy Configuration Wizard is easier to use because
it guides you through the setup process by automatically choosing the best values
for most configurations. But the wizard does not present all policy configuration
options (for example, calendar-based scheduling). After you create a policy, you
can use the Policies utility to configure the options that are not part of the wizard.
Policy creation includes assigning instances to the policy. The Oracle Intelligent
Policy does not require you to know how RMAN functions or how to use the
templates and scripts. The feature is instance-based and not template-scripting
based.
See “Creating an Oracle Intelligent Policy (OIP)” on page 70.
NetBackup for Oracle includes a library of functions that enable RMAN to use
NetBackup. On UNIX, NetBackup uses the RMAN SBT_LIBRARY parameter to
link the RMAN server software with the media management API library that
NetBackup for Oracle installs. On Windows, the NetBackup for Oracle library is
located in c:\Windows\system32.
See “Installing NetBackup for Oracle” on page 26.
When you back up Oracle database instances, each resultant backup set contains
at least one backup piece from the target database. You must give each backup
piece a unique name. Several substitution variables are available to aid in generating
unique names. The policy utility provides a set of default file name formats for the
backup pieces. NetBackup considers the backup piece name as the file being
backed up, so this name must be unique in the catalog.
To override any of the default file name formats, select Specify backup file name
formats. You can change the formats for the various backup file names for data
files, archived redo logs, the control file, and the Fast Recovery Area (FRA). Ensure
that the format that is specified for all RMAN backup piece names ends with _%t
to guarantee that each backup piece has a unique name in the catalog. NetBackup
uses this timestamp as part of its search criteria for catalog images. Without this
timestamp, performance may degrade as the NetBackup catalog grows.
For a backup, the following items apply:
■ The rman command starts the requested operation on the databases.
■ When the process requires media to store backup data, RMAN issues a backup
request to start a user-directed backup.
Introduction 21
Logging the RMAN input and output on a client
■ The NetBackup media server connects to NetBackup for Oracle on the client.
NetBackup for Oracle on the client sends the database data to the NetBackup
media server which saves the data to secondary storage. A restore operation
works in essentially the same manner except that RMAN issues a restore
request. Then NetBackup retrieves the data from secondary storage and sends
it to NetBackup for Oracle on the client.
■ RMAN supports parallel operations, so that a single rman command can start
more than one backup, or restore on the NetBackup system.
■ The status for an RMAN operation is stored in the RMAN catalog or in the
database control file. This same status appears in the output of the RMAN
command that is used to run the backup or restore. This status is the only status
that a database administrator must check to verify that a backup or restore has
been successful.
■ You can see the RMAN script and RMAN output in the details of the controlling
job (bphdb) in the Activity Monitor.
■ NetBackup also logs status, but only for its own part of the operation. The
database administrator cannot use the NetBackup status to determine whether
rman was successful. Errors can occur in rman that do not affect NetBackup and
are not recorded in its logs.
The directory_name is a directory to which the Oracle user has permission to create
files within the directory.
Introduction 22
NetBackup for Oracle operation using a script- or template-based policy
For information about these commands, see the NetBackup Commands Reference
Guide.
The file name has a specific format that includes the client name, policy name (OIP),
schedule type, date stamp (yyyymmdd), and timestamp (hhmmss). The following
is an example of how the file name looks in the directory:
orac121_backuppolicyname_full_20160201_184157_GMT.log
■ When the process requires media to store backup data, RMAN starts a
user-directed backup by issuing a backup request.
■ The NetBackup media server connects to NetBackup for Oracle on the client.
NetBackup for Oracle on the client sends the database data to the NetBackup
media server which saves the data to secondary storage. A restore operation
works in essentially the same manner except that RMAN issues a restore
request. Then NetBackup retrieves the data from secondary storage and sends
it to NetBackup for Oracle on the client.
■ RMAN supports parallel operations, so a single rman command can start more
than one backup, or restore on the NetBackup system.
■ The status for an RMAN operation is stored in the RMAN catalog or in the
database control file. This same status appears in the output of the RMAN
command that runs the backup or restore. This status is the only status that a
database administrator must check to verify that a backup or restore has been
successful.
■ NetBackup also logs status, but only for its own part of the operation. The
database administrator cannot use the NetBackup status to determine whether
rman was successful. Errors can occur in rman that do not affect NetBackup and
are not recorded in its logs.
Term Definition
backup set A backup set is a backup of one or more data files, control files, SPFILEs,
and archived redo log files. Each backup set consists of one or more binary
files called backup pieces. Backup pieces are written in a proprietary format
that only RMAN can create or restore.
instance An Oracle database instance consists of a System Global Area (SGA) and
the Oracle background processes. When Oracle starts a database, it
allocates an SGA and starts Oracle background processes. The SGA is
de-allocated when the instance shuts down.
Real RAC is an option that allows multiple concurrent instances to share a single
Application physical database.
Clusters (RAC)
RMAN RMAN backs up, restores, and recovers database files. RMAN starts Oracle
database server processes on the target database. These Oracle database
server processes perform the backup and restore. RMAN performs backup
and recovery procedures, and it greatly simplifies the tasks that
administrators perform during these processes.
However, RMAN cannot directly manage the storage devices and media
that are used in its backups. So it must be integrated with an application
that has these capabilities. NetBackup for Oracle provides device and media
management capabilities by integrating RMAN with NetBackup and its
media management software. Also, RMAN can access NetBackup’s
automatic scheduling facilities and its graphical interfaces.
RMAN An RMAN recovery catalog or the database control file is a repository for
repository the information that RMAN uses and maintains. RMAN uses this information
to determine how to run requested backup and restore actions.
Term Definition
RMAN script The RMAN script specifies the commands for RMAN to perform (for
example, backups and restores). For information on RMAN commands and
script files, see your Oracle documentation.
Windows:
install_path\NetBackup\dbext\Oracle\samples\rman
UNIX:
/usr/openv/netbackup/ext/db_ext/oracle/samples/rman
These example scripts run RMAN commands and are fully commented to
explain the features that are used. You can review these examples and use
them as a starting point for developing backup, restore, and recovery scripts.
Note: The Oracle database agent is installed as part of the NetBackup client
installation.
■ Click Instances to display the list of instances. The list includes the names
of instances that you have added and the instances that the Oracle
Discovery Service has discovered. The following is an example of the screen
that appears:
■ Click Instance Groups to create an instance group to which you can then
add instances with the same credentials.
Procedures are available about how to create an instance group.
See “Creating an Oracle database instance group” on page 29.
3 Select one or more instances on the instance list. Use the Ctrl and Shift keys
as needed to select multiple instances.
4 Select Actions > Register. The following Register Instance panel appears.
6 The credentials are validated and a Validation Report dialog shows the results.
You can save the credentials even if the validation fails. Click OK to display
the Instances list again.
7 Verify that the Instances list shows the date-time when you registered the
instance. The instance is now available to select for an Oracle Intelligent Policy.
8 Repeat for all other instances that you want registered individually or as part
of an instance group.
3 Enter the Instance Group Name in the text window, then fill in the appropriate
credentials, and click OK.
The newly created instance group name appears in the right pane.
Click Help for help entering the appropriate credentials. If necessary, contact
the Oracle database administrator for the correct set of credentials.
4 To assign individual instances to this instance group, click Instances in the
left pane to display the list of instances.
NetBackup for Oracle QuickStart 31
Creating an Oracle database instance group
5 Right-click the desired instance and select Register to display the following
Register Instance panel. You can use the Ctrl and Shift keys to select multiple
instances for registering.
7 Make sure Add to group and register using group crendentials is selected.
Use the Instance Group pulldown menu to select the instance group that you
want the instance to be added to, then click OK.
NetBackup for Oracle QuickStart 32
Creating an Oracle policy
8 Repeat for each instance that you want included in the instance group.
9 You may want to make this instance group the default for all newly discovered
instances. If so, all newly discovered instances are automatically added to this
instance group. More information is available about auto-registering an instance
group.
See “Automatic Registration of an instance group” on page 65.
3 Type a unique name for the new policy in the Add a New Policy dialog box.
If necessary, clear the Use Policy Configuration Wizard check box, then
click OK.
The Attributes tab of the Add New Policy dialog box appears along with the
following set of tabs across the top of the panel:
4 In the Policy Type pulldown menu, select Oracle. This action causes the tabs
across the top of the panel to change to the following:
5 The Add New Policy panels contain some default conditions and some
parameters that you must specify. The default values are the best values for
most configurations. However, you may need to customize the parameter
settings on one or more of the tabs.
The dialog contains the following set of tabbed pages:
■ Attributes tab. Default values are automatically selected on the Attributes
tab. More information is available about these attributes.
See the NetBackup Administrator’s Guide, Volume I.
■ Schedules tab. More information is available about this tab.
See the NetBackup Administrator’s Guide, Volume I.
■ Instances and Databases tab. On this page, select the instances and
instance groups that you want backed up for the policy. An Oracle Intelligent
Policy (OIP) must include either the Protect Instances and Databases or
NetBackup for Oracle QuickStart 34
Creating an Oracle policy
6 To protect the newly discovered instances, you may have to create the instance
group first, then set up a policy for the default instance group.
See “Automatic Registration of an instance group” on page 65.
7 (Optional) Create bpstart_notify and bpend_notify scripts for an Oracle
Intelligent Policy (OIP).
For an OIP, the scripts must include the .policyname or
.policyname.schedule suffix or the script does not run at the start or end of
the policy. An OIP ignores the generic bpstart_notify and bpend_notify
scripts and they do not work for a non-OIP.
The generic bpstart_notify or bpend_notify scripts reside on the server
and the location varies by platform:
■ UNIX: /usr/openv/netbackup/bin/goodies/
■ Windows: Install_path/NetBackup/bin/goodies/
The renamed script must be copied from the server and placed in the
NetBackup bin directory on the client:
■ UNIX: /usr/openv/netbackup/bin/
■ Windows: Install_path\NetBackup\bin\
Examples of renamed scripts:
■ UNIX: /usr/openv/netbackup/bin/bpstart_notify.oip_instance1 or
/usr/openv/netbackup/bin/bpend_notify.oip_instance2.full
■ Windows:
install_path\NetBackup\bin\bpstart_notify.oip_instance1.bat or
install_path\NetBackup\bin\bpend_notify.oip_instance2.full.bat
cd $ORACLE_HOME/lib
2 Type the following ls command to determine whether the Oracle library exists:
ls -l libobk.*
Installing NetBackup for Oracle 40
About linking Oracle RMAN with NetBackup for UNIX
mv libobk.a libobk.a.orig
ln -s /usr/openv/netbackup/bin/libobk.a64 libobk.a
5 If you run into problems and cannot re-link Oracle with the NetBackup API
library, you can rollback what you have done. Enter the following:
cd $ORACLE_HOME/lib64
mv libobk.so.orig libobk.so
cd $ORACLE_HOME/lib
2 Type the following ls command to determine whether the Oracle library exists:
ls -l libobk.so
mv libobk.so libobk.so.orig
Installing NetBackup for Oracle 41
About linking Oracle RMAN with NetBackup for UNIX
ln -s /usr/openv/netbackup/bin/libobk.so libobk.so
5 If you run into problems and cannot re-link Oracle with the NetBackup API
library, you can rollback what you have done. Enter the following:
cd $ORACLE_HOME/lib64
mv libobk.so.orig libobk.so
cd $ORACLE_HOME/lib
2 Type the following ls command to determine whether the Oracle library exists:
ls -l libobk.so
mv libobk.so libobk.so.orig
ln -s /usr/openv/netbackup/bin/libobk.so64 libobk.so
5 If you run into problems and cannot re-link Oracle with the NetBackup API
library, you can rollback what you have done. Enter the following:
cd $ORACLE_HOME/lib64
mv libobk.so.orig libobk.so
Installing NetBackup for Oracle 42
About linking Oracle RMAN with NetBackup for UNIX
cd $ORACLE_HOME/lib
2 Type the following ls command to determine whether the Oracle library exists:
ls -l libobk.so
mv libobk.so libobk.so.orig
ln -s /usr/openv/netbackup/bin/libobk.so libobk.so
5 If you run into problems and cannot re-link Oracle with the NetBackup API
library, you can rollback what you have done. Enter the following:
cd $ORACLE_HOME/lib64
mv libobk.so.orig libobk.so
cd $ORACLE_HOME/lib
2 Type the following ls command to determine whether the Oracle library exists:
ls -l libobk.so
Installing NetBackup for Oracle 43
About linking Oracle RMAN with NetBackup for UNIX
3 Use the mv command to move the Oracle library to an alternate location. Perform
this step if the output from step 2 shows that libobk.so is present.
For example:
mv libobk.so libobk.so.orig
ln -s /usr/openv/netbackup/bin/libobk.so.1 libobk.so
5 If you run into problems and cannot re-link Oracle with the NetBackup API
library, you can rollback what you have done. Enter the following:
cd $ORACLE_HOME/lib64
mv libobk.so.orig libobk.so
cd $ORACLE_HOME/lib
2 Type the following ls command to determine whether the Oracle library exists:
ls -l libobk.so
mv libobk.so libobk.so.orig
Installing NetBackup for Oracle 44
About linking Oracle RMAN with NetBackup for UNIX
ln -s /usr/openv/netbackup/bin/libobk.so64.1 libobk.so
5 If you run into problems and cannot re-link Oracle with the NetBackup API
library, you can rollback what you have done. Enter the following:
cd $ORACLE_HOME/lib64
mv libobk.so.orig libobk.so
Chapter 4
Oracle policy configuration
This chapter includes the following topics:
■ Configuring the logon account for the NetBackup Client Service for NetBackup
for Oracle
You need to review permissions on the user_ops folder and subfolders. By default,
these folders are writeable by all users. If restrictive settings have been configured,
ensure that full access is granted for any standard Windows user account that is
used. Otherwise, backup and restore operations can fail.
For more information about how restrictive settings can cause issues during backups,
restores, or troubleshooting, refer to the following article:
Oracle policy configuration 48
Preparing for NetBackup for Oracle configuration
http://www.veritas.com/docs/TECH52446
Full Backup – Script-based Stream-based backup: The specified script in the Backup
policy Selections tab is executed. If the script is set up properly,
RMAN initiates a full stream based backup (full or incremental
level 0).
Note: The Application Backup schedule properties (For
example: storage and retention) are used.
Full Backup – Template Stream-based backup: The specified template in the Backup
based policy Selections tab is executed. Dynamically generates an RMAN
script that initiates an incremental level 0 backup.
Note: The Application Backup schedule properties (I.E.
storage, retention, etc.) are used.
Archived redo log backup – The policy dynamically generates an RMAN script on each
OIP Policy Only client for the instance(s) and or instance group(s) defined in
the Instances and Databases tab. The policy initiates a
stream-based archive redo log backup.
Note: The frequency is granular down to intervals of minutes.
Configuring the Maximum jobs per client for NetBackup for Oracle
The following procedure shows how to set the Maximum jobs per client attribute.
To configure the maximum jobs per client
1 In the left pane of the NetBackup Administration Console, expand NetBackup
Management > Host Properties.
2 Select Master Server.
3 In the right pane, double-click the server icon.
Oracle policy configuration 55
Instance management for an Oracle Intelligent 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.
For Oracle backups and restores, the number of jobs is difficult to determine. This
difficulty exists because Oracle internally determines when and how many streams
to run in parallel to optimize performance.
Note: Enter a large enough value for the Maximum jobs per client attribute to
meet the number of jobs that Oracle runs. You may need to experiment with different
values at your site.
DBAs can run nboraadm on a NetBackup client if the backup administrator enables
access to nboraadm by running the following command on the master server:
You can click on one of the instances to select it for an operation. You can also
select multiple instances for an operation with the following exceptions:
■ You can select only one instance at a time to view properties.
■ You can register multiple instances simultaneously only if the OS type is the
same (UNIX or Windows).
The instances are listed with the following column information:
OS Type Specifies the operating system of the host. Valid values are
Windows and UNIX.
ORACLE_HOME The file path of the Oracle home directory where the instance
resides.
Instance Group Specifies the Oracle database instance group name that this
instance is part of. This field is blank if the instance does not belong
to an instance group.
Registered Specifies the date and time when a user registered a set of
credentials for this instance. This field is blank if the instance has
not been given credentials.
Policies The names of the policies that the instance has been assigned to.
Note: If necessary, contact the Oracle database administrator for the correct set
of credentials. The DBA can also manually add the instance if the DBA is not willing
or allowed to share the credentials with the backup administrator. The DBA can
manually add the instance using the nboraadm command on the client. The Oracle
database user is required to have a certain level of credentials. The Oracle database
user must have SYSBACKUP or SYSDBA privileges (based on version of Oracle).
Oracle policy configuration 59
Instance management for an Oracle Intelligent Policy
■ If the host name is correct but you cannot connect to the host because the
host is down, the following message appears:
The validation operation timed out waiting for a respond from
the client (46)
The error message includes the generated status code which appears in
parentheses at the end of the message. The following is an example of an
error pop-up window:
Click OK to save the credentials, or you can click Cancel and re-enter the
credentials. If you save the credentials that caused the error, the instance is
saved in the repository. You can edit the instance at a later time to correct the
validation issue.
Click OK in the Change Instance dialog box.
You have added the instance to the repository and registered the instance with
credentials.
3 Double-click the instance that you want to register. The Edit Instance dialog
box appears. For example, you can select ORAC13 to display the following:
5 In the Credential area, click Edit to display the Register Instance dialog box.
For example:
5 On the Instance Group pulldown menu, select the desired instance group
(InstanceGroup1 in the example).
6 Click OK. A Validation Report dialog box appears that describes the validation
successes and failures.
See “About Oracle database instance groups” on page 64.
See “Creating an Oracle database instance group” on page 29.
See “Instance management for an Oracle Intelligent Policy” on page 55.
Action Description
New instance To create a new instance, select Actions > New > Instance. A New Instance dialog
box appears. Enter the instance properties (instance name, host, ORACLE_HOME,
and credentials).
See “Manually adding an Oracle database instance to the repository” on page 58.
New Instance Group To create a new instance group, select Actions > New > Instance Group. A New
Instance Group dialog box appears.
Properties To display instance or instance group properties, highlight the desired item. Then select
Actions > Properties. The Edit Instance appears where you change the instance
properties (instance name, host, ORACLE_HOME, override default TNS_admin path,
and credentials).
Oracle policy configuration 68
About Oracle Intelligent Policies (OIP)
Action Description
Register To register an instance, highlight the instance, then select Actions > Register. The
Register Instance dialog box appears. Change credentials for the selected item.
Delete To delete an instance or an instance group from the instances repository list, highlight
the item to be deleted, then select Actions > Delete.
You cannot delete an instance or an instance group that is part of a policy. First, use
the Instances and Databases tab to delete the instance from the policy. Then, in the
instances repository list, highlight the instance to be deleted, then select Actions >
Delete.
Auto Registration To automatically register newly discovered instances as part of an instance group,
highlight Instances in the left pane, then select Actions > Auto Registration.
Clean up instances This option lets you configure NetBackup to automatically clear orphaned instances
from instance management. Orphaned instances are the databases that were
discovered at one time but were never registered.
To enable instance cleanup, select Clean up After. Next, select how often (days) that
you want NetBackup to perform instance cleanup.
Note: If instance cleanup is enabled and auto registration activated, cleaned up
instances may be rediscovered and added to the auto registration group.
■ All instances that you want backed up must be registered with credentials. If
multiple instances share the same credentials, you can create an instance group
for the set of instances with common credentials.
■ Multiple instance groups can be created for different sets of instances with
different credentials. You can create a default instance group for newly
discovered instances to be automatically added to the group, ensuring that new
instances are protected.
■ The database administrator can control all instances and instance group
credentials using the nboraadm command on the NetBackup client, which
provides improved security throughout the system.
■ You are not required to know RMAN or to write and use templates and RMAN
scripts. Instead, this feature automatically generates the scripts at run-time.
■ The Job Details in the Activity Monitor lets you view the backup summary,
database state, RMAN input, and RMAN output for the OIP. Also, the Activity
Monitor includes a new Instances column that shows the instance that the
associated policy has backed up.
■ Enhanced error codes enable faster identification, troubleshooting, and correction
of problems. You can easily restart a failed job.
■ You no longer need to create an application backup schedule. You only need
to create automatic backup schedules for the data movement, which simplifies
how retention works on the backup pieces.
■ You can manually back up any number of instances or all the instances.
■ The OIP automatically selects parameter settings at run-time that enable optimal
deduplication.
■ You can create a new archived log schedule that backs up the archived redo
logs within intervals of minutes.
■ The Oracle Intelligent Policy can protect an Oracle database when the Oracle
DBA places database backups in the share on a NetBackup appliance.
■ The OIP can create and maintain a full set of data file copies in the share on a
NetBackup appliance. The Accelerator option is used to update the data file
copies using only the changed blocks since the last full backup.
■ Oracle 12c has introduced container databases (CDB) and pluggable databases
(PDB) and they can be protected using the OIP.
■ You can create bpstart_notify and bpend_notify scripts for an OIP. An OIP
ignores the generic bpstart_notify and bpend_notify scripts and they do
not work for a non-OIP.
Oracle policy configuration 70
About Oracle Intelligent Policies (OIP)
Oracle DBAs can use the nboraadm command on the NetBackup client to manage
instances, instance groups, and their credentials. This command is particularly
useful in environments where the Oracle credentials are known only by the DBAs
and not the NetBackup administrators.
The Oracle DBA can use the nboraadm command to start an immediate backup
from the client if the NetBackup administrator has given the Oracle DBA proper
permissions. The nboraadm command allows the Oracle DBA to immediately protect
an Oracle database backup instead of waiting for the NetBackup schedule to protect
the database backup. Use nboraadm command with the –immediate option to start
a database backup.
You can select Oracle database instances and instance groups to be part of an
Oracle backup policy. An Oracle backup policy can be created for the default
instance group to ensure that all newly created instances are automatically protected.
You can create an OIP in the following ways:
■ The Policy Configuration Wizard of the NetBackup Administration Console: The
wizard guides you through the setup process by automatically choosing the best
values for most configurations.
■ The Oracle Policy utility on the NetBackup Administration Console: The Oracle
Policy utility is a set of five tabbed panels. The panels contain all the settings
and parameters that are needed to create or change an OIP.
See “Creating an Oracle Intelligent Policy (OIP)” on page 70.
See “About policy attributes” on page 92.
See “Instances and Databases tab” on page 78.
See “Backup Selections tab” on page 80.
See “About using Templates and Oracle Intelligent Policy (OIP) with RAC”
on page 242.
Step 2 (Conditional) Instance groups are for instances with common credentials.
Create Oracle Add an instance to a group to register that instance. This
instance group. step is not required to create an OIP.
Step 3 Add new policy In the left pane of the NetBackup Administration Console,
and policy name. expand NetBackup Management > Policies.
Step 4 Configure the In the Policy Type pull-down menu, select Oracle. This
Attributes tab. action causes the tabs along the top of the display to change
to a unique Oracle tab set.
Step 5 Configure the The schedules that are defined on the Schedules tab
Schedules tab. determine when backups occur for an OIP.
Step 6 Configure the Select the instances or the instance groups that the OIP will
Instances and back up. An OIP must include either the Protect Instances
Databases tab. and Databases or the Protect instance groups option.
Step 7 Configure the You can backup the Whole database, Partial database -
Backup Tablespaces, Partial database - Datafiles, Fast Recovery
Selections tab. Area (FRA), Database Backup Shares, or the Whole
Database - Datafile Copy Share.
Step 8 Configure the The tab contains setup options for databases, tablespaces,
Oracle tab. data files, archived redo logs, file name formats, and database
backup shares.
See “Oracle tab” on page 83.
Oracle policy configuration 73
About Oracle Intelligent Policies (OIP)
■ UNIX: /usr/openv/netbackup/bin/goodies/
■ Windows: Install_path/NetBackup/bin/goodies/
The renamed script must be copied from the server and
placed in the NetBackup bin directory on the client:
■ UNIX: /usr/openv/netbackup/bin/
■ Windows: Install_path\NetBackup\bin\
Examples of renamed scripts:
■ UNIX:
/usr/openv/netbackup/bin/bpstart_notify.oip_instance1
or
/usr/openv/netbackup/bin/bpend_notify.oip_instance2.full
■ Windows:
install_path\NetBackup\bin\bpstart_notify.oip_instance1.bat
or
install_path\NetBackup\bin\bpend_notify.oip_instance2.full.bat
When the discovery service (nbdisco) polls the clients again, it discovers the
database as a new instance. Consequently, there is no way to associate the new
instance to the old instance.
This issue is not version-specific and can affect any valid Oracle upgrade patch,
such as:
■ Oracle 10 to version 11
■ Oracle 10 to version 12
■ Oracle 11 to version 12
For more information on valid Oracle upgrade paths, review the following
documentation on the Oracle Support website:
http://www.oracle.com/technetwork/database/upgrade/
upgrading-oracle-database-wp-12c-1896123.pdf
Therefore, when an existing Oracle database is upgraded and the ORACLE_HOME,
ORACLE_SID, or Oracle User are modified, remove the existing instance in the
instance repository. After the existing instance is removed, update the instance
repository with the new instance information. Make sure to update any policies with
the newly-discovered instances.
See “About Oracle Intelligent Policies (OIP)” on page 68.
See “Instance management for an Oracle Intelligent Policy” on page 55.
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 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 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
This setting is used only for scheduled backups. It is not used for user-directed backups.
The Calendar option lets you schedule the backup operations that are based on specific
dates, recurring week days, or recurring days of the month.
Oracle policy configuration 76
About Oracle Intelligent Policies (OIP)
Property Description
Retention Specifies a retention period to keep backup copies of files before they are deleted. The
retention period for an automatic schedule controls how long NetBackup keeps records of
when scheduled backups occurred. Set the time period to retain at least two full backups
of your database. In this way, if one full backup is lost, you have another full backup to
restore.
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 at
least 2 weeks. 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.
Oracle is not notified when NetBackup expires a backup image. Use Oracle RMAN
repository maintenance commands to periodically delete expired backup sets from the
Oracle RMAN repository.
■ 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.
Accelerator forced This option instructs NetBackup to re-copy all the data files to the share. This option is only
rescan available when Whole Database - Datafile Copy Share is selected in the Backup
Selections tab and the Use Accelerator option is selected in the Attributes tab.
This option forces the creation of a new set of database data file copies. When this option
is not selected, the data file copies in the share are updated using an incremental backup.
The incremental backup contains only the changed blocks since the last full backup.
Property Description
Policy is a snapshot type If the policy is a snapshot type, the following are the possible scenarios of the retention
behavior:
■ If the schedule does not override the policy storage unit, and the policy storage unit
is a non-snapshot SLP, the SLP determines the retention period and the policy
uses the policy storage unit.
■ If the schedule does not override the policy storage unit and the policy storage unit
is not an SLP, the schedule determines the retention period, and the policy uses
the policy storage unit.
■ If the schedule does override the policy storage unit with an SLP, and it is not a
snapshot SLP, the override storage unit takes precedence over the policy storage
unit, and the SLP determines the retention period.
■ If the schedule overrides the policy storage unit with a snapshot SLP, the policy
storage unit must be a non-snapshot SLP. The SLP on the policy storage unit
determines the retention period for the streamed data. Also, the SLP on the schedule
determines the retention for the snapshot data.
Policy is not a snapshot If the policy is not a snapshot type, the following are the possible scenarios of the
type retention behavior:
■ If the schedule does not override the policy storage unit and the policy storage unit
is not an SLP, the schedule determines the retention period.
■ If the schedule does not override the policy storage unit and the policy storage unit
is an SLP, the SLP determines the retention period.
■ If the schedule overrides the policy storage unit, and the schedule storage unit is
not an SLP, the schedule determines the retention period.
■ If the schedule overrides the policy storage unit and the schedule storage unit is
an SLP, the SLP determines the retention period.
The following are examples of the Oracle Intelligent Policy storage and retention
behavior for snapshot-based policy types.
The following are examples of the Oracle Intelligent Policy storage and retention
behavior for stream-based policy types.
AdvancedDisk - Schedule
SLP - SLP
If you add a new Oracle policy or change an existing Oracle policy, this tab appears
along the top of the policy configuration dialog.
You cannot mix instances and instance groups in this list. If you select instances
for a policy, then you want to select an instance group, the instances you select
are deleted from the list.
The Instances and Databases tab displays all the instances or instance groups
that the Oracle policy is scheduled to back up. If you add a new Oracle policy or
change an existing Oracle policy, this tab is one of several tabs that appear along
the top of the dialog. Click Instances to display three possible categories of items:
■ Protect Instances and Databases (OIP option). This panel displays all instances
that you have selected to back up for this policy. To add new instances to this
list, click New. A Select Instances panel appears that displays all registered
instances. Click the check box next to the instance or instances that you want
to add to the list. Instances that are already selected and in the list have their
check boxes checked. If an instance does not appear in this panel because it
is unregistered, you can register that instance and add it to the policy later.
The instance selection does not take effect until you click OK.
Table 4-6 describes all the instance fields for the instances in this list.
■ Protect instance groups (OIP option). This panel displays all instance groups
that you have created. To add new instances to this list, click New. A Select
Instance Group panel appears that displays all instance groups that you have
created. All instances that are a part of an instance group at backup time are
backed up. To add an instance group to the list of groups that are displayed on
this panel, click New.
To see what instances are backed up if the policy is run for an instance group,
select the group from the list, then click Preview Instances. A panel appears
that shows a list of all the registered instances in the group to be backed up.
■ Clients for use with scripts or templates (Non-OIP option). This option is not
for use with OIP. If you want to use the client with scripts or templates method
of configuring an Oracle policy instead of the new instance method, select
Clients for use with scripts or templates. If you select this option, the existing
backup selections and instances or instance group are erased. Also, the Options
tab and the Instances and Databases tab are removed, because those options
must now be set in the RMAN script that the user supplies.
Oracle policy configuration 80
About Oracle Intelligent Policies (OIP)
Field Description
Instance Name The selection at the top of the panel determines the listing in the
panel window.
Database Name The name of the selection that is referenced for this policy. The
Backup Selections tab defines what is backed up for the
selections. This column only appears when you select Protect
Instances and Databases. The Database Name can reference:
■ An entire instance
■ Single or multiple PDBs
OS Type Specifies the operating system of the host. Valid values are
Windows and UNIX.
ORACLE_HOME The file path of the Oracle home directory where the instance
resides.
Instance Group Specifies the Oracle database instance group name that this
instance is part of. This field is blank if the instance does not belong
to an instance group.
Registered Specifies the date and time when a user gave the instance a set
of credentials. This field is blank if the instance has not been given
credentials.
■ Whole database
■ Partial database - Tablespaces
■ Partial database - Datafiles
■ Fast Recovery Area - (FRA). This option backs up the contents of the FRA.
For the Oracled atabase instance to be restored and recovered, make sure that
the FRA contains a recoverable image set when it is backed up.
■ Database Backup Shares. This option is used when the Oracle DBA places
database backups in the share on a NetBackup appliance (Copilot).
■ Whole Database - Datafile Copy Share. This option is used to create and
maintain a full set of data file copies in the share on a NetBackup appliance
(Copilot).
By default, the Whole database option is selected and the backup selections contain
the directive WHOLE_DATABASE. If you choose one of the partial options (tablespaces
or data files), you must click the New button to display a new panel. The panel
contains a list of instances from which you can select tablespaces or the data files
that the new policy can back up.
When you back up tablespaces or data files, this selection applies across all the
instances and PDBs that are selected in the policy. If a tablespace is selected for
one instance or PDB, that same tablespace is backed up for all instances and PDBs
in the policy.
If you set up an OIP and that policy contains a CDB with PDBs, the CDB$ROOT is
automatically included in the backup. If the policy contains a PDB that is not found
when a backup is performed, an error appears in the Activity Monitor. The
Administration Console displays a status of either 5421 or 5422.
Oracle policy configuration 82
About Oracle Intelligent Policies (OIP)
Note: When the Backup, Archive, and Restore GUI is used, the CDB$ROOT is
automatically included in a backup of a PDB in a CDB. The CDB$ROOT is also
automatically included in a tablespace or data file backup. Also, a backup can
contain either tablespaces or the data files. A backup cannot contain both of these
options.
Note: The Database Backup Shares and Whole Database - Datafile Copy Share
options can only be configured when the media server is a NetBackup appliance.
This option does not work with any other type of media server.
Oracle policy configuration 83
About Oracle Intelligent Policies (OIP)
Oracle tab
This tab contains options for databases, tablespaces, data files, archived redo logs,
file name formats, and database backup shares.
Field Description
Field Description
Specify maximum Select Specify maximum limits to access several I/O and backup
limits set limits. The following parameters should only have to be modified
on rare occasions. If these values are not changed, the backup
uses the default values defined in RMAN. RMAN default values
usually provide the best performance.
Backup Identifier Backup set identifier: (TAG) specifies a user-specified tag name
Options for a backup set, proxy copy, data file copy, or control file copy.
The tag is applied to the output files that the backup generates.
Field Description
Archived Redo Log Select Include archived redo logs in full and incremental
Options schedules to include the archived redo logs in the full and the
incremental schedule backups.
Specify Specify maximum limits to set custom limits for the archive
redo logs.
User Specified Select Specify backup file name formats to set up formats for
Backup File Name various backup file names for data files, archived redo logs, the
Formats control file, and Fast Recovery Area (FRA).
Ensure that the format that is specified for all RMAN backup piece
names (except for auto-backups of the control file) uses the _%u
and ends with _%t. NetBackup uses this timestamp as part of its
search criteria for catalog images. Without this timestamp,
performance might degrade as the NetBackup catalog grows. These
recommendations help to ensure proper backup, restore, and
crosscheck functionality.
Note: By default OIP uses the following
_d%d_u%u_s%s_p%p_t%t.
Oracle policy configuration 86
About Oracle Intelligent Policies (OIP)
Field Description
Database Backup These options let you set a time when backup sets and backup
Share Options copies (data and control file copies) are automatically deleted from
the appliance share. However, the files are only deleted if they have
been successfully backed up from the share. The two options are
Delete protected backup sets from share after and Delete
protected backup copies from share after. The deletion is based
on the age of the file in the share. The original dump time or the
update time (if an incremental merge is done on the file) determines
the age of the file.
Use the drop downs to set the minutes, hours, days, or weeks.
Note: The Database Backup Shares delete options can only be
configured when the media server is a NetBackup appliance. This
option does not work with any other type of media server. This
feature requires a NetBackup appliance running software version
2.7.1 or later.
Note: This feature requires a NetBackup appliance running software version 2.7.1
or later.
This feature enhances the Oracle Intelligent Policy by giving you two options for
protecting an Oracle database using a share on a NetBackup appliance. The first
option gives you better control of backups when Oracle database backups are
placed in an appliance share by the DBA. The second option lets you choose an
appliance share as the destination for the first backup copy. Now you do not have
to rely on the DBA to create backups in the share. You must provision a share on
the appliance for these options using the NetBackup Appliance Shell Menu.
The Database Backup Shares option provides a share for the DBA on the
NetBackup appliance and is protected using the Oracle Intelligent Policy. The
backup occurs on the appliance as an off-host backup and all data movement
occurs on the appliance and does not affect the Oracle client. Since the OIP protects
the appliance share, the backups are visible when the DBA uses RMAN or Oracle
Enterprise Manager.
Oracle policy configuration 87
About Oracle Intelligent Policies (OIP)
The Whole Database - Datafile Copy Share option enhances the OIP to allow the
NetBackup Administrator to choose an appliance share as the destination for the
first backup copy. When the policy runs the first time, an RMAN script is generated
that creates a full set of Oracle data file copies. The data file copies reside in the
appliance share. The next time that the full schedule runs, the backup is accelerated
if the Use Accelerator option is selected. The RMAN script that is generated
performs an incremental backup and the changed blocks are merged into the data
files. This incremental backup creates an updated full set of Oracle data file copies.
After the new full copy is created in the database backup share, an SLP is used to
make additional copies of the full backup. The first copy is always a remote_vxfs
snapshot. The remote_vxfs snapshot creates a vxfs_checkpoint snapshot of the
share on the NetBackup appliance.
On the Attributes tab, the Use Accelerator feature is automatically selected when
you configure an OIP with Whole Database - Datafile Copy Share selected in the
Backup Selections tab. The first time that the full schedule runs it creates a full
set of data file copies. After the first full schedule, only the changes are backed up
as a backup set and merged with the existing full backup. Basically, an incremental
merge is performed. Oracle’s Block Change Tracking feature should be enabled
for faster incremental backups.
When using Copilot to protect your database, NetBackup does not protect extended
attributes, extent attributes, or Access Control Lists associated with the database’s
data files.
Note: These options are available to you but only configurable when you have a
NetBackup appliance configured as the media server. Create a share on the
appliance using the procedures in the Managing shares section of the Veritas
NetBackup 52xx and 5330 Appliance Administrator’s Guide. If you enter a share
path that is not located on an appliance, nothing is backed up.
Note: The NetBackup appliance media server can only be configured in a pure
IPv4 or dual stack IPv4/IPv6 mode.
Note: This feature requires a NetBackup appliance running software version 2.7.1
or later.
The Database Backup Shares option protects the database backups that an Oracle
DBA creates on a share on the NetBackup appliance.
The Whole Database - Datafile Copy Share option enhances the OIP to allow the
NetBackup Administrator to choose an appliance share as the destination for the
first backup copy. The backup copy is a full set of data file copies that are maintained
by updating only the changed blocks if Use Accelerator is selected.
Use the following procedure to set up a backup policy that protects shares on the
NetBackup appliance.
To configure an OIP using the Database Backup Shares or Whole Database
- Datafile Copy Share options
1 (Database Backup Shares option) The Oracle DBA asks NetBackup
administrator for the appliance share information.
2 The NetBackup administrator uses the NetBackup Appliance Shell Menu to
create a share on the appliance and then sets permissions for the share.
■ For more information about how to set up the share, see Creating a share
from the NetBackup Appliance Shell Menu in the Veritas NetBackup 52xx
and 5330 Appliance Administrator’s Guide
5 (Database Backup Shares option) The Oracle DBA uses RMAN to create a
database backup on the appliance share.
6 Configure an OIP.
Schedules tab On the Schedules tab, click New and select Full
Backup.
Backup Selections tab Select the Database Backup Shares option in the
Backup Selections tab.
Oracle tab Set up the deletion of backup sets and data file copies
in the Oracle tab.
Note: The Database Backup Shares option can only be configured when the
media server is a NetBackup appliance. This option does not work with any other
type of media server.
Note: The NetBackup appliance media server can only be configured in a pure
IPv4 or dual stack IPv4/IPv6 mode.
Oracle policy configuration 90
About script- or template-based Oracle policies
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
On UNIX, NetBackup for Oracle includes a library of functions that enable RMAN
to use NetBackup. You can link to this library
See the instructions for how to link to this library.
See “About linking Oracle RMAN with NetBackup for UNIX” on page 37.
On Windows, NetBackup for Oracle includes a library of functions that enable RMAN
to use NetBackup. This library is in c:\Windows\system32.
When you use the RMAN backup command, each resulting backup set contains
at least one backup piece (data file, data file copy, control file, or archive log) from
the target database. You must give each backup piece a unique name using the
format operand. Several substitution variables are available to aid in generating
unique names. You can specify the format operand in the backup command.
NetBackup considers the backup piece name as the file being backed up, so this
name must be unique in the catalog.
For a backup, the following items apply:
■ The rman command starts the requested operation on the databases.
Oracle policy configuration 91
About script- or template-based Oracle policies
■ When the process requires media to store backup data, RMAN starts a
user-directed backup by issuing a backup request.
■ The NetBackup media server connects to NetBackup for Oracle on the client.
NetBackup for Oracle on the client sends the database data to the NetBackup
media server which saves the data to secondary storage. A restore works in
essentially the same manner except that RMAN issues a restore request. This
request causes NetBackup to retrieve the data from secondary storage and
send it to NetBackup for Oracle on the client.
■ RMAN supports parallel operations, so a single rman command can start more
than one backup, or restore on the NetBackup system.
■ The status for an RMAN operation is stored in the RMAN catalog or in the
database control file. This same status appears in the output of the RMAN
command that is used to run the backup or restore. This status is the only status
that a database administrator must check to verify that a backup or restore has
been successful.
■ NetBackup also logs status, but only for its own part of the operation. The
database administrator cannot use the NetBackup status to determine whether
rman was successful. Errors can occur in rman that do not affect NetBackup and
are not recorded in its logs.
6 Click the Instances and Databases tab and select Clients for use with scripts
or templates.
7 Click Yes on the Backup Policy Management dialog box. The tabs along the
top of the dialog change again to include a Clients tab.
8 Click OK to return to the main screen of the NetBackup Administration
Console. Select View > Refresh to refresh the GUI so that the appropriate
schedule information appears in the Schedules tab.
9 In the right pane, double-click the policy that you have added. Another option
is to right-click on the policy name in the center pane and select Change from
the menu.
10 Complete the entries on the Attributes tab.
See “About policy attributes” on page 92.
11 Add other policy information as follows:
■ Add schedules.
See “Configuring NetBackup for Oracle automatic backup schedules”
on page 74.
■ Add clients. On the Clients tab, click Clients for use with Scripts or
templates option. Then click New to display a list of all possible clients.
Select new clients from this list, then click OK.
See “Adding clients to a policy” on page 97.
■ Add templates or scripts to the backup selections list.
See “About adding backup selections to an Oracle policy” on page 98.
See “Registering authorized locations used by a NetBackup database
script-based policy” on page 339.
12 When you have added all the schedules, clients, and backup selections you
need, click OK.
Table 4-8 Policy attribute descriptions for NetBackup for Oracle policies
Attribute Description
Policy type Determines the types of clients that can be backed up with the policy. For Oracle databases,
select the policy type Oracle.
Limit jobs per policy Sets the maximum number of instances that NetBackup can back up concurrently with this
policy.
Follow NFS This option is available for Oracle policies on UNIX. Select this attribute to back up the files
from NFS-mounted file systems. If this option is not selected, NetBackup cannot perform a
backup of NFS-mounted files.
Keyword phrase For NetBackup for Oracle, the Keyword phrase entry is ignored.
Snapshot Client and This group contains the options that enable backups with Snapshot Client and Replication
Replication Director Director.
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.
Oracle policy configuration 94
About script- or template-based Oracle policies
Property Description
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.
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 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.
Oracle is not notified when NetBackup expires a backup image. Use Oracle RMAN
repository maintenance commands to periodically delete expired backup sets from the
Oracle RMAN repository.
Oracle XML export operations create archives for long-term storage and recovery. Set
the retention level to a period of years or to infinity.
■ 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.
Oracle policy configuration 95
About script- or template-based Oracle policies
Property Description
Policy is a snapshot type If the policy is a snapshot type, the following are the possible scenarios of the retention
behavior:
■ If a schedule has overridden the policy storage, the override storage on the schedule
takes precedence over the policy storage.
■ If the policy storage is a snapshot SLP, the application schedule must override the
policy storage. The storage that is specified on the application schedule may not
be a snapshot SLP.
■ If the storage being used is not an SLP, the schedule determines the retention for
the snapshot data.
■ If you use the policy storage unit as an SLP, the SLP determines the retention for
the snapshot data.
Policy is not a snapshot If the policy is not a snapshot type, the following are the possible scenarios of the
type retention behavior:
■ If the application schedule has overridden the policy storage, the override storage
on the schedule takes precedence over the policy storage.
■ If the storage being used is not an SLP, the retention is derived from the schedule.
■ If the storage being used is an SLP, the retention is derived from the SLP.
Since all data is streamed, the data is processed using the application schedule.
The following are examples of the script- or template-based policy storage and
retention behavior for snapshot-based policy types:
The following are examples of the script- or template-based policy storage and
retention behavior for stream-based policy types:
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
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.
Oracle policy configuration 99
About script- or template-based Oracle policies
Note: Be sure to specify the correct script name in the backup selections list to
prevent an error or a wrong operation.
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
Note: The Server name and Backup policy name that is configured within a backup
template are only used when initiated from the client.
If the backup is initiated from an automatic schedule on the master server the
operation is different. The backup uses the name of the master server and policy
that was used to initiate the template. This operation allows a template to be used
with multiple policies, with different automatic schedules, and even different master
servers.
is by local logon and password (without a TNS alias), the Oracle database server
process is a child of the RMAN program. The Oracle database server process
inherits the environment from RMAN. Because the NetBackup for Oracle agent is
a shared library loaded into the Oracle database server process it too inherits that
environment.
However, if RMAN connects to the database instance by SQL*Net (logon and
password@TNSalias) the Oracle database server process is a child of the SQL*Net
listener service. This SQL*Net listener service was started previously and
independently of RMAN. As a result, the NetBackup for Oracle agent does not
inherit the environment from RMAN. Instead, the agent inherits the environment
from which the listener service was started
To avoid unexpected results, it is recommended to configure RMAN to always use
the send command to pass the desired variables and values to NetBackup explicitly.
Alternatively the RMAN ENV parameter can be used to make the variables and
values available to NetBackup.
Example 1. Use the send command to specify the policy and server to use for a
database backup. As this example shows, specify the variables in the string in the
RMAN script after all channels have been allocated and before the backup
command.
run {
allocate channel t1 type 'SBT_TAPE';
allocate channel t2 type 'SBT_TAPE';
send 'NB_ORA_POLICY=your_policy,NB_ORA_SERV=your_server';
backup (database format 'bk_%U_%t');
release channel t1;
release channel t2;
}
Example 2. Use the parms operand to specify the policy and server to use for a
database backup. The parms operand is set with each allocate channel command
in the shell script.
run {
allocate channel t1 DEVICE TYPE 'SBT_TAPE'
PARMS "SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so,
ENV=(NB_ORA_POLICY=your_policy,NB_ORA_SERV=your_server)";
allocate channel t2 DEVICE TYPE 'SBT_TAPE'
PARMS "SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so,
ENV=(NB_ORA_POLICY=your_policy,NB_ORA_SERV=your_server)";
backup (database format 'bk_%s_%p_%t');
release channel t1;
Oracle policy configuration 103
About script- or template-based Oracle policies
Option Purpose
SEND 'BKUP_IMAGE_PERM=ANY';
Note: The BKUP_IMAGE_PERM option does not affect the
permissions for the physical files that are included in an
RMAN Proxy copy backup. Ensure the physical file owner,
group, and permissions are set correctly before the backup.
http://www.veritas.com/docs/TECH213927
NB_ORA_COPY_NUMBER Specifies which copy of the backup image to use for the
restore.
Option Purpose
NB_ORA_POLICY Specifies the name of the policy to use for the Oracle
backup.
Option Purpose
http://www.veritas.com/docs/TECH227741
NB_ORA_DISK_MEDIA_SERVER Specifies which media server to use when more than one
has access to the image to be restored.
For more information, see the NetBackup System Administrator’s Guide, Volume
I.
Option Purpose
BPBACKUP_POLICY This option specifies the name of the policy to use for
the backup.
For more information, see the NetBackup System Administrator’s Guide, Volume
I.
The following shows example bp.conf entries for an Oracle user:
SERVER=jupiter
CLIENT_READ_TIMEOUT=900
VERBOSE=1
/usr/openv/java/jbpSA &
The NetBackup for Oracle backup wizard does not support all of the RMAN
commands and options that Oracle provides. Write a shell script if a template does
not provide all the functionality you require.
Shell scripts that the user writes must conform to RMAN and operating system shell
syntax. Sample backup and recovery shell scripts are installed on the client with
the NetBackup for Oracle agent. Modify these scripts to meet your individual
requirements.
See “About creating RMAN scripts manually” on page 111.
NetBackup for Oracle also provides a utility, bpdbsbora, that can generate a shell
script from a backup wizard template. A user can create a template with the wizard
and then generate a shell script from the template. The script should be reviewed
to make sure the TARGET_CONNECT_STR has the correct credentials before execution.
See “Creating an RMAN script from a template” on page 111.
To create RMAN templates using the NetBackup for Oracle RMAN template
generation wizard
1 Log on to NetBackup for Oracle client and start the NetBackup Backup, Archive,
and Restore interface.
See “Starting the NetBackup Backup, Archive, and Restore interface”
on page 108.
2 In the Backup, Archive, and Restore interface, expand an Oracle database
instance and select the database object(s) (data files, tablespaces, archived
redo logs) to back up.
When you select the Oracle database instance, you back up the whole database
using RMAN.
3 Choose Actions > Backup.
The NetBackup for Oracle RMAN template generation wizard displays the
following screens for you to enter information about the backup operation you
want to perform:
■ Welcome (UNIX only)
■ Target Database Logon Credentials (SYSDBA only)
■ Recovery Catalog Logon Credentials
■ Archived redo logs
■ Configuration Options
■ Backup Options
■ Database State
■ NetBackup for Oracle Configuration Variables
■ Backup Limits
If you need an explanation of any of the fields on the wizard screens or more
details, click Help on the wizard screen.
4 After you complete the wizard, the Template Summary screen displays the
summary of the backup template:
You can run the template immediately after the wizard finishes, save the
template to the master server, or both. Select Perform backup immediately
and or Save Template then click Finish.
See “About storing templates” on page 115.
See “About using Templates and Oracle Intelligent Policy (OIP) with RAC”
on page 242.
Oracle policy configuration 111
About script- or template-based Oracle policies
Where:
-g script_file Specifies the name of the file to which you want bpdbsbora
to write the script. Enclose script_file in quotation marks if it
contains blanks. This option cannot be used with the -r (run)
option.
-t templ_name.tpl Specifies the name of the template that you want to use as the
basis for the script. Make sure that the template exists.
bpdbsbora retrieves backup templates from a known location
on the master server, so specify only the template file name.
-S server_name Specifies the master server upon which the template resides.
When you specify the bpdbsbora command, it retrieves
backup templates from the specified master server.
Backup type RMAN supports the following different types of backups (In the
examples, n must be 1 or higher):
■ BACKUP FULL
■ BACKUP INCREMNTAL LEVEL 0 (Full backup base for incremental
backups)
■ BACKUP INCREMENTAL LEVEL n (Differential incremental
backup)
■ BACKUP INCREMENTAL LEVEL n CUMULATIVE (Cumulative
incremental backup)
When generating a data file backup set, you can make either an
incremental backup or a full backup. Both a full backup and an
incremental level 0 perform a complete backup of the data file. However,
an incremental level 0 backup can be used as the base for incremental
level n and or incremental level n cumulative backups.
■ Each output file must have a unique name. Use the %U format
specifier to satisfy this restriction. %U is equivalent to %u_%p_%c,
and it guarantees the uniqueness of the backup set name in all
circumstances.
■ Put %t at the end of the backup file name format. NetBackup uses
the timestamp as part of its search criteria for catalog images.
Without this timestamp, performance might degrade as the
NetBackup catalog grows.
■ Ensure that the format that is specified for all RMAN backup piece
names does not contain any space characters.
install_path\NetBackup\dbext\Oracle\samples\rman
Oracle policy configuration 113
About script- or template-based Oracle policies
UNIX:
/usr/openv/netbackup/ext/db_ext/oracle/samples/rman
cold_duplex_cluster_database_backup_full.cmd
cold_cluster_database_backup.cmd
cold_database_backup.cmd
cold_pdb_backup.cmd
cluster_database_restore.cmd
complete_database_restore.cmd
complete_pdb_restore.cmd
hot_database_tablespace_backup_proxy.cmd
hot_pdb_backup.cmd
hot_database_backup.cmd
hot_pdb_tablespace_backup_proxy.cmd
pit_database_restore.cmd
pit_cluster_database_restore.cmd
pit_pdb_restore.cmd
UNIX:
cold_database_backup.sh
cold_pdb_backup.sh
hot_database_backup.sh
hot_database_tablespace_backup_proxy.sh
hot_pdb_backup.sh
hot_pdb_tablespace_backup_proxy.sh
complete_database_restore.sh
complete_pdb_restore.sh
pit_database_restore.sh
pit_pdb_restore.sh
By default, duplex is OFF (a single backup set is produced). If you specify ON, it
produces two identical backup sets.
Note that you must enable the BACKUP_TAPE_IO_SLAVES initialization parameter to
perform duplexed backups. RMAN configures all media as needed for the number
of backup copies you request. For more information on BACKUP_TAPE_IO_SLAVES,
see your Oracle documentation.
Use the send command to specify the policy and schedule to use with each backup.
Because NetBackup uses the policy or schedule to determine what media to use,
this information is required for each copy, or an error occurs.
The command syntax is as follows:
The keywords that are used to specify a policy are CPF1_POLICY, CPF2_POLICY,
CPF3_POLICY, and CPF4_POLICY, which specify the backup policy for duplexed file
1 through duplexed file 4.
The keywords that are used to specify a schedule are CPF1_SCHED, CPF2_SCHED,
CPF3_SCHED, and CPF4_SCHED, which specify the Application Backup schedule for
duplexed file 1 through duplexed file 4.
Note: In a cluster environment, perform the steps on each database node in the
cluster. For an off-host backup, perform the steps on the alternate client.
To configure the logon account for the NetBackup Client Service for
NetBackup for Oracle
1 Open the Windows Services application.
2 Double-click the NetBackup Client Service entry.
3 Click the Log On tab.
4 Type the account name with SYSDBA privileges.
5 Type the password.
6 Click OK.
7 Stop and start the NetBackup Client Service.
8 Close the Services control panel application.
Oracle policy configuration 117
Testing configuration settings for NetBackup for Oracle
■ About restoring from a data file copy to ASM storage using RMAN
can also use the Oracle Enterprise Manager to perform Oracle backup and recovery
operations. The Oracle RMAN command line interface is also used to maintain and
query the RMAN repository.
Register a Before using RMAN with a recovery catalog, register the target database in the recovery catalog.
database with the To register, start and mount the target database but do not open it. At the RMAN prompt, issue
recovery catalog a register database command.
Reset the The reset database command directs RMAN to create a new database incarnation record in
incarnation in the the recovery catalog.
recovery catalog
Performing backups and restores of Oracle 120
Maintaining the RMAN repository
Crosscheck the Because NetBackup can expire images independently from Oracle, the RMAN repository can
information in the contain outdated information. Run an RMAN crosscheck to ensure that data in the recovery
RMAN repository catalog or control file is in sync with data in the backup image catalog. The crosscheck queries
NetBackup for the existence of each backup piece and then marks it as available or expired in
the RMAN repository. Use one of the following commands to check the specified files. You need
to run separate commands to delete images or repository records.
■ The crosscheck backupset command operates on available and expired backup pieces.
RMAN updates their status with the result (available or expired).
■ To crosscheck a database, start RMAN and connect to the target database and to the recovery
catalog (if used). At the rman command prompt, enter the following:
Crosscheck using If files on a Copilot share are deleted outside of RMAN, the subsequent incremental merge
the Copilot share backups that are done to the share fail. An RMAN crosscheck of the share must be done before
the next backup to prevent more failures. This version of the RMAN crosscheck is slightly different
from the other crosscheck examples because of the need to specify type disk instead of type
SBT_TAPE. When running the RMAN crosscheck, the default is the NetBackup_policyname.
However, if the Datafile copy tag is changed in the Oracle tab, then that tag name must be used
in place of NetBackup_policyname. An example of the command syntax follows (using the default
NetBackup_policyname):
Run {
Allocate channel ch00 type 'disk';
crosscheck backup tag <NetBackup_policyname>;
delete noprompt expired backup;
crosscheck copy <NetBackup_policyname>;
delete noprompt expired copy;
release channel ch00;
}
Delete obsolete The DELETE OBSOLETE command deletes the backups that are no longer needed to satisfy
backups specified recoverability requirements. You can delete obsolete pieces according to the configured
default retention policy, or another retention policy that a DELETE OBSOLETE option specifies.
As with other forms of the DELETE command, the deleted files are removed from the backup
media (i.e. expired from NetBackup). Then they are deleted from the recovery catalog, and marked
as DELETED in the control file.
If you specify the DELETE OBSOLETE command with no arguments, then RMAN deletes all the
obsolete backups that the currently configured retention policy defines. For example:
You can also use the REDUNDANCY or RECOVERY WINDOW clauses with DELETE to delete the
backups that are obsolete under a specific retention policy instead of the configured default:
Delete expired The delete expired backupset command operates only on the expired backup pieces that
backups are found in the recovery catalog. RMAN removes them from the recovery catalog and also from
the backup media (i.e. expires them from NetBackup).
To delete expired backup sets of a database from the recovery catalog, start RMAN and connect
to the target and the recovery catalog databases. At the RMAN command prompt, type the
following commands:
The crosscheck and delete backupset commands restrict the list of objects to only those
that are operated on. The restrictions are placed on the specified Oracle device type (disk or SBT
tape), object type (archived logs or database files), and date range.
Resynchronize the RMAN compares the recovery catalog to either the current control file of the target database or
recovery catalog a backup control file. It subsequently updates the catalog with the missing information or changed
information.
If you are running in ARCHIVELOG mode, do the following: Resynchronize the recovery catalog
regularly because the recovery catalog is not updated automatically when a log switch occurs or
when a redo log is archived.
You must also resynchronize the recovery catalog after making any change to the physical
structure of the target database. As with log archive operations, the recovery catalog is not
automatically updated when a physical schema change is made.
The RMAN backup, copy, restore, and switch commands update the recovery catalog
automatically when the target database control file is available. The recovery catalog database
is available when one of these commands is executed.
If the recovery catalog is unavailable when you issue backup or copy commands, you should
resynchronize it manually.
To resynchronize the recovery catalog, start RMAN and issue the resync catalog command.
Performing backups and restores of Oracle 123
Querying the RMAN repository
Change the Periodically, you might need to notify RMAN that the status of a backup set, backup piece, data
availability of a file copy, or archived redo log has changed. The RMAN change command enables you to make
backup set or file a variety of useful record changes.
copy
The change ... uncatalog command removes references to a backup piece, data file copy,
or archive log from the recovery catalog. This command works only with a recovery catalog.
The change ... delete command removes references to a backup piece, data file copy, or
archive log from the control file and recovery catalog. It physically deletes the file. This command
works with or without a recovery catalog.
The change ... crosscheck command removes references to a backup piece, data file
copy, or archive log from the control file and recovery catalog. The references are removed when
that file no longer exists. This command works with or without a recovery catalog.
The change ... unavailable command marks a backup piece, data file copy, or archive
log as unavailable. This command works only with a recovery catalog.
Validate the A restore validation retrieves the backup pieces from storage (NetBackup) and checks that the
restore of backups retrieved pieces are intact. But the restore validation discards the backup pieces without saving
the contents into the database.
Use restore ... validate when you want RMAN to choose the backups to test.
Use validate backupset when you want to specify the backup sets to test.
■ What was the physical schema of the database at some previous point in time?
The list command queries the recovery catalog and control file and produces a
listing of its contents. The primary purpose of the list command is to determine
the backups that are available.
You can list the following information:
■ Backup sets containing a backup of a specified list of data files.
■ Backup sets containing a backup of any data file that is a member of a specified
list of tablespaces.
■ All backup sets or copies of all data files in the database.
■ Backup sets containing a backup of any archive logs with a specified name or
within a specified range.
■ Incarnations of a specified database or of all databases that are known to the
recovery catalog.
For more information on querying the RMAN repository, see your Oracle
documentation.
Automatic backups When the NetBackup scheduler invokes a schedule for an automatic
backup, the NetBackup for Oracle backup templates or shell scripts
run as follows:
Manual backups You can use the NetBackup server software to manually run an
automatic backup schedule for the Oracle policy. For more
information, see the NetBackup Administrator’s Guide, Volume I.
Where:
Performing backups and restores of Oracle 127
About NetBackup for Oracle backups
-t templ_name.tpl Specifies the file name of the template that you want to use.
bpdbsbora retrieves backup templates from a known location
on the master server, so specify only the template file name.
-S server_name Optional. Specifies the master server upon which the templates
reside. When it is specified, the bpdbsbora command retrieves
backup templates from the specified master server.
For example:
install_path\oracle\scripts\db_full_backup.cmd
UNIX:
/oracle/scripts/db_full_backup.sh
The shell starts the database backup by running the Oracle shell script. The Oracle
shell script contains commands to run rman.
The NetBackup installation script installs sample scripts in the following location:
Windows:
install_path\NetBackup\dbext\oracle\samples\rman
UNIX:
/usr/openv/netbackup/ext/db_ext/oracle/samples/rman
Performing backups and restores of Oracle 128
Browsing backups using the bplist command
Running RMAN
As an Oracle user, you can run the rman command from the command prompt with
the RMAN command file as a parameter. This topic describes how to set the master
server to hag and the Oracle policy to obk before you start the backup.
On Windows, RMAN functionality runs as a service, so use the send operand to
set up the run-time environment. To start a backup using the rman command from
the command prompt, type the following:
If you intend to connect to a database using a TNS alias, the RMAN send command
specifies the environment variables. The example sets the master server to hag
and the Oracle policy to obk before you start the backup.
See “About the bp.conf file on UNIX systems” on page 106.
Note: To run script files for database operations other than backups or restores,
Veritas recommends that you run the rman command directly rather than using
NetBackup.
For rman command script syntax and examples, see your Oracle documentation.
# bplist -C jupiter -t 4 -R /
/exb_n2bm5bco_1_1392342936
/exb_mabm02ko_1_1392170136
/exb_lqbltds6_1_1392083334
The -t 4 on this command specifies the Oracle backups. The -R specifies the
default number (999) of directory levels to search.
For more information on the bplist command, see the NetBackup Commands
Reference Guide.
You can also use the RMAN report and list commands to browse Oracle backups.
See “Querying the RMAN repository” on page 123.
4 Expand the Oracle node in the left pane to view an Oracle database instance
hierarchy.
5 Select a node in the left pane to view details in the right pane.
Where:
-t templ_name.tpl Specifies the full-path name of the template file that you want to
use.
For example:
Performing backups and restores of Oracle 134
About NetBackup for Oracle restores
For Windows:
For UNIX:
install_path\oracle\scripts\database_restore.cmd
UNIX:
/oracle/scripts/database_restore.sh
The operating system shell starts the database restore by running the Oracle shell
script file. The Oracle shell script file contains commands to run RMAN.
The NetBackup installation script writes sample scripts to the following location:
Windows:
install_path\Netbackup\dbext\oracle\samples\rman\
UNIX:
/usr/openv/netbackup/ext/db_ext/oracle/samples/rman
Note: Multistream restore only works when using Oracle backup images and is
only accessible using command-line inputs.
ENV parameter can be used to make the variables and values available to
NetBackup. The following are examples of running the multistream restore:
Example 1. Use the SEND command to specify the NB_ORA_PC_STREAMS variable.
RUN {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
SEND 'NB_ORA_PC_STREAMS=<number of restore streams>';
RESTORE DATABASE; RECOVER DATABASE;
RELEASE CHANNEL ch00;
}
RUN {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE'
PARMS "ENV=(NB_ORA_PC_STREAMS= <number of restore streams>)";
RESTORE DATABASE; RECOVER DATABASE;
RELEASE CHANNEL ch00;
}
The user on client A cannot initiate a redirected restore to client B. Only the user
on client B, which is the client receiving the backup image, can initiate the redirected
restore. Any user who belongs to the database group that performed the backup
can restore it, unless the BKUP_IMAGE_PERM variable was set to USER.
Note: If the RMAN catalog database has been lost, restore the catalog database
first before continuing with the redirected restore.
Performing backups and restores of Oracle 138
About NetBackup for Oracle restores
3 On UNIX, check the bp.conf files on the source client. Make sure that the
CLIENT_NAME variable either is not set or is set to the host name of the source
client.
4 Make the init.ora file of the source client available to the destination client.
Copy the file to the destination client or modify the file on the destination client.
Change all location-specific parameters.
5 Create a folder or set the permissions for a directory to restore the data files:
■ On Windows, create and start an Oracle service for the previously set
ORACLE_SID. Create the folder to which you want to restore the data files.
■ On UNIX, grant write permission to the directory to which you want to restore
the data files.
■ The user is connected to the Oracle database using a local connection, not
SQL*Net
■ UNIX user is ora on both camel and giraffe
To perform a redirected restore (example)
1 Create the following file on server lion:
Windows: install_path\NetBackup\db\altnames\giraffe
UNIX: /usr/openv/netbackup/db/altnames/giraffe
Edit giraffe to contain the name camel:
2 Do one of the following:
■ Windows: Use the BAR GUI to set lion as the master server.
■ UNIX: Log onto giraffe as ora. Set SERVER=lion in
$ORACLE_HOME/bp.conf. This server must be the first server that is listed
in the bp.conf file.
3 Modify the network tnsnames.ora file to enable the RMAN catalog connection.
4 Create inittest.ora.file.
5 Windows: Using Oracle administration, create and start ORACLESERVICETEST.
6 Set the environment variable ORACLE_SID to test. On UNIX, also set
NB_ORA_CLIENT to camel.
Performing backups and restores of Oracle 140
Using NetBackup for Oracle in a Microsoft Windows cluster environment
7 Make sure that the destination database directory exists and has appropriate
access permissions.
The data files are restored to the directory path with the same name they had
when they were backed up.
8 Start the database in a nomount state.
On UNIX, the following is the output:
Now apply the archived logs. Type cancel when you decide to stop recovery.
NetBackup for Oracle users in a Microsoft Cluster environment must take some
additional steps to prepare for server-directed backups, user-directed backups, and
user-directed restores.
install_path\NetBackup\dbext\oracle\samples\rman\
To take the database instance offline with Failsafe graphical user interface
1 Select the Oracle database resource in the Failsafe graphical user interface.
2 Choose to bring it offline.
To take the database instance offline with Failsafe command line (FSCMD), type
the following command:
■ fscmd offlineresource salesdb /cluster=curly /offline=immediate
/domain=domainname /user=user /pwd=pwd
normal Shuts down the database and doesn’t allow new connections after
the command was issued. This command waits for the connected
users to disconnect before the database is shut down.
transactional Shuts down the database only after all of the current transactions
have completed.
Because the offlineresource operation shuts down the Oracle database service,
enter the following command to start the Oracle database service:
Note: When performing user-directed backups, make sure that you are on the node
that owns the shared drive where the Oracle database is installed.
Note: When user-directed client restores are performed with different configuration
options of NetBackup failover media servers and a UNIX or Windows master server,
see the NetBackup Administrator’s Guide, Volume I.
Note: The functionality for creating an instant recovery point is not in the GUI. This
feature is command line option only.
Refer to the NetBackup Commands Reference Guide for more usage options using
the nborair command.
To create an instant recovery point
1 Determine if there are any images available for instant recovery by running the
nborair –list_images [-client name] [-server master] command.
The NetBackup administrator or the DBA can run this command from the
NetBackup client or master server.
Example output:
2 List the files that are included in the backup image by running the nborair
–list_files –backupid backup_id command.
The NetBackup administrator or the DBA can run this command from the
NetBackup client or master server. The DBA sees only the files they can access
when this command is run.
Example output:
4 Mount the recovery point on the destination client using the OS tools and with
the required mount options per Oracle documentation.
Example:
mount –t nfs
appl5330:/shares/share1_orachost1.demo.com_1472590277_rp1 /mnt
For Windows, Oracle’s DNFS needs to be configured. The recovery point has
to be exported with the insecure option.
5 (Conditional) On the destination host, verify the mount point is from the backup
ID that was requested by running the nborair –validate –backupid
backup_id -mount_path mount_path command.
The NetBackup administrator or the DBA can run this command on the
destination host.
Example output:
Note: The NetBackup appliance media server can only be configured in a pure
IPv4 or dual stack IPv4/IPv6 mode.
See “Single-step restore to ASM storage from a Copilot recovery point” on page 153.
Performing backups and restores of Oracle 146
Deleting an instant recovery point for Oracle Copilot instant recovery
Note: The functionality for deleting an instant recovery point is not in the GUI. This
feature is command line option only.
Refer to the NetBackup Commands Reference Guide for more usage options using
the nborair command.
To delete an instant recovery point
1 (Conditional) Verify the recovery point is unmounted from the destination client
using the OS tools.
UNIX: umount /mnt
2 List the recovery point on the NetBackup appliance by running the nborair
–list_recovery_points –appliance appliance_name command.
The NetBackup administrator must run this command from the NetBackup
master server.
Example output:
3 Delete the recovery point on the NetBackup appliance by running the nborair
-delete_recovery_point -appliance appliance_name -export_path
export_path command.
The NetBackup administrator must run this command from the NetBackup
master server.
Example output:
Note: The functionality for cleaning up a Copilot share is not in the GUI. This feature
is command line option only.
NLS_DATE_FORMAT=DD-MON-YY_HH24:MI:SS
export NLS_DATE_FORMAT
Windows:
set NLS_DATE_FORMAT=DD-MON-YY_HH24:MI:SS
3 Log into RMAN and if NetBackup uses the RMAN catalog, it is required to log
in to the catalog.
4 Use the RMAN> list incarnation of database; command to find the Reset
Time for the current incarnation.
Example:
Example:
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- ------------------ ------- ------- ---------- ---
10192 B F A DISK 27-APR-17_10:42:59 1 1 NO TAG20170427T104257
10193 B F A DISK 27-APR-17_13:16:37 1 1 NO TAG20170427T131636
10194 B F A DISK 27-APR-17_13:16:55 1 1 NO TAG20170427T131654
10195 B F A DISK 27-APR-17_13:28:52 1 1 NO TAG20170427T132851
10196 B F A DISK 27-APR-17_13:29:08 1 1 NO TAG20170427T132906
10197 B F A DISK 27-APR-17_14:00:31 1 1 NO TAG20170427T140031
10198 B F A DISK 27-APR-17_14:00:43 1 1 NO TAG20170427T140043
10199 B F A DISK 27-APR-17_14:07:31 1 1 NO TAG20170427T140730
10200 B F A DISK 27-APR-17_14:07:48 1 1 NO TAG20170427T140747
10759 B A A DISK 28-APR-17_10:28:46 1 1 NO DCS_CDB
10786 B F A DISK 28-APR-17_10:28:56 1 1 NO DCS_CDB
10814 B F A DISK 28-APR-17_10:29:08 1 1 NO DCS_CDB
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- ------------------ ------- ------- ---------- ---
10759 B A A DISK 28-APR-17_10:28:46 1 1 NO DCS_CDB
10786 B F A DISK 28-APR-17_10:28:56 1 1 NO DCS_CDB
10814 B F A DISK 28-APR-17_10:29:08 1 1 NO DCS_CDB
Performing backups and restores of Oracle 149
Cleaning up the Copilot share after point in time restore of database
7 Use the list backup completed before "to_date()" device type disk
tag ''; command to remove the summary option to see what files need
deleting.
Example:
Example:
Do you really want to delete the above objects (enter YES or NO)? YES
deleted backup piece
backup piece handle=C:\HA_NBA_SHARE\ARCH_D-ORACLEC2_I-3019371157_SCN-2323355_26S2QF5F_DCS_CDB
RECID=50 STAMP=942488751
deleted backup piece
backup piece handle=C:\HA_NBA_SHARE\SPFILE_D-ORACLEC2_I-3019371157_T-20170428_27S2QF5I_DCS_CDB
RECID=51 STAMP=942488754
deleted backup piece
backup piece handle=C:\HA_NBA_SHARE\CF_D-ORACLEC2_I-3019371157_T-20170428_28S2QF5L_DCS_CDB
RECID=52 STAMP=942488758
Deleted 3 objects
Performing backups and restores of Oracle 151
Cleaning up the Copilot share after point in time restore of database
9 Use the list copy completed before "to_date()" tag ''; command to
find the data file copies on the share using the same reset time and tag.
Example:
specification does not match any control file copy in the repository
List of Datafile Copies
=======================
Key File S Completion Time Ckp SCN Ckp Time
------- ---- - ------------------ ---------- ------------------
10649 1 A 28-APR-17_10:25:39 2323417 28-APR-17_10:25:15
Name: C:\HA_NBA_SHARE\DATA_D-ORACLEC2_I-3019371157_TS-SYSTEM_FNO-1_1GS2QE1J_S-48_
I-3019371157_DCS_CDB
Tag: DCS_CDB
10 Use the delete copy completed before "to_date()" tag ''; command
to delete the data file copies on the selected share.
Example:
Do you really want to delete the above objects (enter YES or NO)? YES
deleted datafile copy
datafile copy file name=C:\HA_NBA_SHARE\DATA_D-ORACLEC2_I-3019371157_TS-SYSTEM_FNO-1_1GS2QE1J_
S-48_I-3019371157_DCS_CDB RECID=36 STAMP=942488739
deleted datafile copy
datafile copy file name=C:\HA_NBA_SHARE\DATA_D-ORACLEC2_I-3019371157_TS-SYSTEM_FNO-2_1LS2QEGQ_
S-53_I-3019371157_DCS_CDB RECID=29 STAMP=942488132
deleted datafile copy
datafile copy file name=C:\HA_NBA_SHARE\DATA_D-ORACLEC2_I-3019371157_TS-SYSAUX_FNO-3_1IS2QE8G_
S-50_I-3019371157_DCS_CDB RECID=35 STAMP=942488739
deleted datafile copy
datafile copy file name=C:\HA_NBA_SHARE\DATA_D-ORACLEC2_I-3019371157_TS-SYSAUX_FNO-4_1JS2QEBG_
S-51_I-3019371157_DCS_CDB RECID=27 STAMP=942487999
deleted datafile copy
datafile copy file name=C:\HA_NBA_SHARE\DATA_D-ORACLEC2_I-3019371157_TS-UNDOTBS1_FNO-5_1HS2QE57_
S-49_I-3019371157_DCS_CDB RECID=34 STAMP=942488738
deleted datafile copy
datafile copy file name=C:\HA_NBA_SHARE\DATA_D-ORACLEC2_I-3019371157_TS-USERS_FNO-6_1NS2QEJV_
S-55_I-3019371157_DCS_CDB RECID=33 STAMP=942488737
Deleted 6 objects
Note: The functionality for single-step restore to ASM storage is not in the GUI.
This feature is run with RMAN only.
The procedure example assumes that a recovery point is already mounted and
uses the mount point of /db_mp as the example. All RMAN commands must run
from the target host.
Performing backups and restores of Oracle 154
Single-step restore to ASM storage from a Copilot recovery point
Do you really want to catalog the above files (enter YES or NO)? YES
cataloging files...
cataloging done
2 Restore the datafiles from the point in time of the recovery point.
The following RMAN restore is from disk (DISK). Also, this example uses the
NLS_DATE_FORMAT="DD-MM-YYYY-HH24:MI:SS" command that was set in the
environment before RMAN was run. Use the date format for your environment.
RMAN> run
{
allocate channel ch00 type sbt_Tape;
recover database;
release channel ch00;
}
archived log for thread 1 with sequence 508 is already on disk as file
/db/orac112/app/fast_recovery_area/ORAC112/archivelog/2016_09_29/o1_mf_1_508_cytbkv22_.arc
archived log for thread 1 with sequence 509 is already on disk as file
/db/orac112/app/fast_recovery_area/ORAC112/archivelog/2016_09_29/o1_mf_1_509_cytbkv36_.arc
....
archived log file name=
/db/orac112/app/fast_recovery_area/ORAC112/archivelog/2016_09_29/o1_mf_1_508_cytbkv22_.arc
thread=1 sequence=508
archived log file name=
/db/orac112/app/fast_recovery_area/ORAC112/archivelog/2016_09_29/o1_mf_1_509_cytbkv36_.arc
thread=1 sequence=509
....
media recovery complete, elapsed time: 00:00:55
Finished recover at 2016-10-12:15:55:09
RMAN>
See “Creating an instant recovery point from an Oracle Copilot image” on page 144.
See “About using a NetBackup appliance share for Oracle backups (Copilot)”
on page 86.
Performing backups and restores of Oracle 157
About restoring from a data file copy to ASM storage using RMAN
RUN {
ALLOCATE CHANNEL ch00
TYPE 'SBT_TAPE';
SEND 'NB_ORA_CLIENT=clientname,NB_ORA_SERV=servername';
SET NEWNAME FOR TABLESPACE USERS TO '/dump/%U';
RESTORE TABLESPACE USERS;
RELEASE CHANNEL ch00;
}
Once the file is on a file system, then you can restore to ASM storage by running
the following:
RUN {
ALLOCATE CHANNEL dc00 DEVICE TYPE DISK;
RESTORE TABLESPACE USERS;
RECOVER DATABASE;
RELEASE CHANNEL dc00;
}
Chapter 6
Guided Recovery
This chapter includes the following topics:
■ OpsCenter retrieves information for you such as databases and control files,
shortening the Oracle clone setup time.
■ A validation process increases the rate of successfully completing the cloning
operation.
■ You do not need access to the original database to perform the cloning operation.
ORACLE_METADATA=YES
Then send this configuration to the client host by using the following
bpsetconfig command:
ORACLE_METADATA=YES
■ Set up all destination file paths before you run the cloning operation because
the operation does not create new file paths during the process. Ensure that
the Oracle user has write access to these paths.
Note: In NetBackup (7.1 or greater), validation of the data files that reside in raw
devices may fail even though the Clone operation was successful. You may receive
an error that states the validation for specific paths failed.
backed up as part of a full backup do not appear in this list, the clone still
completes successfully.
If the image spans media, only the first media is shown in the list.
■ View Archived Log Recovery Set shows the archive log backups that may be
used to recover the database to the latest point in time of that control file. This
set is generated only for the files that are backed up as part of an incremental
strategy. Even though files that are backed up as part of a full backup do not
appear in this list, the clone still completes successfully.
Note: The Windows information you enter on this screen is case-sensitive. Be sure
to enter the Windows information appropriately.
lower, mixed). Otherwise, the clone fails with an error that indicates the temporary
file already exists. This limitation does not affect UNIX and Linux systems.
■ Control File Paths. This pane displays the source path and the destination
path for each control file. You can change a control file destination path by
clicking in the associated text window and entering the new path. You can also
click Browse to navigate to the desired path. When you change a path, a highlight
bar appears around the text window as a visual indicator that this path has
changed.
■ Data File Paths. This pane lets you change the destination path for one or more
data files. Enter the path in the text window provided, then select the data files
on which to apply it, and press the Apply option.
■ Redo Log Paths. This pane displays the source path and the destination path
for all redo logs. You can type in a new destination path or click Browse to
navigate to the desired path. When you change a path, a highlight bar appears
around the text window as a visual indicator that this path has changed.
■ Restore Options. This pane displays restore options. The option that is displayed
on this pane is Number of parallel streams for restore and recover.
When you are done making changes on this screen, click Next>. All the information
from the previous screen is saved in preparation for the cloning operation. All the
changes that are made in this screen are temporary and are active only for the
cloning session.
exists, the validation check also flags the error, so that the cloning operation does
not overwrite the file.
You can also specify an email address, so when the cloning process completes,
an email is sent to you that gives you the status of the cloning operation along with
other pertinent information.
Snapshot backup captures the data at a particular instant without having caused
significant client downtime. Client operations and user access continue without
interruption during the backup. The resulting capture or snapshot can be backed
up without affecting the performance or availability of the database.
The following NetBackup Snapshot Client features are available for use with
NetBackup for Oracle.
Table 7-1 Snapshot Client features used with NetBackup for Oracle
Feature Description
Instant recovery This feature enables instant recovery of backups from disk.
It combines snapshot technology with the ability to do rapid
disk-based restores. NetBackup creates the image without
interrupting user access to data. Optionally, the image is
retained on disk as well as backed up to storage. Instant
recovery enables block-level restores.
Table 7-1 Snapshot Client features used with NetBackup for Oracle
(continued)
Feature Description
File-based operations Oracle provides the list of files that require backup or restore
to NetBackup for Oracle with Snapshot Client.
Proxy copy
A proxy copy is a special type of backup in which the NetBackup for Oracle agent
manages the control of the data transfer. During the backup and restore operations,
proxy copy enables the agent to manage the entire data movement between the
disks that contain the data files and the storage devices that NetBackup manages.
With proxy copy, RMAN provides a list of files that require backup or restore to the
NetBackup for Oracle agent. The agent determines how the data is moved and
when to move the data. Proxy copy is an extension to Oracle’s Media Management
API.
Backups and restores remain tightly integrated with RMAN and its catalog, which
greatly simplifies administration tasks.
moves the data that the server process provides. NetBackup captures the data
stream content that RMAN provides. If the user has specified multiple streams,
then RMAN opens multiple streams and NetBackup catalogs them as separate
images.
Figure 7-1 represents a stream-based backup or restore.
Oracle Server
Data
Control commands
Oracle database Oracle database
disk disk
NetBackup
Storage
Figure 7-2 NetBackup for Oracle with Snapshot Client file-based backup or
restore
Oracle Server
Control commands
List of files
Oracle database Oracle database
disk disk
Data Data
NetBackup
Storage
on the Oracle version. RMAN translates the objects into the physical file names
and provides a list of file names to NetBackup for Oracle.
See “Database objects supported by advanced backup methods” on page 175.
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 Oracle files and uses the NetBackup Snapshot Client interface to perform
the data movement.
When Oracle performs proxy copy backups, it puts the data files being backed up
into backup mode. NetBackup then creates a snapshot of the files. After the snapshot
has been created, the NetBackup for Oracle agent signals back to Oracle to take
the data files out of backup mode. The data files being backed up are in backup
mode only for the period of time necessary to capture a snapshot of the data.
redo logs. As a result, NetBackup can use file-based Snapshot Client backup
methods to back up these objects.
For control files, Oracle RMAN performs conventional stream-based backups only.
NetBackup for Oracle must use stream-based backups for control files even when
you use Snapshot Client methods for the other database objects.
The Oracle Intelligent Policy handles both stream-based and file-based components.
File-based and stream-based backups require different configurations. When
configuring your NetBackup for Oracle with Snapshot Client backups, be sure to
configure a policy that allows both stream-based and file-based backups.
RUN
{
allocate channel t1 'SBT_TAPE';
sql 'alter tablespace TEST offline immediate'
# restore the datafile to a new location
set newname for datafile '/oradata/test.f' to
'/oradata_new/test.f';
restore tablespace TEST;
# make the control file recognize the restored file as current
switch datafile all;
recover tablespace TEST;
release channel t1;
}
The RMAN procedure for the data files that are backed up by proxy is the same as
for conventionally backed up data files. RMAN knows that the data files were backed
up by proxy, and it issues a proxy restore request to NetBackup for Oracle, which
restores the data files to the new location. For more information on the required
procedure, see your Oracle documentation.
On the backup, NetBackup for Oracle with Snapshot Client follows the symbolic
link and backs up both components of the Quick I/O file: the symbolic link and the
hidden file.
On the restore, NetBackup for Oracle with Snapshot Client restores both components
from the backup image. If one or both of the components are missing, NetBackup
for Oracle with Snapshot Client creates the missing component(s).
run {
allocate channel t1 type 'SBT_TAPE';
backup
incremental level 0
proxy
format ’bk_%U_%t’
tablespace tbs1;
release channel t1;
}
run {
allocate channel t1 type 'SBT_TAPE';
backup
incremental level 1
format ’bk_%U_%t’
NetBackup for Oracle with Snapshot Client 179
How NetBackup for Oracle with Snapshot Client works
tablespace tbs1;
release channel t1;
}
The agent splits the files into three streams and initiates a file-based
backup for each stream. After the proxy backup is done, RMAN starts
a non-proxy conventional backup of the control file on channel t1.
NetBackup for Oracle with Snapshot Client 180
How NetBackup for Oracle with Snapshot Client works
If the RMAN recovery catalog is not used, the version of the control file
being backed up does not contain information about the current backup.
To include the information about the current backup, back up the control
file as the last step in the backup operation. This step is not necessary
if the recovery catalog is used.
Run {
allocate channel t1 type 'SBT_TAPE';
backup
format 'cntrl_%s_%p_%t'
current controlfile;
release channel t1;
}
NetBackup for Oracle with Snapshot Client 181
How NetBackup for Oracle with Snapshot Client works
run {
allocate channel t1 type 'SBT_TAPE';
backup proxy
format 'bk_%U_%t'
(tablespace tbs1, tbs2);
release channel t1;
}
To use NAS snapshot with NetBackup for Oracle, the Oracle database must be
installed and configured to work in a NAS environment.
If you want to use a SnapVault storage unit, make sure that the storage unit is
configured before you start configuring the NAS snapshot policy.
For more information about NAS snapshot and SnapVault, see the NetBackup
Snapshot Client Administrator’s Guide.
■ Snapshot Client backups do not back up all database objects. Your backup
configuration must include schedules to perform snapshot and stream-based
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.
Note: The UID number can be different than the GID number.
■ Allocate different areas for data files, archived redo logs, and the control file for
database activities. Write the data files to their own repository because it is
required for an instant recovery point-in-time rollback. Only data files can exist
on the volume or the file system 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
license for this option must be registered.
■ To perform off-host backups, perform any special configuration that is required.
Select appropriate
storage unit or
storage unit group
Click Perform
snapshot backups
Click Retain
snapshot for Instant
Recovery or SLP
management
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:
16 On the Backup Selections tab, specify the correct setup depending on policy
setup.
■ Oracle Intelligent Policy backup policy. Use the radio button to select Whole
Database, Partial database – Tablespaces, Partial database – Datafiles,
Fast Recovery Area, Database Backup Shares, or Whole Database -
Datafile Copy Share when using this type of policy.
■ Script- or template-based backup policy. Specify the backup template or
backup script when you use this type of policy.
More information is available about how to use templates and scripts for a
NetBackup for Oracle policy with Snapshot Client.
NetBackup for Oracle with Snapshot Client 187
About configuring Snapshot Client with NetBackup for Oracle
Note: This feature requires a NetBackup appliance running software version 2.7.1
or later.
Use the following procedure to configure an Oracle snapshot policy that uses
Database Backup Shares or Whole Database - Datafile Copy Share options.
This procedure uses the Oracle Intelligent Policy, which makes configuration easier.
To configure a snapshot policy using a NetBackup appliance share
1 Open the policy you want to configure or create a new policy.
Do not use the Policy Configuration Wizard when performing this procedure.
2 Select the Attributes tab.
3 Select Oracle as the policy type if this policy is new.
4 Select a policy storage unit from the Policy storage list.
■ Policy storage
Oracle combines snapshots (proxy) and stream-based backups as part of the
same backup. The storage that is indicated here is used for the stream-based
part of the Database Backup Shares or Whole Database - Datafile Copy
Share backup.
Select a storage lifecycle policy that is configured to contain the stream-based
(non-snapshot) part of the database backup. The storage must use a storage
lifecycle policy that is configured for non-snapshot backups.
5 Select Perform snapshot backups.
NetBackup for Oracle with Snapshot Client 188
About configuring Snapshot Client with NetBackup for Oracle
Note: If there is more than one backup share that is associated with the
database instance, then Maximum Snapshots should be set to number of
recovery points you want multiplied with number of backup shares. Example:
If you want three recovery snapshot points and the database instance is
associated with two backup shares then Maximum Snapshots should be set
to 6.
12 Select the Instances and Databases tab and specify the instances to back
up. The policy must include at least one instance. To continue to use the Oracle
Intelligent Policy method, select either Protect instances or Protect instance
groups.
13 On the Backup Selections tab, use the radio button to select Database
Backup Shares or Whole Database - Datafile Copy Share options.
14 (Optional) Configure other attributes and add any additional schedules.
Note: The NetBackup appliance media server can only be configured in a pure
IPv4 or dual stack IPv4/IPv6 mode.
See “Configuring a snapshot policy for NetBackup for Oracle” on page 183.
See “About Snapshot Client effects” on page 197.
See “Configuring an OIP using a share on the NetBackup appliance (Copilot)”
on page 88.
Use this procedure for the files that were backed up with, or without, instant recovery
enabled. In all cases, Oracle determines the files that were backed up, and it initiates
a corresponding restore request to the database agent.
If instant recovery is enabled, NetBackup attempts to restore the file by using the
unique restore methods available with the instant recovery feature. The type of
restore method that NetBackup uses depends on your environment and the type
of backup performed. If NetBackup is unable to use any of the instant recovery
methods, it restores the file in the typical manner. Data is copied from the snapshot
to the primary file system. Information on the instant recovery methods that
NetBackup uses is available.
See the NetBackup Snapshot Client Administrator’s Guide.
■ In the Windows interface, select File > Select Files and Folders to
Restore.
If the data file you want to restore has not changes since it was backed up,
the rollback may fail. Initiate the restore from a script and use the FORCE
option.
3 Select Actions > Select Restore Type > Point in Time Rollback.
4 Use the NetBackup for Oracle recovery wizard for the restore.
See “About NetBackup for Oracle restores” on page 130.
Note: If the data file you want to restore has not changed since it was backed up,
the rollback may fail. Initiate the restore from a script and use the Oracle FORCE
option.
■ Example:
RUN {
allocate channel t1 'SBT_TAPE';
send 'NB_ORA_PC_RESTORE=rollback';
sql 'alter tablespace TEST offline immediate'
restore tablespace TEST;
recover tablespace TEST;
release channel t1;
}
the primary host. The restore does not overwrite the existing subvolume. File
verification is not performed.
The format of the new subvolume name is as follows:
mountpointname_restore.timestamp
the policy types and schedules and the convenience of the template generation
wizard. It also remains tightly integrated with RMAN and its catalog, which greatly
simplifies administration tasks.
You can also perform backups with the script-based BLI method without RMAN.
See “About script-based block-level incremental (BLI) backups without RMAN”
on page 276.
Note: Veritas recommends that Snapshot Client users who want to perform BLI
backups use BLI with RMAN.
NetBackup for Oracle also provides a method for BLI backup without RMAN that
uses scripts to put tablespaces into, and take them out of, backup mode. This
method is not recommended, and it requires a significantly different configuration.
But for Oracle 12c, using script-based BLI backups without the use of RMAN are
not supported.
■ Full Backup.
A backup in which NetBackup backs up each database file completely, not just
data blocks that have changed since the last full or incremental backup.
■ Cumulative BLI Backup.
This type of backup is a backup of all the changed blocks in the database files
since the last full backup. A cumulative BLI backup image contains only the data
blocks of database files that changed since the last full backup. A cumulative
BLI backup can reduce the number of incremental backup images that must be
applied during a restore operation. This speeds up the restore process.
■ Differential BLI backup.
A backup in which NetBackup performs a backup of only those data blocks
(within the database files) that changed since the last backup. The previous
backup can be of type full, cumulative incremental, or differential incremental.
When NetBackup initiates BLI backups, it creates, manages, and uses the
appropriate Storage Checkpoints of the filesystem(s) hosting the Oracle data file
systems. These Storage Checkpoints identify and maintain a list of modified blocks.
NetBackup or through the VxDBA utility for database backup available with the
Veritas Storage Foundation.
For more information on Storage Checkpoints, see the Veritas Storage Foundation
Administrator’s Guide.
You can take a Storage Checkpoint while the database is online or offline. To take
a Storage Checkpoint while the database is online, you must enable archive log
mode. During the creation of the Storage Checkpoint, all tablespaces are placed
in backup mode.
■ 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.
■ If a new file was added to or deleted from the list of files for an incremental
backup.
NetBackup for Oracle always initiates a full backup under these conditions, even
if you want to perform an incremental backup.
Full backup The full and incremental backup schedule types automatically start
the backups by running the NetBackup for Oracle RMAN scripts or
Differential incremental
templates. 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:
Multiple Copies For snapshot backup, configure Multiple copies on the automatic
backup schedule.
For NetBackup for Oracle with Snapshot Client, the order of precedence for
environment variables is the same as for standard NetBackup for Oracle. Refer to
the instructions for how to configure the NetBackup and the user variables.
See “About configuring the run-time environment” on page 100.
NetBackup for Oracle installs sample scripts in the following location:
Windows:
install_path\NetBackup\dbext\oracle\samples\rman
UNIX:
/usr/openv/netbackup/ext/db_ext/oracle/samples/rman
The following are the scripts for NetBackup for Oracle with Snapshot Client that
show how to configure the required variables:
NetBackup for Oracle with Snapshot Client 200
About Oracle support for Replication Director
If you use scripts, use the send command to pass the environment variables to the
agent. The following example uses the send command to specify the values for
NB_ORA_PC_SCHED and NB_ORA_PC_STREAMS:
run {
allocate channel t1 type 'SBT_TAPE';
send 'NB_ORA_PC_SCHED= sched, NB_ORA_PC_STREAMS= number’;
backup proxy
(database format 'bk_%U_%t');
}
For more information, see the sample scripts that are provided with the agent.
See “Proxy backup examples” on page 179.
Scripts ■ All scripts that are necessary to protect all ■ NetBackup can continue to use custom scripts
parts of the database are automatically to perform database backups.
generated at run-time. ■ The administrator must know how to configure
■ The administrator does not need to know how RMAN scripts.
to configure RMAN scripts. ■ The administrator must set the retention levels
■ The retention levels for the different parts of for the different parts of the database
the database are automatically assigned correctly.
■ The administrator must ensure that a
snapshot of the proxy data is created.
Schedules The administrator configures only one schedule The administrator must configure two schedules
that backs up all parts of the database and sets with two retentions:
the correct retention automatically.
■ One Full Backup schedule to back up the
The Archived Redo Log schedule is not snapshot (proxy) data part of the database.
supported with a snapshot backup. ■ One Application Backup schedule to back
up the stream-based part of the Oracle
database.
Backups User-directed backups are not supported. To User-directed backups are supported.
attempt a user-directed backup (results in a
status 240 (no schedules of the correct type exist
in this policy).
Load balancing RAC load balancing is not supported. RAC load balancing is supported.
4 Select the Attributes tab. The following items are specific to creating an Oracle
policy for snapshots with Replication Director:
■ Policy type
For NetBackup to perform Oracle backups, select Oracle. An Oracle tab
appears.
■ Policy storage
Oracle combines snapshots (proxy) and stream-based backups as part of
the same backup. The storage that is indicated here is used for the
stream-based part of the Replication Director backup.
Select a storage lifecycle policy that is configured to contain the
stream-based (non-snapshot) part of the database backup. The storage
must use a storage lifecycle policy that is configured for non-snapshot
backups.
■ Use Replication Director
Enable Use Replication Director to automatically select other options that
Replication Director requires:
■ Perform snapshot backups: Ensures that the policy creates snapshots
of the disk array.
■ Retain snapshots for Instant Recovery or SLP management: Ensures
that the policy retains the snapshot after the backup completes.
■ Options button
NetBackup for Oracle with Snapshot Client 203
About Oracle support for Replication Director
Note: Unless creating Block Level Incremental (BLI) backups, always select
Full Backup to create snapshots of the Oracle database.
■ Override policy storage selection: Enable and select the SLP that is
configured for snapshot replication. (A snapshot SLP is one in which the
NetBackup for Oracle with Snapshot Client 205
About Oracle support for Replication Director
6 Select the Instances and Databases tab and specify the instances to back
up. The policy must include at least one instance. To continue to use the Oracle
Intelligent Policy method, select either Protect instances or Protect instance
groups.
Script- or template-
based Oracle policy
method
7 Select the Backup Selections tab. Select the parts of the database to back
up. Note that the selection applies to all listed instances.
The following can be selected for the policies that use Replication Director:
■ Whole database: Backs up the entire database (default).
■ Partial database - Tablespaces: Backs up the tablespaces.
■ Partial database - Datafiles: Backs up the data files.
■ Fast Recovery Area (FRA): Do not select for a policy that uses Replication
Director.
■ Database Backup Shares: Do not select for a policy that uses Replication
Director.
■ Whole Database - Datafile Copy Share: Do not select for a policy that
uses Replication Director.
Note: If you back up the partial database, and later want to perform a
Point-in-time rollback restore, make sure that you select all of the tablespaces
or data files from a partition in the Backup Selections.
For copy-back restores, this is not a requirement.
4 Select the Attributes tab. The following items are specific to creating an Oracle
policy for snapshots with Replication Director:
■ Policy type
For NetBackup to perform Oracle backups, select Oracle. An Oracle tab
appears.
■ Policy storage
Oracle combines snapshots (proxy) and stream-based backups as part of
the same backup. The storage that is indicated here is used for the
stream-based part of the Replication Director backup.
Select the storage that is configured to contain the stream-based
(non-snapshot) part of the database backup. The storage can be either a
storage lifecycle policy that is configured for non-snapshot backups, or a
disk or Media Manager unit.
■ Use Replication Director
Enable Use Replication Director to automatically select other options that
Replication Director requires:
■ Perform snapshot backups: Ensures that the policy creates snapshots
of the disk array.
■ Retain snapshots for Instant Recovery or SLP management: Ensures
that the policy retains the snapshot after the backup completes.
■ Options button
NetBackup for Oracle with Snapshot Client 208
About Oracle support for Replication Director
5 Select the Instances and Databases tab and specify the instances to back
up. Select Clients for use with scripts and templates. If either of the other
two are selected, the Oracle Intelligent Policy is used and the scripts are created
automatically.
Oracle Intelligent
Policy method
Script- or template-
based Oracle policy
method
NetBackup for Oracle with Snapshot Client 210
About Oracle support for Replication Director
After selecting the Clients for use with scripts and templates option, a
message appears that describes the effect of this choice:
■ Existing selections (if any) for this policy are erased.
■ The Oracle tab is removed from this policy.
■ Another effect is that the Selections tab turns into the Clients tab.
Click Yes to continue Oracle policy configuration.
Note: Unless creating Block Level Incremental (BLI) backups, always select
Full Backup to create snapshots of the Oracle database.
■ Override policy storage selection: Enable and select the SLP that is
configured for snapshot replication.
■ Retention: The SLP indicates the retention for the backup.
NetBackup for Oracle with Snapshot Client 212
About Oracle support for Replication Director
9 Configure the schedule in the Start Window tab and the Exclude Days tab.
Click OK to save and close the schedule.
10 Select the Clients tab. By default, the Clients for use with scripts or
templates option is selected for this script- or template-based Oracle policy.
11 Add the client name(s) that contain the Oracle database and indicate the
operating system of each.
12 Select the Backup Selections tab. Specify the script or the template that
NetBackup should use. Indicate only one script or one template.
13 When the policy configuration is complete, click OK.
Chapter 8
Troubleshooting
This chapter includes the following topics:
2 For the Backup, Archive, and Restore interface and the Oracle Intelligent Policy,
verify that the following binaries exist.
On Windows: install_path\NetBackup\bin\bpdbsbora.exe
On Windows: install_path\NetBackup\bin\bpubsora.exe
On Windows: install_path\NetBackup\bin\dbsbrman.dll
On UNIX: /usr/openv/netbackup/bin/bpdbsbora
On UNIX: /usr/openv/netbackup/bin/bpubsora
On UNIX: /usr/openv/lib/libdbsbrman.so (libdbsbrman.sl on HP-UX)
3 Check that both the NetBackup server and client software work properly. That
is, check that normal operating system files can be backed up and restored
from the client. The NetBackup client must be running the same version of
software as the NetBackup server.
4 The logs can become very large, especially bpdbm. Ensure that enough free
disk space exists in the log directory disk partition.
Troubleshooting 216
NetBackup debug logs and reports
install_path\NetBackup\logs\README.debug file
UNIX:
/usr/openv/netbackup/logs/README.debug file
Troubleshooting 217
Enabling the debug logs manually (Windows)
NetBackup provides other reports that are useful in isolating problems. One such
report is All Logs Entries on the server. Information on server reports is available.
See the NetBackup Administrator’s Guide, Volume I.
install_path\NetBackup\logs\bpubsora
■ bphdb
For any backup that is initiated from an automated schedule on the master
server.
install_path\NetBackup\logs\bphdb
■ bpdbsbora
For any template-based backup or restore, including OIP and Guided
Recovery.
install_path\NetBackup\logs\bpdbsbora
■ dbclient
For any backup or restore using RMAN.
install_path\NetBackup\logs\dbclient
■ bpbkar
For any snapshot backup.
install_path\NetBackup\logs\bpbkar
■ tar
For any snapshot restore.
Troubleshooting 218
Enabling the debug logs manually (UNIX)
install_path\NetBackup\logs\tar
2 Verify the user or group that the Oracle process (process that loads
orasbt.dll) 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 Oracle 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 Oracle 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/bpubsora
■ bphdb
Troubleshooting 219
Enabling the debug logs manually (UNIX)
For any backup that is initiated from an automated schedule on the master
server.
/usr/openv/netbackup/logs/bphdb
■ bpdbsbora
For any template-based backup or restore, including OIP and Guided
Recovery.
/usr/openv/netbackup/logs/bpdbsbora
■ dbclient
For any backup or restore using RMAN.
/usr/openv/netbackup/logs/dbclient
■ bpbkar
For any snapshot backup.
/usr/openv/netbackup/logs/bpbkar
■ nbtar
For any snapshot restore.
/usr/openv/netbackup/logs/tar
2 Verify the user or group that the Oracle process (process that loads libobk)
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 Oracle process runs as has
appropriate permissions to write to the log directories in step 1.
Troubleshooting 220
About the NetBackup for Oracle log files
3 On the NetBackup server or servers, create the debug log directories for the
legacy processes that interact with the Oracle 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.
■ Windows: obk_stdout.mmddyy.hhmmss.txt
UNIX: obk_stdout.mmddyy
Unless it is redirected elsewhere, NetBackup writes template or shell script output
to this file.
■ Windows: obk_stderr.mmddyy.hhmmss.txt
UNIX: obk_stderr.mmddyy
Unless it is redirected elsewhere, NetBackup writes template or shell script errors
to this file.
■ Windows: mmddyy.log
UNIX: 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
schedule is run. NetBackup for Oracle uses this client process for template or shell
script execution.
■ Windows: mmddyy.log
■ UNIX: log.mmddyy
This log contains debugging information and execution status for the Oracle for
NetBackup client processes.
On Windows, the processes are linked to the library program that is provided with
NetBackup for Oracle.
■ Windows: mmddyy.log
■ UNIX: log.mmddyy
This log contains debugging information and execution status for the NetBackup for
Oracle backup and recovery wizards and for the bpdbsbora command line utility. This
log also contains the debugging information and execution status information that is
generated when an Oracle template is run from an automatic schedule (when bphdb
invokes bpdbsbora to run the template).
bporaexp64 The bporaexp (or bporaexp64 on UNIX) directory contains the following execution
log:
■ Windows: mmddyy.log
■ UNIX: log.mmddyy.log
Troubleshooting 222
Setting the debug level on a Windows client
bporaimp64 The bporaimp (or bporaimp64 on UNIX) directory contains the following execution
log:
■ Windows: mmddyy.log
■ UNIX: log.mmddyy
VERBOSE = X
msglog ‘logfile_name’
■ RMAN verifies its environment and then issues requests to the API.
On Windows, some information, such as the NetBackup version, API versions,
and trace file name, is registered with RMAN. An error now is usually due to a
problem with client and server communication. Check the messages in the bprd
and the bpcd logs for clues.
On UNIX, some information, such as the NetBackup version, API versions, trace
file name, and NetBackup signal handlers, is registered with RMAN. An error
now is usually due to a problem with client and server communication. Check
the messages in the bprdand the bpcd logs for clues. Also verify the bp.conf
entries on the client.
■ RMAN issues a backup or restore request.
Troubleshooting 225
Troubleshooting RMAN backup or restore errors
The API gathers necessary parameters and sends the backup or restore
request to the NetBackup server. The API waits until both the server and client
are ready to transfer data before it returns to the request.
The API then sends this information to the master server’s bprd process.
To troubleshoot a problem in this part of the first sequence, examine the following
file:
Windows:
install_path\NetBackup\logs\dbclient\mmddyy.log
UNIX:
/usr/openv/netbackup/logs/dbclient/log.mmddyy
If the bprd process failed, check the logs for bprd and bpbrm.
A failure now is frequently due to bad NetBackup server or Oracle policy
configuration parameters.
NetBackup can usually select the correct Oracle policy and schedules. But
NetBackup can select a policy or schedule in error if there are several Oracle
policies in its database.
On Windows, try setting the SERVER and NB_ORA_POLICY values in the client
environment.
On UNIX, try setting the SERVER and POLICY values in the bp.conf file on the
client or by setting environment variables.
For example, the following C Shell setenv commands specify the Oracle policy,
schedule, and server for NetBackup to use:
■ RMAN issues read or write requests to the API, which then transfers data to or
from the NetBackup server.
A failure here is probably due to NetBackup media, network, or timeout errors.
■ RMAN tells the API to close the session.
The API waits for the server to complete its necessary actions (for example, it
verifies the backup image) and then exits.
An error can originate from either NetBackup or RMAN, as follows:
■ RMAN aborts if it encounters an error while it reads a data file during the
backup (for example, if Oracle blocks are out of sequence). It also aborts if
NetBackup sends a bad backup image during the restore.
Troubleshooting 226
Troubleshooting the UNIX browser interface and wizards
■ NetBackup might return an error code to the API if for some reason it could
not complete the backup successfully.
INF - ORA-19554: error allocating device, device type: SBT_TAPE, device name:
INF - ORA-27211: Failed to load Media Management Library
If you want to start an Oracle job as someone other than an Oracle user, augment
the default shared library search path. Use the Linux ldconfig(8) command to add
$ORACLE_HOME/lib to the search path.
install_path\NetBackup\logs
UNIX:
/usr/openv/netbackup/logs/
■ The bprestore is almost always a client log on the NetBackup host that initiated
the restore by using the bprestore command.
■ The bprd is on the NetBackup master server.
■ The bpbrm is on the NetBackup master server.
■ The bptm/bpdm is on the NetBackup media server. Both the tape and the disk
backup log to bptm, disk backups also log to bpdm.
■ The tar is on the NetBackup client or redirected client.
Additional help for troubleshooting most installation and other issues is available
in the NetBackup Snapshot Client Administrator’s Guide.
See “About NetBackup for Oracle troubleshooting steps” on page 214.
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.
delayed. To review setting information and delay examples, refer to the following
article:
http://www.veritas.com/docs/TECH227741
To determine the cause of delays after the transfer, refer to the following article:
http://www.veritas.com/docs/TECH198864
Appendix A
Real Application Clusters
This appendix includes the following topics:
The virtual network host name may be associated with an IP address in the following
ways:
■ With an IP address for a host in the cluster
■ A virtual IP address for an Oracle database instance running on a host in the
cluster
■ A failover virtual IP address that may move between the hosts in the cluster
Backup operations may use the various virtual network host names, or the network
host name of the hosts in the cluster.
To differentiate between the various network names, the following terms and
definitions are used:
Host name The network host name that is associated with a specific host
in the cluster.
VIP name The network host name that is associated with a virtual IP
address specific to an instance in the cluster.
Failover name The network host name that is associated with an IP address
that is active on a running node. This network host name is
the network host name that can perform a backup at this
time.
Warning: Do not use a single client name if the backup is load balanced across
more than one node. In a load-balanced configuration, the node that hosts the IP
address to which the client name resolves, generates successful backups. However,
the jobs originating from the other nodes fail with status code 54.
Oracle 11g R2 Grid Infrastructure (CRS) includes the Single Client Access Name
(SCAN) feature. A single SCAN can resolve to multiple IP addresses each assigned
to a different physical node in the cluster.
A SCAN can be used in a NetBackup policy that receives the Application Backup
request. However, this abstraction of the client name causes backup and restore
jobs to fail with status code 54. Also, the client side fails with status code 6 (backup)
or status code 5 (restore).
Accordingly, ensure that the client that appears in the NetBackup Oracle policy is
not a SCAN. Also, ensure that any NB_ORA_CLIENT or CLIENT_NAME that the
node provides in the backup request is not a SCAN. These names must reliably
resolve on both the master server and the media server to an IP address. This IP
address allows the server processes to connect to the node from which the backup
request originated.
Real Application Clusters 233
About RAC archiving schemes
CFS archive
destination
Database
data files
Node 1 Node 2
If the CFS solution is not available, Oracle recommends a scheme like that in
Figure A-2. In Figure A-2, each node archives to a local directory and writes a copy
to each of the other nodes’ archive directories. The locations are shared between
the nodes (with read and write permissions) by NFS mounting the directory (UNIX)
or sharing the locations (Windows).
Figure A-2 describes non-CFS local archiving scheme with archive sharing.
Real Application Clusters 234
About RAC archiving schemes
Database
data files
Node 1 Node 2
A scheme similar to the previous one exists if each node archives to a local directory,
and the locations are shared (read-only) with the other nodes in the cluster. These
locations are shared among the nodes by NFS-mounting the directory (UNIX) or
sharing the locations (Windows). Therefore, each node can read each archive
destination.
Figure A-3 describes non-CFS local archiving scheme with archive read-only sharing.
Real Application Clusters 236
About RAC archiving schemes
Figure A-3 Non-CFS local archiving scheme with archive read-only sharing
Database
data files
Node 1 Node 2
The simplest archiving scheme is local archiving with no sharing. Each node writes
only to the local destination, and no access is given to the other nodes in the cluster.
Figure A-4 describes non-CFS local archiving scheme with no archive sharing.
Archive Archive
destination destination
1 2
Database
data files
Node 1 Node 2
For more information about configuration and additional archiving scheme examples
see your Oracle documentation.
Note: This example works only if the backup is not load balanced across multiple
nodes, because NB_ORA_CLIENT=$NB_ORA_CLIENT evaluates only to the node
on which the RMAN script is executed.
Real Application Clusters 238
Example of restoring a database
RUN
{
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
SEND 'NB_ORA_CLIENT=$NB_ORA_CLIENT,NB_ORA_SERV=$NB_ORA_SERV';
BACKUP
DATABASE;
sql 'alter system archive log current';
RELEASE CHANNEL ch00;
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
SEND 'NB_ORA_CLIENT=$NB_ORA_CLIENT,NB_ORA_SERV=$NB_ORA_SERV';
BACKUP
ARCHIVELOG ALL ;
RELEASE CHANNEL ch00;
}
Note: This example works only if the backup is not load balanced across multiple
nodes. The reason is because NB_ORA_CLIENT=$NB_ORA_CLIENT evaluates
only to the node on which the RMAN script is executed.
The following example restores the entire database from any node:
RUN {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
SEND 'NB_ORA_CLIENT=saturn,NB_ORA_SERV=jupiter';
RESTORE
DATABASE;
RECOVER
DATABASE;
RELEASE CHANNEL ch00;
}
Real Application Clusters 239
Troubleshooting database restores (UNIX and Windows)
RUN {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
SEND 'NB_ORA_CLIENT=saturn,NB_ORA_SERV=jupiter';
RESTORE
ARCHIVELOG ALL;
RELEASE CHANNEL ch00;
}
If the remote archive logs destinations do not allow write access, use a script such
as the following to restore the archive logs:
RUN {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
SEND 'NB_ORA_CLIENT=saturn,NB_ORA_SERV=jupiter';
Real Application Clusters 240
About restoring archive logs
Where <directory> is the directory into which the archive logs are restored.
Use a script like the preceding one if your configuration is a configuration shown in
one of the following topics:
■ See Figure A-3 on page 236.
■ See Figure A-4 on page 237.
Appendix B
Best practices for
protecting Oracle RAC
with NetBackup
This appendix includes the following topics:
■ About using Templates and Oracle Intelligent Policy (OIP) with RAC
■ Example RAC configuration: Failover name exists and backup is not load
balanced
■ Example RAC configuration: Failover name exists and backup is load balanced
■ Example RAC configuration: Failover name is not available and backup is not
load balanced
■ Example RAC configuration: Failover name is not available, and backup is load
balanced, one policy with custom script
■ Example RAC configuration: Failover name is not available and backup is load
balanced, simple script with manual policy failover
Note: Using a separate template or OIP for each instance in a RAC may be
successful. However, using these methods may result in multiple backups of the
same shared application data.
Backup scripts or Oracle launch mechanisms provides greater flexibility for complex
configurations and are preferred for use with RAC.
Best practices for protecting Oracle RAC with NetBackup 243
About NetBackup for Oracle operations
Note: Oracle 11g R2 Grid Infrastructure (CRS) includes the Single Client Access
Name (SCAN) feature. This feature allows a single host name to resolve to
multiple IP addresses each assigned to a different physical node in a cluster.
Ensure that the client that appears in the NetBackup Oracle policy is not a SCAN.
Also, ensure that any NB_ORA_CLIENT or CLIENT_NAME provided by the
client host in the backup request is not a SCAN. These names must reliably
resolve on both the master server and the media server to a client host IP
address. This IP address allows the server processes to connect to the client
host from which the backup request originated. If the SCAN is used in a
NetBackup policy, this abstraction of the client name leads to backup and restore
jobs failing. The backup and restore jobs may fail with a status 54. The client
side fails with status 6 (backup) or status 5 (restore).
■ The NetBackup master server uses the automatic schedules in the Oracle policy
to determine when the scripts in the backup selections are run on clients.
■ The NetBackup scheduler starts one Automatic Backup job for each client in
the policy. The jobs for multiple clients can run concurrently. The scheduler
executes each script on each client in the specified sequence. All the scripts for
one client are run in the same automatic job.
■ The backup scripts start RMAN.
■ If an automatic schedule and script do not exist in the policy, a process on the
client can still initiate RMAN when necessary.
The following lists what occurs when RMAN requests the backup:
■ RMAN connects to the appropriate Oracle database instance(s) for the backup.
Hence, the script may execute on one host, but the backup may take place on
a different host.
■ RMAN allocates one or more channels according to the backup script.
■ RMAN sends one or more backup pieces on each channel, in sequence.
■ Each channel interacts with NetBackup for Oracle and sends a user-directed
backup request to the NetBackup master server for each backup piece.
Best practices for protecting Oracle RAC with NetBackup 244
Example RAC configuration: Failover name exists and backup is not load balanced
■ The NetBackup master server configuration must allow the physical host names
access to all of the backup images.
cd /usr/openv/netbackup/db/altnames
echo "hostname1" >> hostname1
echo "vipname1" >> hostname1
echo "hostname2" >> hostname1
echo "vipname2" >> hostname1
echo "failover_vipname" >> hostname1
cp hostname1 hostname2
■ You can use Preferred Network on the client to specify the outbound interface
for user-directed requests to the master server. This method is not recommended.
However, if you use this method then you must allow the VIP names to access
all of the backup images.
cd /usr/openv/netbackup/db/altnames
cp hostname1 vipname1
cp hostname1 vipname2
Note: This method may not be desirable because it affects the source IP for
user-directed file system backup, list, and restore requests.
The backup script then runs on the active host that currently hosts the failover name.
RMAN allocates the channels on that host to perform the backup. The Application
Backup jobs queue to the failover name, and the NetBackup media server connects
back to the failover name for the data transfer. The backup images are stored under
the failover name regardless of which host performed the backup. Restores can
take place from either host as long as the restore request is configured to SEND
'NB_ORA_CLIENT=failover name';
correct host to obtain the data for each request. Hence, the backup images are
stored under two different client names which must differ from the failover name
that is used to execute the script.
■ Set up the policy to specify the failover name as the client name. Thus, the
Automatic schedule executes the backup script on a host that is currently
operational.
■ The backup script or an identical copy must be accessible to all hosts in the
cluster. The clustered file system is a good location.
■ Do not configure the backup script to send a single value for NB_ORA_CLIENT.
The NetBackup media server must connect back to the correct host, which
depends on which host originated the user-directed backup request. Select one
of the following three methods to accomplish this task:
■ Configure the backup to provide a host-specific client name with each backup
request using one of the following three options:
■ Configure RMAN to bind specific channels to specific instances and provide
the associated client names on each channel for backup image storage.
Also, configure RMAN for connect-back to the requesting host for the data
transfer. Do not use the failover name, because it is active on only one of
the hosts.
Note: If one or more of these nodes are down, these allocation operations
fail which causes the backup to fail.
■ Alternatively and by default, the backup uses the client names which should
be distinct for each host and is typically the physical host name.
■ The NetBackup master server configuration must allow the physical host names
access to the backup images. The images are stored under the VIP names or
host names as follows:
cd /usr/openv/netbackup/db/altnames
echo "failover_name" >> hostname1
echo "hostname1" >> hostname1
echo "vipname1" >> hostname1
echo "hostname2" >> hostname1
echo "vipname2" >> hostname1
cp hostname1 hostname2
Best practices for protecting Oracle RAC with NetBackup 248
Example RAC configuration: Failover name is not available and backup is not load balanced
■ You can use Preferred Network or another means to force NetBackup to use
the IP addresses associated with the VIP names for outbound user-directed
requests. If you use this method then you must allow the VIP names to access
all of the backup images.
cd /usr/openv/netbackup/db/altnames
cp hostname1 vipname1
cp hostname1 vipname2
Option A: The NetBackup scheduler starts three automatic jobs, and each runs
the backup script (two of them on the host that currently hosts the failover name).
The two executions of the backup script that receive the VIP names or host names
exit immediately with status 0. The reason immediate exit is done is to avoid a
redundant backup and any retries. The third execution of the backup script that
receives the failover name, starts RMAN. RMAN then sends the data for backup
by using the appropriate client name for the instance or host for the channel.
NetBackup stores the backup images under the initiating policy using both client
names.
Option B: The first policy runs the backup script by using the failover name. RMAN
sends the name of the second policy and the configured client names for each
channel with the user-directed request from each host. The second policy stores
the backup images using both client names.
Either client can initiate a restore. RMAN must be configured with 'SET
AUTOLOCATE ON;' to request the backup pieces from the appropriate instance-host
that performed the backup. Alternatively, you can restore from either host or instance
if you configure each restore request to include the correct client name. This name
is the client name used at the time the backup piece was transferred to storage.
SEND 'NB_ORA_CLIENT=client_name_used_by_backup'
either host, the backup images have the potential to be stored under both client
names. The image storage name is dependent on which host is active at the time
of the backup. The configuration is as follows:
■ The policy specifies client names for both hosts, either hostname1 and
hostname2, or vipname1 and vipname2. The specification of client name ensures
that the backup is attempted on a host which is currently operational.
■ The backup script must be accessible to both hosts in the cluster, the clustered
file system makes a good location.
■ The backup script should be customized so that it starts RMAN on exactly one
of the clients. If the script is executed on the primary, then start RMAN and
perform the backup. If the script is executed on the secondary and the primary
is up, then exit with status 0 so the NetBackup scheduler doesn't retry this client.
If the script is executed on the secondary and the primary is down, then start
RMAN and perform the backup. You can build the script customization around
a tnsping to the primary or even a query of the database. Use this customization
to see if the other instance is open and able to perform the backup.
■ Each user-directed backup request must use a client name which allows the
NetBackup media server to connect back to the correct host for the data transfer.
By default, the backup uses the CLIENT_NAME from the bp.conf file which is
distinct for each host. A better solution is to configure RMAN to provide the
appropriate client name from the policy as follows:
SEND 'NB_ORA_CLIENT=$NB_ORA_CLIENT';
■ Configure the NetBackup master server to give the physical host names access
to all of the backup images.
cd /usr/openv/netbackup/db/altnames
echo "hostname1" >> hostname1
echo "vipname1" >> hostname1
echo "hostname2" >> hostname1
echo "vipname2" >> hostname1
cp hostname1 hostname2
Best practices for protecting Oracle RAC with NetBackup 250
Example RAC configuration: Failover name is not available, and backup is load balanced, one policy with
custom script
■ You can use Preferred Network or another means to force NetBackup to use
the IP addresses associated with the VIP names for outbound user-directed
requests. If you use this method then you must allow the VIP names to access
all of the backup images.
cd /usr/openv/netbackup/db/altnames
cp hostname1 vipname1
cp hostname1 vipname2
Either client can initiate a restore. RMAN must be configured with 'SET
AUTOLOCATE ON;' to request the backup set pieces from the appropriate instance
or host that performed the backup. Alternatively, you can restore from either host
or instance if you configure each restore request to include the correct client name.
This client name is the one that is used at the time the backup set piece was
transferred to storage.
SEND 'NB_ORA_CLIENT=client_name_used_by_backup'
can be built around a tnsping to the primary or even a query of the database.
Use this customization to see if the other instance is open and able to perform
the backup.
■ The backup script must not be configured to send a single value for
NB_ORA_CLIENT. This configuration is because the NetBackup media server
needs to connect back to the correct host depending on which host originated
the user-directed backup request.
■ Configure the backup to provide a host-specific client name with each backup
request using one of the following three options:
■ Configure RMAN to bind specific channels to specific instances and provide
the associated client names on each channel for backup image storage.
Also, configure RMAN for connect-back to the requesting host for the data
transfer.
Note: If one or more of these nodes are down, these allocation operations
fail which causes the backup to fail.
■ Alternatively by default, the backup uses the client names which should be
distinct for each host and is typically the physical host name.
■ Configure the NetBackup master server to allow the physical host names access
to all of the backup images.
cd /usr/opnv/netbackup/db/altnames
echo "hostname1" >> hostname1
echo "vipname1" >> hostname1
echo "hostname2" >> hostname1
echo "vipname2" >> hostname1
cp hostname1 hostname2
■ You can use Preferred Network or another means to force NetBackup to use
the IP addresses associated with the VIP names for outbound user-directed
requests. If you use this method then you must allow the VIP names to access
all of the backup images.
cd /usr/openv/netbackup/db/altnames
cp hostname1 vipname1
cp hostname1 vipname2
The net result is that the backup script runs on all of the currently active hosts but
only starts RMAN on one host. RMAN allocates channels across the hosts for load
balancing. The user-directed backup requests include a NB_ORA_CLIENT or
CLIENT_NAME specific to the requesting host and which matches the policy. The
connect-back for data transfer and the backup image are stored under that name.
Either client can initiate a restore. RMAN must be configured with 'SET
AUTOLOCATE ON;' to request the backup pieces from the appropriate instance-host
that performed the backup. Alternatively, you can restore from either host or instance
if you configure each restore request to include the correct client name. This name
is the client name used at the time the backup piece was transferred to storage.
SEND 'NB_ORA_CLIENT=client_name_used_by_backup';
instance in real time. If this scenario is the case, use the following configuration to
manually initiate a backup from the secondary host when the primary host is down.
■ Create a first Oracle policy with an Application Backup schedule to receive the
backup images from both hosts. Configure both VIP names or the host names
as clients in the policy. Do not configure an Automatic Backup schedule or a
backup selection (script).
■ Create a second Oracle policy to execute the backup script on the primary host.
Configure the VIP name or host name of the primary host in the policy. Configure
the pathname to the backup script in the policy. Create an Automatic Backup
schedule with an open window in the policy.
■ Create a third Oracle policy that can be used to manually execute the backup
script on the secondary host when the primary host is unavailable. Configure
the VIP name or host name of the secondary host in the policy. Configure the
pathname to the backup script in the policy. Create an Automatic Backup
schedule without an open window in the policy.
■ The backup script must be accessible to both hosts in the cluster, the clustered
file system makes a good location.
■ Configure the backup to provide a host-specific client name with each backup
request using one of the following three options:
■ Configure RMAN to bind specific channels to specific instances and provide
the associated client names on each channel for backup image storage.
Also, configure RMAN for connect-back to the requesting host for the data
transfer.
Note: If one or more of these nodes are down, these allocation operations
fail which causes the backup to fail.
■ Alternatively and by default, the backup uses the client names which should
be distinct for each host and is typically the physical host name.
■ Configure the NetBackup master server to allow the physical host names access
to all of the backup images.
cd /usr/opnv/netbackup/db/altnames
echo "hostname1" >> hostname1
echo "vipname1" >> hostname1
echo "hostname2" >> hostname1
echo "vipname2" >> hostname1
cp hostname1 hostname2
■ Although not recommended, you can use preferred network or another means
to force NetBackup to use the IP addresses associated with the VIP names for
outbound user-directed requests. If you use this method then you must allow
the VIP names to access all of the backup images.
cd /usr/openv/netbackup/db/altnames
cp hostname1 vipname1
cp hostname1 vipname2
The second policy executes the backup script on the primary host when it is
scheduled. RMAN starts the backup process on all of the hosts, and they send back
the appropriate NB_ORA_CLIENT or CLIENT_NAME for that host. If the primary
is down, initiate the third policy manually from the NetBackup master server and
perform a similar backup.
Either client can initiate a restore. RMAN must be configured with 'SET
AUTOLOCATE ON;' to request the backup pieces from the appropriate instance-host
that performed the backup. Alternatively, you can restore from either host or instance
if you configure each restore request to include the correct client name. This name
is the client name used at the time the backup piece was transferred to storage.
SEND 'NB_ORA_CLIENT=client_name_used_by_backup';
images are stored under a single client name, the image catalog does not need
any special configuration.
However, if a failover name was not used, then the backup images for individual
clients are stored in uniquely named image directories. This configuration can cause
complications when an operation such as crosscheck or restore are performed from
an alternate cluster or an alternate node within the cluster
Note: This technique works best when you use the VIP names for the instances
as the racclient names. If you use physical host names, the backup images from
file system backups are stored with the Oracle backup images within a single image
directory. This situation can result in two potential problems. First, if the same file
name exists on both hosts but with different content, care must be used to select
the correct backup image from which to restore. The selection confusion can be
eliminated by configuring the file system backup to specify a policy keyword. The
keyword is specific to the host from which each file system backup is taken. Then
use the host-specific keyword to constrain the image search when performing
browse and restore. Second, either host can restore the files that were backed up
from the other host. Being part of the same cluster, this restore technique is normally
not a concern. But be aware in case there are special considerations for permissions
and security restrictions at your site.
The following procedure can be used to centralize storage of the backup images
from all nodes in the cluster under one client name. That single client name can
then be used for maintenance and restore operations.
In the following procedure, all steps are performed on the master server unless
otherwise noted. Also, the procedure uses two examples of network host names
that are routable:
■ racclient1
■ racclient2
In this procedure, the logical name for the cluster is racname. If there is a failover
name that is always active on a node in the cluster, then it could be used as the
racname. Alternatively, the racname can temporarily be added as a host name alias
for racclient1 or racclient2 to complete the initial configuration and then be removed.
Best practices for protecting Oracle RAC with NetBackup 256
Image catalog configuration for RAC
To centralize storage of the backup images from all nodes in the cluster under
one client name
1 On both the master and the media server, confirm that the RAC client names
are resolvable, network routable, and reverse resolve accurately:
Fix any host name forward and reverse resolution inconsistencies, and any
network routing problems. Be sure to clear the NetBackup host cache and wait
10 seconds after making any name resolution changes:
bpclntcmd –clear_host_cache
Best practices for protecting Oracle RAC with NetBackup 257
Image catalog configuration for RAC
2 On the master server, check if image directories or client aliases already exist
for either of the racclients or the logical name for the cluster:
Windows:
dir install_path\Veritas\NetBackup\db\images\racclient1
dir install_path\Veritas\NetBackup\db\images\racclient2
dir install_path\Veritas\NetBackup\db\images\racname
UNIX:
ls -ld /usr/openv/netbackup/db/images/racclient1
ls -ld /usr/openv/netbackup/db/images/racclient2
ls -ld /usr/openv/netbackup/db/images/racname
Windows or UNIX:
Note: Do not continue this procedure if either of the client names already have
image directories or are aliases to a client name other than the racname.
Instead of using this procedure, consider merging the existing image directories
and client names per the following Veritas knowledge base article.
https://www.veritas.com/docs/000018409
Alternatively, create new network resolvable and network routable host names
for the RAC clients and return to step 1.
3 If the logical cluster name already had an image directory and is an alias for
itself, then skip to step 5.
4 Run a backup using the logical cluster name as a NetBackup client name.
■ If the racname is not a resolvable host name, temporarily make it a host
name alias for the host name of one of the RAC client names. Changing
the host name alias is most easily done my modifying the hosts file.
■ The backup should be a file system backup using a new or an existing
policy, it can be a backup of only one file.
■ Afterward, make sure the racname has an image directory and client alias
per the checks in step 2. Then remove any temporary host name alias or
policy that was created.
Best practices for protecting Oracle RAC with NetBackup 258
Image catalog configuration for RAC
5 Direct future backups and image searches for racclient1 and racclient2 to the
logical cluster name.
Create the client aliases for the cluster and confirm:
cd install_path\Veritas\NetBackup\db\altnames
echo racname >> peername_racclient1
echo racname >> peername_racclient2
UNIX:
cd /usr/openv/netbackup/db/altnames
echo racname >> peername_racclient1
echo racname >> peername_racclient2
$ bpclntcmd -pn
expecting response from server mymaster
racclient1.com racclient1 192.168.0.11 60108
For more information about client alias best practices, refer to the following tech
note:
Best practices for protecting Oracle RAC with NetBackup 259
Configuring the appliance within a RAC environment
http://www.veritas.com/docs/TECH208362
See “Oracle RAC with NetBackup best practices” on page 242.
See “About NetBackup for Oracle operations” on page 243.
RAC may be used with the OIP and the appliance. You can use either the Database
Backup Shares or Whole Database - Datafile Copy Share option in the OIP
configuration. Both options only use a single node when a share is used on the
appliance.
When the Database Backup Shares option is used, the DBAs have the ability to
load balance the backups to the appliance share. Once the DBAs have placed a
backup on the appliance share, NetBackup uses a single node of the cluster to
protect the share. It does not matter which nodes are used to backup to the appliance
share. NetBackup only uses a single node to protect the data on the share.
The Whole Database - Datafile Copy Share option uses a single node of the RAC
cluster to move the data to the appliance share and protect the share.
Use the following procedure to configure the RAC environment to use OIP and the
appliance to protect the share.
To configure the RAC environment with OIP and the appliance NFS share
1 Mount the appliance share at the same mount point on each node.
2 Configure all backups images so that they are cataloged under one client name.
■ See “Image catalog configuration for RAC” on page 254.
3 Configure the master server to allow physical host name access to the backup
images.
cd /usr/openv/netbackup/db/altnames
echo "failover_name" >> hostname1
echo "hostname1" >> hostname1
echo "vipname1" >> hostname1
echo "hostname2" >> hostname1
echo "vipname2" >> hostname1
cp hostname1 hostname2
Best practices for protecting Oracle RAC with NetBackup 260
Configuring the appliance within a RAC environment
4 Add a database instance from one RAC node to the Oracle database instance
repository.
5 Create an OIP (using the Database Backup Shares or Whole Database -
Datafile Copy Share option) and only put one instance from the RAC cluster
into the policy.
See “Configuring an OIP using a share on the NetBackup appliance (Copilot)”
on page 88.
See “About using Templates and Oracle Intelligent Policy (OIP) with RAC”
on page 242.
See “Oracle RAC with NetBackup best practices” on page 242.
Appendix C
Deduplication best
practices
This appendix includes the following topics:
■ Editing the RMAN script and configuring NetBackup for Oracle for a proxy copy
backup
generates the backup set identically each time. The backup set is generated with
the same data from the same files in the same sequence each time the database
is backed up. This uniformity ensures better deduplication. In addition, when
FILESPERSET=1 is in effect, Oracle does not perform multiplexing, so Oracle includes
only one file in each backup set. If FILESPERSET is specified with a number other
than 1, Oracle groups files together unpredictably and deduplication rates suffer.
You may also want to increase the number of channels that are allocated to the
backup, if possible.
Veritas recommends that you test your database backups by running both
stream-based backups and proxy copy backups. Measure the deduplication rates
and the backup times, and see which method fits best in your environment. The
Oracle database files themselves benefit the most from deduplication. Typically,
the archive logs and the control files are unique, so they benefit less from
deduplication.
Deduplication performs best when used in the following ways:
ORACLE_OVERRIDE_DATA_MOVEMENT = 1
BACKUP
FILESPERSET=1
%BACKUP_TYPE%
FORMAT 'bk_u%%u_s%%s_p%%p_t%%t'
DATABASE;
If your site requires encryption, you can specify encryption in the NetBackup
for Oracle backup policy.
Deduplication best practices 265
Example RMAN script for a stream-based backup
Note: Make sure that Oracle optimization, encryption, and compression are disabled
for the entirety of the database backup. Make sure to check specifications outside
of the RMAN backup script, too.
RUN {
BACKUP
$BACKUP_TYPE
SKIP INACCESSIBLE
TAG hot_db_bk_level0
Deduplication best practices 266
Example RMAN script for a stream-based backup
BACKUP
FORMAT 'bk_u%u_s%s_p%p_t%t'
PROXY
DATABASE;
If your site requires encryption, you can specify encryption in the NetBackup
for Oracle backup policy.
Deduplication best practices 268
Example RMAN script for a proxy copy backup
Note: Make sure that Oracle optimization, encryption, and compression are
disabled for the entirety of the database backup. Also, make sure to check
specifications outside of the RMAN backup script.
RUN {
# Specify 2 streams.
SEND 'NB_ORA_PC_STREAMS=2';
BACKUP
PROXY
SKIP INACCESSIBLE
TAG hot_db_bk_proxy
FORMAT 'bk_%s_%p_%t'
Deduplication best practices 269
Example RMAN script for a proxy copy backup
DATABASE;
sql 'alter system archive log current';
RELEASE CHANNEL ch00;
#
# Note: During the process of backing up the database, RMAN also backs up the
# control file. This version of the control file does not contain the
# information about the current backup because "nocatalog" has been specified.
# To include the information about the current backup, the control file should
# be backed up as the last step of the RMAN section. This step would not be
# necessary if we were using a recovery catalog or auto control file backups.
#
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
SEND ' NB_ORA_SERV=$NB_ORA_SERV’;
BACKUP
FORMAT 'cntrl_%s_%p_%t'
CURRENT CONTROLFILE;
RELEASE CHANNEL ch00;
}
Appendix D
Snapshot Client support of
SFRAC
This appendix includes the following topics:
CLIENT_NAME = <virtual_name>
■ Alternatively, add the following parameter to the RMAN script file that you
are using for backup and restore, and keep the default CLIENT_NAME as
the hostname:
NB_ORA_CLIENT = <host_name>
3 Specify the required host mode options in the storage array that provides the
storage LUNs. For example, in the Host group options of an Hitachi array, enter
the type of host (for example, Solaris) and enable the VERITAS Database
Edition/Advanced Cluster for Oracle RAC (Solaris) option.
Snapshot Client support of SFRAC 272
Performing a rollback restore in an SFRAC environment
4 Add the following line to the bp.conf file, on each node in the cluster.
PREFERRED_NETWORK = <virtual-host-name>
[QUIESCENCE_INFO]
"QUIESCENCE_SERIAL_QUIESCENCE"=dword:00000001
The following are entities in the VCS that monitor the application I/O stack:
■ CFSMount contains the mount points (cfs) where data files, archive logs, and
control files are stored.
■ CVMVolDg contains all the Volume Groups (cvm) configured on top of the
various array LUNs that participate in the hardware snapshot.
■ The Database Resource Group contains the database instance and assists in
failover.
To perform a rollback restore in the SFRAC environment
1 Ensure that you previously created a virtual IP for the clustered node. Point
that virtual IP to the master node of the cluster.
2 On all the clustered nodes, take the VCS database service group (Oracle,
CFSMount, and CVMVolDg resources) offline by using the following command:
4 Mount the CFSMount points manually outside VCS on the master node. This
action helps when you start the database in mount state.
5 Start the database with mount option on the clustered master node using one
of these options:
Option 1:
Option 2:
6 Run the rollback restore operation from the RMAN script or the client GUI. A
sample RMAN script file (hot_database_backup_proc) is located in the
following directory path:
/usr/openv/netbackup/ext/db_ext/oracle/samples/rman
NB_ORA_PC_RESTORE=rollback
# umount <mntPt>
9 On all the clustered nodes, take the VCS database service group (Oracle,
CFSMount, and CVMVolDg resources) back online:
Resolution: The client name mentioned in the policy and in the bp.conf file at
the client are different.
■ Problem: The backup failed with error 156. The bpfis logs show the following
error.
file:[QUIESCENCE_INFO]
"QUIESCENCE_SERIAL_QUIESCENCE"=dword:00000001
■ Problem: The rollback failed with the following error displayed in the GUI:
Resolution : Add the following line in the bp.conf file on the master node of the
cluster PREFERRED_NETWORK = <virtual_name>
Appendix E
Script-based block-level
incremental (BLI) backups
without RMAN on UNIX
and Linux systems
This appendix includes the following topics:
of Oracle database files. NetBackup for Oracle script-based BLI performs backups
using the Storage Checkpoint facility in the Veritas File System (VxFS) available
through the Veritas Storage Foundation for Oracle.
2 Verify licensing.
The products must have valid licenses. To check for licenses, enter the following
commands based on your version:
For VxFS versions earlier than 3.5:
# vxlicense -p
# vxlicrep
The command displays all the valid licenses that are installed on the system.
If you have valid licenses, the Storage Checkpoint feature and the Veritas
Storage Foundation for Oracle appear in the list.
3 Verify that both the NetBackup server (master and media) and client software
work properly.
Particularly, verify that you can back up and restore typical operating system
files from the client.
Nodata Storage Checkpoint If the database is offline during the entire backup window (a
cold database backup) or you use this checkpoint type, the
additional space is minimal. Each file system requires about
1% of free space.
Fulldata Storage Checkpoint If the database is online during the backup and using this
checkpoint type, then more free space is needed in the file
system.
Note: The default option that NetBackup uses for backups is Fulldata Storage
Checkpoint.
To use Nodata Storage Checkpoint instead of the default option, a user must create
the following empty touch file:
/usr/openv/netbackup/ext/db_ext/NODATA_CKPT_PROXY
While most database NetBackup BLI backup policy requirements are the same as
for file system backups, the following items have special requirements:
■ The number of policies that are required
See “Number of policies required for BLI backup” on page 280.
■ Policy attribute values
See “About BLI policy attributes” on page 282.
■ The BLI client list
See “About the BLI client list” on page 282.
■ The list of directories and files to back up
See “Backup selections list for BLI backups” on page 283.
■ Schedules
See “About schedules for BLI backup policies” on page 283.
Warning: Care must be taken when specifying the keyword phrase. A multistream
backup is attempted if the backup process finds more than one policy with the
following characteristics: Each policy has the BLI attribute set, each policy is active,
each policy contains the same client, and each policy has an identical keyword
phrase.
Typical failure status is: “74 - timeout waiting for bpstart_notify to complete.”
"See “NetBackup restore and backup status codes” on page 297.
You can check the file systems on the backup client to see if they are included in
one of the NetBackup policies on the server. To see if you need to add any new
file systems to the NetBackup policies, run the following commands from the server
on a regular basis, perhaps as a cron(1) job:
# cd /usr/openv/netbackup/bin/goodies/
# ./check_coverage -coverage -client mars -mailid \nbadmin
The preceding command generates the following output and mails it to the specified
mailid:
CLIENT: mars
Mount Point Device Backed Up By Policy Notes
----------- ------ ------------------- -----
/ /dev/vg00/lvol3 production_servers
/home /dev/vg00/lvol5 production_servers
/oradata1 /dev/dsk/c1t0d0 block_incr1
/oradata2 /dev/dsk/c1t0d0 block_incr1
/oradata3 /dev/nbuvg/nbuvol UNCOVERED
/opt /dev/vg00/lvol6 production_servers
/oracle /dev/vg00/oracle production_servers
/stand /dev/vg00/lvol1 production_servers
/usr /dev/vg00/lvol7 production_servers
/var /dev/vg00/lvol8 production_servers
If there is an UNCOVERED file system that is used by Oracle, add it to one of the
NetBackup policies so that all the necessary file systems are backed up at the same
time.
Script-based block-level incremental (BLI) backups without RMAN on UNIX and Linux systems 282
Creating NetBackup policies for script-based BLI backup
Note: After a file system is added to a policy, it is a good idea to keep the file system
in that policy. If you change the policy, NetBackup performs a full backup the next
time backups are run even if an incremental backup is requested.
Perform block level Select to enable BLI backups. If the BLI attribute is not enabled,
incremental backups NetBackup uses the standard method to back up the files in
the file list.
Job Priority Set so that the BLI backup policies run before other policies.
Note: Do not change a keyword phrase after it is set in a policy. The keyword phrase
is used in naming Storage Checkpoints. Changing the keyword phrase necessitates
a full backup even if an incremental backup is requested.
If you are using the Quick I/O interface, you need to specify both the Quick I/O file
name and the associated hidden file in the file list (for example, dbfile and
.dbfile), or you need to specify the directory that contains both files. NetBackup
does not follow the symbolic links to automatically back up the hidden file if you
enumerate only the dbfile explicitly in the backup selections list. They are both
included if you enumerate their common directory.
When the NetBackup scheduler invokes an automatic backup schedule, it backs
up the files one at a time, in the same order they appear in the backup selection
list.
Oracle does not recommend backing up the online redo log, so it is recommended
that you place online redo log files in a different file system than datafiles, archive
log files, or database control files. Do not include the online redo log files in the file
list.
Schedule: incr
Type: Differential Incremental Backup
Frequency: 1 day
Retention Level: 3 (one month)
Daily Windows:
Sunday 18:00:00 --> Monday 06:00:00
Monday 18:00:00 --> Tuesday 06:00:00
Tuesday 18:00:00 --> Wednesday 06:00:00
Wednesday 18:00:00 --> Thursday 06:00:00
Thursday 18:00:00 --> Friday 06:00:00
Friday 18:00:00 --> Saturday 06:00:00
Saturday 18:00:00 --> Sunday 06:00:00
Schedule: userbkup
Type: User Backup
Retention Level: 3 (one month)
Daily Windows:
Sunday 00:00:00 --> Sunday 24:00:00
Monday 00:00:00 --> Monday 24:00:00
Tuesday 00:00:00 --> Tuesday 24:00:00
Wednesday 00:00:00 --> Wednesday 24:00:00
Thursday 00:00:00 --> Thursday 24:00:00
Friday 00:00:00 --> Friday 24:00:00
Saturday 00:00:00 --> Saturday 24:00:00
Term Definition
cold database A cold database backup is taken while the database is offline or closed.
backup BLI backup shuts down the database and performs either full or
block-level incremental backups. This backup method is also referred
to in Oracle documentation as a "consistent whole database backup"
or a "closed backup." The data from a cold backup is consistent,
resulting in easier recovery procedures.
In an offline backup, all database files are consistent to the same point
in time (for example, when the database was last shutdown using typical
methods). The database must stay shut down while the backup runs.
hot database A hot database backup allows the database to be online and open while
backup the backup is performed. With the Storage Checkpoint facility, this
backup method runs database backups in parallel so a database does
not need to be in backup mode for a long time.
Nodata storage A Nodata storage checkpoint hot backup puts the tablespaces in backup
checkpoint hot mode for the duration of the backup. It uses a Nodata Storage
Checkpoint to reduce the amount of file system space consumed.
Term Definition
quick freeze The quick freeze database backup is different than an online database
database backup backup, because it requires the database to be brought down briefly to
take a snapshot or Fulldata Storage Checkpoint of the database image.
The Fulldata Storage Checkpoint is created in a few seconds and the
database can be restarted immediately. A backup image from a quick
freeze database backup is equivalent to a backup image from a cold
database backup. You can choose this backup method when you
configure BLI notify scripts.
If the database is in ARCHIVELOG mode, you can use all four methods to back up
the database. If the database is in NOARCHIVELOG mode, you can only select the
cold backup or quick freeze backup.
When you use the cold and quick freeze database backups, the default shutdown
command that you use in the bpstart_notify.oracle_bli script is shutdown or
shutdown normal. These commands wait for all users to log off before it initiates
the shutdown. In some circumstances, even after all interactive users are logged
off, processes such as the Oracle Intelligent Agent (Oracle dbsnmp account) can
still be connected to the database, preventing the database shutdown. Attempt to
use the default shutdown commands to shut down the database cleanly.
Alternatively, you can use shutdown immediate to initiate the database shutdown
immediately.
■ post_checkpoint_notify.POLICY
■ bpend_notify.POLICY
/usr/openv/netbackup/ext/db_ext/oracle/bin/setup_bli_scripts
/usr/openv/netbackup/ext/db_ext/oracle/samples
When you run setup_bli_scripts you need to supply the following information:
■ Identify the POLICY_IN_CONTROL
See “Identify the POLICY_IN_CONTROL for BLI backups” on page 288.
■ Provide the Oracle environment variables
See “Oracle environment variables for BLI scripts” on page 288.
■ Select a backup method
■ Notify scripts for other policies
See “About BLI notify scripts for other policies” on page 289.
See the information about how to use the notify scripts to back up your Oracle
database.
ORACLE_INIT Path name for the Oracle startup parameter file (INIT.ORA). If
you are using an Oracle SPFILE as your parameter file, do not
set the ORACLE_INIT environment variable.
ORACLE_CONFIG Path name for the Oracle configuration file (CONFIG.ORA). Some
database configurations use the CONFIG.ORA file to specify
values for the database parameters that usually do not change.
The CONFIG.ORA file can be called by the INIT.ORA file using
an include statement.
#/usr/openv/netbackup/ext/db_ext/oracle/bin/setup_bli_scripts
The default "connect" statement that will be used to connect to the database is:
"connect / as sysdba"
Would you like to modify the connect and use a specific login? (y/n) n
Please enter the Oracle instance (ORACLE_SID) you want to back up? orac901
To back up a copy of the Oracle control file, you need to specify a file
path where Oracle can write a copy of the control file.
Please enter the file path where Oracle is to write a copy of your
control file? /dbhome/oracle/orac901/admin/orac901/pfile/cntrlorac901.ora
To back up the Oracle archive logs, you need to specify their location.
You now need to decide on how many NetBackup policies you will have
backing up simultaneously. The first one you enter will be known
as the POLICY_IN_CONTROL in the scripts and will perform any needed
DB operations. When you create the policies on the NetBackup server,
you will have to divide the filesystems between these policies.
Please enter the name of the policy that will be the POLICY_IN_CONTROL? BLI_1
Please enter the name of another policy or DONE to stop? BLI_2
Please enter the name of another policy or DONE to stop? BLI_3
Please enter the name of another policy or DONE to stop? BLI_4
Please enter the name of another policy or DONE to stop? BLI_5
Please enter the name of another policy or DONE to stop? BLI_6
Please enter the name of another policy or DONE to stop? DONE
Note: You must be the root user to perform all operations using the BLI backup
software.
Note: You must be the root user to perform all operations using the BLI backup
software.
Note: For HP-UX PA-RISC checkpoints to unmount and be cleaned up, create
touch file /usr/openv/netbackup/AIO_READS_MAX that contains the value 1.
HP-UX PA-RISC checkpoints may not be unmounted on Oracle database agents.
Note: You must be the root user to perform all operations using the BLI backup
software.
Note: For HP-UX PA-RISC checkpoints to unmount and be cleaned up, create
touch file /usr/openv/netbackup/AIO_READS_MAX that contains the value 1.
To perform a cold (offline) backup, set the environment variable METHOD in the
bpstart_notify script on the client to SHUTDOWN_BKUP_RESTART. The
bpstart_notify script shuts down the database before the backup begins and
the bpend_notify script restarts the database after the backup completes.
To perform a hot (online) backup using Fulldata Storage Checkpoints, make sure
the database is running in ARCHIVELOG mode and set the variable METHOD to
ALTER_TABLESPACE. The bpstart_notify script changes the tablespaces to online
backup mode before the backup begins, and the post_checkpoint_notify script
changes the tablespaces back to normal mode after the Fulldata Storage
Checkpoints are created.
To perform a Nodata Storage Checkpoint Hot (online) backup, make sure the
database is running in ARCHIVELOG mode and set the environment variable METHOD
Script-based block-level incremental (BLI) backups without RMAN on UNIX and Linux systems 293
Performing backups and restores
Note: You must be the root user to perform all operations using the BLI backup
software.
For example:
ls -la /db02
total 2192
drwxr-xr-x 2 root root 96 Jan 20 17:39 .
drwxr-xr-x 9 root root 8192 Jan 20 17:39 ..
-rw-r--r-- 1 oracle dba 1048576 Jan 20 17:39 .cust.dbf
lrwxrwxrwx 1 oracle dba 22 Jan 20 17:39 cust.dbf ->\
.cust.dbf::cdev:vxfs:
The preceding example shows that you must include both the symbolic link cust.dbf
and the hidden file .cust.dbf in the backup file list.
If you want to back up all Quick I/O files in a directory, you can simplify the process
by only specifying the directory to be backed up. In this case, both components of
each Quick I/O file is properly backed up. In general, you should specify directories
to be backed up unless you only want to back up some, files in those directories.
Note: For HP-UX PA-RISC checkpoints to unmount and be cleaned up, create
touch file /usr/openv/netbackup/AIO_READS_MAX that contains the value 1.
Script-based block-level incremental (BLI) backups without RMAN on UNIX and Linux systems 294
Performing backups and restores
To restore a Quick I/O file, if both the symbolic link and the hidden file already exist,
NetBackup restores both components from the backup image. If either one of the
two components is missing, or both components are missing, NetBackup creates
or overwrites as needed.
Oracle database recovery might be necessary after restoring the files. See the
Oracle documentation for more information on doing database recovery.
NetBackup progress For user-directed backups and restores performed with Backup, Archive, and Restore
logs interface, the most convenient log to use for NetBackup is the progress log. The progress
log file is written to the user's home directory, by default in
/usr/openv/netbackup/logs/user_ops/username/logs. This log indicates whether
NetBackup was able to complete its part of the operation. You can view the progress log
from the Backup, Archive, and Restore interface, or you can use a file editor such as vi(1).
NetBackup debug logs The NetBackup server and client software provide debug logs for troubleshooting problems
that occur outside of BLI backups. To enable these debug logs on the server or client, create
the appropriate directories under the following directory:
/usr/openv/netbackup/logs
For more information on debug logs, see the NetBackup Troubleshooting Guide or see the
/usr/openv/netbackup/logs/README.debug file.
NetBackup reports In addition to logs, NetBackup provides a set of reports that help isolate problems. One report
is All Log Entries on the server. For a description of all reports, see the NetBackup
Administrator’s Guide, Volume I.
This indicates that there was an attempt to back up a file system that is not a
VxFS file system with the Block level incremental attribute. This error can also
occur if the file system is not mounted.
■ Status Code 73. bpstart_notify failed.
When running the notify scripts, the bpstart_notify script exited with a nonzero
status code, or the permission bits are set wrong on the bpstart_notify script.
The script must have execute permission. If the permission bits are set, check
the bpstart_notify_output.ORACLE_SID file in the
/usr/openv/netbackup/bin/BLOCK_INCR directory.
■ Status Code 74. Client timed out waiting for bpstart_notify to complete.
Check the BPSTART_TIMEOUT setting on the NetBackup server. The
BPSTART_TIMEOUT specified did not allow enough time for the script to complete.
The shutdown database operation might be taking too long, or the script might
be waiting for other streams to start. Check the
bpstart_notify_output.ORACLE_SID file and the
post_checkpoint_notify_output.ORACLE_SID file in the
/usr/openv/netbackup/bin/BLOCK_INCR directory. Make sure that the policies
and schedules are configured with appropriate multiplexing factors and that the
required storage units that allow all streams to start at the same time are
configured. Check to see if all needed tape drives are working and available.
Make sure that the database is not processing transactions so that the instance
cannot be shut down immediately (if you are using one of the backup methods
where the database is shut down).
Finally, make sure that the priority on the BLI policies is higher than other policies,
so they get access to the tape drives before the other policies.
■ Status Code 75. Client timed out waiting for bpend_notify to complete.
Script-based block-level incremental (BLI) backups without RMAN on UNIX and Linux systems 298
About troubleshooting backup or restore errors
log files to the database files. Follow the Oracle documentation to perform database
recovery after a restore.
Appendix F
XML Archiver
This appendix includes the following topics:
■ About the environment variables set by a user in the XML export parameter file
Table F-1 NetBackup for Oracle XML export and XML import archiving
features
Feature Description
System- and NetBackup for Oracle uses the eXtensible Markup Language (XML)
database-independent standard to represent relational database table data that is extracted
archive format from an Oracle database.
Self-identifying archive The XML Schema standard is used to describe the table data that
format is included in an archive. In this way, the archive contains the key
to understanding the format of the data as well as the data itself.
Command line Parameter files specify the table data to include in an archive and
interfaces that allow the table data to extract from an archive for import into an Oracle
export and import at database.
row-level granularity
Restore destination NetBackup for Oracle can either restore XML data to an operating
option system directory or import the data back into the Oracle database.
Flexible archive image The NetBackup catalog contains information on the contents of the
searches archive that can be searched by using flexible search criteria, such
as tablename or user.
Command line 1
2 3
Query processor Oracle DBMS
5
XML generator
OS Directory
NetBackup
Activity Process
Oracle XML archive NetBackup for Oracle extracts database table data, converts
it into XML format, and stores XML data to either of the
following types of repositories:
■ A directory
■ A storage unit
XML Archiver 303
NetBackup for Oracle XML export and XML import
Activity Process
XML export NetBackup for Oracle converts Oracle table data to XML
format (XML schema, or metadata, and XML instance, or
data).
Oracle DBMS
Query processor
OCI
Script or template
Command line
(bporaexp)
Backup, archive, and restore
(Parameter file) interface
Scheduler
NetBackup
NetBackup for Oracle users or automatic schedules start database XML export
archives by performing a manual backup of an Oracle policy, by invoking the script
or template at the command line on the client, or by invoking a template through
the Backup, Archive, and Restore interface.
For an XML export archive:
■ The NetBackup for Oracle script or template calls the bporaexp utility with a
specified parameter file.
■ The query processor uses the parameters in the specified file to build an SQL
query for each table.
■ Oracle’s OCI API executes the queries on the Oracle database instance to be
archived.
XML Archiver 305
NetBackup for Oracle XML export and XML import
■ The query processor passes the output (including metadata and data for a single
table or multiple tables) to the XML Generator.
■ For each table passed, the XML generator builds one or more sets of XML
schema and XML instance documents.
■ XML data streams are backed up by NetBackup.
■ Alternately, bporaexp allows the files to be saved to an operating system
directory.
OS Directory
Restore NetBackup
XML
export
XML Format
OS Directory
Activity Process
Oracle XML Restore NetBackup for Oracle manages the retrieval of archived
database table data, the parsing of the XML format, and the
insertion of the data back into the Oracle database.
Activity Process
bporaimp/bporamip64 NetBackup for Oracle’s XML import utility can parse the
commands XML-formatted data for re-insertion into the database or can
redirect the data to an OS directory.
Option to
restore XML
files on disk
Archive name
Table(s) metadata,
Table(s) data Keyword
Table name
Script or template
OCI XML data loader (bporaimp)
Oracle DBMS
(Parameter file)
NetBackup for Oracle users start database XML import restores by invoking a
NetBackup for Oracle script or template at the client command line or by invoking
an XML import restore template through the Backup, Archive, and Restore interface.
XML Archiver 307
About the environment variables set by a user in the XML export parameter file
NB_ORA_POLICY Specifies the name of the policy to use for the Oracle backup.
To define NB_ORA_POLICY, use the RMAN PARMS
statement or send statement in Oracle shell scripts. For
example:
If you need an explanation of any of the fields on the wizard screens or more
details, click Help on the wizard screen.
9 After you complete the wizard, the Selection Summary screen displays the
summary of the XML export template.
You can run the template immediately after the wizard finishes, save the
template to the master server, or both. For explanations of your choices, click
Help.
To save, to run, or to save and run the template, click Finish.
where:
-t templ_name.tpl Specifies the name of the template file name that you want
to use as the basis for the script. Make sure that the
template exists. bpdbsbora retrieves XML export
templates from a known location on the master server, so
specify only the template file name.
install_path\NetBackup\dbext\Oracle\samples\bporaexp
UNIX:
/usr/openv/netbackup/ext/db_ext/oracle/samples/bporaexp
■ For import:
Windows:
install_path\NetBackup\dbext\Oracle\samples\bporaimp
UNIX:
/usr/openv/netbackup/ext/db_ext/oracle/samples/bporaimp
The example export scripts that are installed in bporaexp are as follows:
Windows:
data_archiver_export.cmd
UNIX:
data_archiver_export.sh
data_archiver_export64.sh
bporaexp_help.param
bporaexp_partitions.param
bporaexp_table_to_files.param
bporaexp_tables.param
bporaexp_tables_rows.param
The example import scripts that are installed in bporaimp are as follows:
Windows:
data_archiver_import.cmd
UNIX:
data_archiver_import.sh
XML Archiver 313
Performing an XML export archive
data_archiver_import64.sh
bporaimp_archive.param
bporaimp_archive_schema_to_files.param
bporaimp_archive_to_users.param
bporaimp_bfile_table.param
bporaimp_help.param
bporaimp_ignore_rows_table.param
bporaimp_large_table.param
bporaimp_list.param
bporaimp_old_archive.param
bporaimp_partitions.pram
bporaimp_table_from_files.param
bporaimp_table_to_files.param
bporaimp_table_to_user.param
bporaimp_tables.param
Automatic backup of an As with Oracle backups using RMAN, the most convenient way to create Oracle archives
Oracle policy that consist of XML exports of data from your database is to set up schedules for automatic
backups. The Oracle policy runs NetBackup for Oracle templates or shell scripts. For a
backup using RMAN, a backup template is used, and for an XML export, an XML export
template is used.
When the NetBackup scheduler invokes a schedule for an automatic backup, the NetBackup
for Oracle XML export templates or shell scripts run as follows:
The NetBackup for Oracle XML export template or shell scripts start the XML export by
running the NetBackup bporaexp or bporaexp64 utility.
Manual backup of an The administrator can use the NetBackup server software to manually run an automatic
Oracle policy backup schedule for the Oracle policy. For more information, see the NetBackup
Administrator’s Guide, Volume I.
See “Testing configuration settings for NetBackup for Oracle” on page 117.
User-directed XML The following sections describe procedures for performing user-directed XML exports.
exports from the client
■ Running NetBackup for Oracle XML export templates.
See “Running NetBackup for Oracle XML export templates” on page 314.
■ Using bpdbsbora to run an XML export template.
See “Using bpdbsbora to run an XML export template” on page 315.
■ Running the NetBackup for Oracle XML export script on the client.
See “Running the NetBackup for Oracle XML export script on the client” on page 316.
■ Running bporaexp on the client as an Oracle user.
See “Running bporaexp on the client as an Oracle user” on page 317.
■ Writing to a directory versus writing to a storage unit.
See “Writing to a directory versus writing to a storage unit” on page 317.
■ bporaexp parameters
See “About bporaexp parameters” on page 319.
edit, delete, or rename templates on the master server, the client must exist in a
policy or in the NetBackup image catalog.
To use Oracle template administration
1 In the Backup, Archive, and Restore interface, click Actions > Administer
Database Templates > Oracle.
The Oracle template administration window appears.
The Select Template list shows the names, descriptions, and types of the
Oracle templates that are stored on the current master server.
2 Select the name of the XML export template you want to run.
3 Click Run.
The Oracle template administration window provides the following functions:
Where:
-t templ_name.tpl Specifies the name of the template file that you want to use.
bpdbsbora retrieves the XML export templates from a known
location on the master server, so specify only the file name.
For example:
Running the NetBackup for Oracle XML export script on the client
You can initiate a database XML export from the operating system command prompt:
Type the full path to the shell script that performs the export. For example:
Windows:
install_path\oracle\scripts\data_archiver_export.cmd
UNIX:
/oracle/scripts/data_archiver_export.sh
The operating system shell starts the database XML export archive by running the
XML export script. The XML export script contains commands to run bporaexp.
The NetBackup for Oracle installation script installs sample scripts in the following
location:
Windows:
install_path\NetBackup\dbext\oracle\samples\bporaexp
UNIX:
/usr/openv/netbackup/ext/db_ext/oracle/samples/bporaexp
XML Archiver 317
Performing an XML export archive
3 Configure the runtime environment, because this method does not call the full
script that includes the runtime configuration.
On UNIX and Linux, check the sample scripts for runtime environment details.
See “About configuring the run-time environment” on page 100.
bporaexp creates a set of XML schema and instance documents that can be used
to archive Oracle table data. For each archive, one master XML schema (.xsd)
document is generated. In addition, bporaexp generates a table-specific schema
(.xsd) document and a table specific instance (.xml) document for each table.
Additional files are created if the table contains LONG or LOB columns.
See “Performing an XML export archive” on page 313.
DIRECTORY=\db\netbackup\xml
UNIX:
DIRECTORY=/db/netbackup/xml
XML Archiver 318
Performing an XML export archive
Table F-6 shows the files NetBackup creates when you run the command.
File Content
UNIX: /db/netbackup/xml/test1/USER1/TEST1.xsd
UNIX: /db/netbackup/xml/test1/USER1/TEST1.xml
If the DIRECTORY parameter is not specified, NetBackup writes the backup images
to a storage unit. A NetBackup backup set is created and cataloged under the name:
Windows:
\Oracle\XMLArchive
UNIX:
/Oracle/XMLArchive
All NetBackup for Oracle bporaexp backups are cataloged using this convention.
Alternatively, if the parameter file does not contain the DIRECTORY parameter,
NetBackup creates and catalogs the following files:
Windows:
\Oracle\XMLArchive\test1\test1.xsd
\Oracle\XMLArchive\test1\USER1\TEST1.xsd
\Oracle\XMLArchive\test1\USER1\TEST1.xml
UNIX:
/Oracle/XMLArchive/test1/test1.xsd
/Oracle/XMLArchive/test1/USER1/TEST1.xsd
/Oracle/XMLArchive/test1/USER1/TEST1.xml
In production, do not use the DIRECTORY parameter in the bporaexp parameter file.
When you write to a storage unit, NetBackup offers the features that include
searching and cataloging with the NetBackup catalog and automatic handling of
XML Archiver 319
Performing an XML export archive
output that exceeds file system limits. With the DIRECTORY parameter, file system
limits, such as a 2 GB maximum, can cause an error.
To run bporaexp on the client, run the following command:
NAME Y no default The name of the master XML schema file. Directory
NB_ORA_SERV N default master Optionally specifies the name of the Storage Unit
server NetBackup master server.
NB_ORA_CLIENT N default client Optionally specifies the name of the Storage Unit
NetBackup for Oracle client.
NB_ORA_POLICY N default Oracle Optionally specifies the name of the Storage Unit
policy NetBackup for Oracle policy.
NB_ORA_SCHED N default backup Optionally specifies the name of the backup Storage Unit
policy policy schedule to use.
schedule
ROW_BUFFER N 1000 Specifies the size, in rows, of the buffer used Directory
to fetch rows. Tables with LONG columns are
fetched one row at a time. The maximum
value allowed is 32767.
TABLES Y no default Lists the table names, view names, and Directory
partition names to export. The USERID must
have SELECT privilege on the tables and
views. The syntax used is:schema.table:
partition name or schema.view name
The Oracle password is not required. The operating system account that is running
bporaimp has access only to archives that were created using the same account.
Note: Only XML export archives created using NetBackup mode are searched.
Exports stored in an operating system directory using the DIRECTORY parameter
are not searched.
For example, assume you named the list parameter file bporaimp_list.param. At
the command prompt, type the following:
Note: Only XML export archives created using NetBackup mode are searched.
Exports stored in an operating system directory using the DIRECTORY parameter
are not searched.
The following UNIX or Linux example uses bplist to search all Oracle archives for
a client named jupiter. The sample output is produced for two archives, test1
and little_sales, where each archive has one Oracle table (test1 has
USER1.TEST1 and little_sales has USER1.LITTLE_SALES).
/exb_mabm02ko_1_1392170136
/exb_lqbltds6_1_1392083334
The following Windows example uses bplist to search all Oracle archives for a client
named jupiter. The sample output is produced for one archive, test.
/usr/openv/netbackup/bin/jbpSA &
4 Expand the Oracle node in the left pane to view an Oracle database instance
hierarchy in the right pane.
To use the XML import wizard
1 In the left pane of the Backup, Archive, and Restore interface, select the Oracle
database instance.
Database objects that can be imported are listed under the Users node. The
tool displays only the schema owners and objects accessible by the current
user login.
2 Expand the Users list to the schema owners of the objects to be imported.
3 In the right pane, select database objects that exist in the archive to be restored.
4 Choose Actions > Restore.
5 Enter information about the restore operation you want to perform in the screens
that the NetBackup for Oracle XML import wizard displays.
The screens are as follows:
■ Welcome
■ Target Database Logon Credentials
■ Archive Import Options
■ NetBackup Archive Source Options
XML Archiver 326
Restoring an XML export archive
where:
-t templ_name.tpl Specifies the full path name of the template you want to use.
For example:
Windows:
UNIX:
install_path\oracle\scripts\data_archiver_import.cmd
UNIX:
/oracle/scripts/data_archiver_import.sh
The operating system shell starts the database restore by running the XML import
script file. The XML import script file contains commands to run bporaimp
(bporaimp64 on some platforms).
The NetBackup for Oracle installation script writes sample scripts to the following
location:
Windows:
install_path\NetBackup\dbext\oracle\samples\bporaimp
UNIX:
/usr/openv/netbackup/ext/db_ext/oracle/samples/bporaimp
ARCHIVE_DATE_FROM N no default Optionally specifies a start date for the archive Storage Unit
to be imported. Used with ARCHIVE_DATE_TO
to specify a range. If not used, the most recent
archive is imported. If the range used results in
more than one archive, the most recent from
the range is used. The date format is
mm/dd/yyyy [hh:mm:ss].
ARCHIVE_DATE_TO N no default Optionally specifies an end date for the archive Storage Unit
to be imported. Used with
ARCHIVE_DATE_FROM to specify a range. If
not used, the most recent archive is imported.
If the range used results in more than one
archive, the most recent from the range is used.
The date format is mm/dd/yyyy [hh:mm:ss].
BFILE_DIRECTORY Y (if any no default Specifies a directory for the output of any BFILE Directory
table being columns being imported. Oracle’s CREATE
imported has DIRECTORY command can be used to create
BFILE the DIRECTORY in Oracle, and the name should
columns) match the name used in the export file.
XML Archiver 329
Restoring an XML export archive
NAME Y no default The name of the master XML schema file. This Directory
parameter is required if LIST = N.
NB_ORA_SERV N default Optionally specifies the name of the NetBackup Storage Unit
master master server.
server
NB_ORA_CLIENT N default Optionally specifies the name of the NetBackup Storage Unit
client for Oracle client.
RESTORE_TO_DIRECTORY N no default Optionally specifies a directory for the output Storage Unit
of the bporaimp utility. If used, the XML data
is not parsed and inserted into Oracle.
ROW_BUFFER N 1000 Specifies the size, in rows, of the buffer used Directory
to insert rows. Tables with LONG or LOB
columns are inserted one row at a time. The
maximum value allowed is 32767.
XML Archiver 331
Restoring an XML export archive
The user on client A cannot initiate a redirected restore to client B. Only the user
on client B, which is the client receiving the backup image, can initiate the redirected
restore. Any user who belongs to the database group that performed the backup
can restore it, unless the BKUP_IMAGE_PERM variable is set to USER.
nb_ora_serv = NetBackup_server
nb_ora_client =
original_client_where_XML_export_occurred.
install_path\NetBackup\db\altnames\saturn
UNIX:
/usr/openv/netbackup/db/altnames/saturn
NAME = sales
NB_ORA_SERV = jupiter
NB_ORA_CLIENT = jupiter
USERID = orauser/orapasswd
Examine these logs for messages that show how to determine the source of
an error.
These logs are written by the NetBackup client and contain the following:
■ Requests from bporaexp and bporaimp
■ Activities between bporaexp and bporaimp and NetBackup processes
If the logs do not contain any messages, the following conditions could be
present:
■ bporaexp or bporaimp terminated before requesting service from
NetBackup.
■ bphdb (if started by the scheduler or graphical user interface) did not start
the template or shell script successfully. Check the bphdb logs for stderr
and stdout files.
Try to run the XML export or XML import template or script file from the
command line to determine the problem.
On UNIX, the error is usually due to a file permission problem for bphdb itself
or for the export or import script file.
Ensure that the full XML export or import script file name is entered correctly
in the Backup Selections list of the Oracle policy configuration, or for templates,
that the name is correct.
On UNIX, logs are not created in this directory if the permissions are not set
for the Oracle user to write to the directory. The full permissions setting, chmod
777, is best.
For more information about debug logs and reports, refer to the NetBackup
Administrator’s Guide, Volume I.
The following explains the sequence of events for an action that bporaexp or
bporaimp initiates in NetBackup mode. This situation occurs when DIRECTORY is
not specified in the bporaexp or bporaimp command’s parfile. It suggests solutions
for the problems that can occur at each point in the sequence.
To troubleshoot by stage
1 bporaexp or bporaimp starts.
■ Using a template that is run from the NetBackup client GUI or bpdbsbora.
■ Manually from the NetBackup Administration Console on the master server.
■ Automatically by an automatic export schedule.
If an error occurs now, check the bporaexp or bporaimp log.
2 bporaexp or bporaimp verifies its environment and then connects to Oracle
and NetBackup.
An Oracle environment problem, a database problem, an incorrect user ID, or
an incorrect password can cause Oracle connect errors.
A NetBackup error now is usually due to a problem with client and server
communication. Check the messages in the bprd and bpcd logs for clues.
Also verify the bp.conf entries on the UNIX or Linux client.
3 bporaexp or bporaimp issues a backup or restore request.
install_path\NetBackup\logs\bporaexp\log.mmddyy
UNIX:
/usr/openv/netbackup/logs/bporaexp/log.mmddyy
If the bprd process failed, check the bprd and bpbrm logs.
During this sequence, most failures occur because of incorrect NetBackup
server or Oracle policy configuration parameters.
NetBackup can usually select the correct Oracle policy and schedules. However,
NetBackup can select a policy or schedule in error if there are several Oracle
policies in its database.
In Windows, try setting the SERVER and POLICY values in the client environment
or by setting the following bporaexp parameters:
NB_ORA_POLICY=policyname
NB_ORA_SCHED=schedule
NB_ORA_SERV=NetBackup_server
NB_ORA_CLIENT=NetBackup_client
In UNIX, try setting the SERVER and POLICY values in the bp.conf file on the
client or by setting the following bporaexp parameters:
NB_ORA_POLICY=policyname
NB_ORA_SCHED=schedule
NB_ORA_SERV=NetBackup_server
NB_ORA_CLIENT=NetBackup_client
install_path\NetBackup\logs\bporaimp\mmddyy.log
UNIX:
/usr/openv/netbackup/logs/bporaimp/log.mmddyy
Make sure that the correct NetBackup server and NetBackup client values are
used by setting the following bporaimp parameters:
NB_ORA_SERV=NetBackup_server
NB_ORA_CLIENT=NetBackup_client
XML Archiver 338
Additional XML export and import logs
Set these parameters to the same values that were used for the XML export
operation.
4 bporaexp or bporaimp issues read or write requests to the NetBackup client,
which then transfers data to or from the NetBackup server.
bporaexp builds an SQL query for each table being archived, and it uses the
Oracle Call Interface (OCI) to run the query. The query results are translated
into XML. The XML output is passed to the NetBackup client interfaces.
bporaimp uses the reverse process. That is, XML data is restored, parsed,
and inserted into the database.
A failure here is probably due to an Oracle error, or to a NetBackup media,
network, or timeout error.
5 bporaexp or bporaimp tells the NetBackup client to close the session and
disconnects from the Oracle database.
The NetBackup client waits for the server to complete its necessary actions
(backup image verification and so on) and then exits.
install_path\NetBackup\logs\bporaexp
install_path\NetBackup\logs\bporaimp
/user/openv/netbackup/logs/bporaexp
/user/openv/netbackup/logs/bporaimp
When you use bporaexp and bporaimp and the backup images are written to an
operating system directory, the file that is specified by the LOG= parameter is the
only source of error logging and tracing.
Appendix G
Register authorized
locations
This appendix includes the following topics:
■ 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 341
Registering authorized locations used by a NetBackup database script-based policy