NBU-290216-Netbackup For Oracle Admin Guide
NBU-290216-Netbackup For Oracle Admin Guide
NBU-290216-Netbackup For Oracle Admin Guide
Release 6.5
12308316
Technical support
For technical assistance, visit http://entsupport.symantec.com and select phone or email support. Use the Knowledge Base search feature to access resources such as TechNotes, product alerts, software downloads, hardware compatibility lists, and our customer email notification service.
Contents
Chapter 1
Introduction
NetBackup for Oracle features ...........................................................................11 NetBackup for Oracle terminology ...................................................................14 XML export and XML import terms ..........................................................14 Oracle terms ..................................................................................................17 Oracle RMAN terms .....................................................................................18 NetBackup for Oracle overview .........................................................................19 RMAN .............................................................................................................20 NetBackup for Oracle XML export and XML import ..............................22
Chapter 2
Chapter 3
Chapter 4
Configuration
User interface terminology notes ..................................................................... 77 Configuring the Maximum jobs per client ....................................................... 78 Configuring a backup policy for a database .................................................... 78 Adding a new policy .................................................................................... 79 Adding schedules ......................................................................................... 80 Adding clients .............................................................................................. 86 Adding backup selections ........................................................................... 87 Configuring the runtime environment ............................................................ 89 Oracle RMAN environment ........................................................................ 91 Environment variables set by a user in the XML export parameter file ........................................................................................................... 92 Environment variables set by NetBackup for Oracle ............................. 92 Creating a bp.conf file ................................................................................. 93 Creating templates and shell scripts ................................................................ 94 Recovery Manager (RMAN) ........................................................................ 94 XML export archive ................................................................................... 100 Storing templates and shell scripts ........................................................ 105 Testing configuration settings ........................................................................ 106
Chapter 5
Using bporaimp parameters to browse XML export archives ............133 Using bplist to browse XML export archives .........................................134 Restoring an XML export archive ....................................................................135 Running the XML import wizard on the client ......................................135 Using bpdbsbora ........................................................................................137 Running an XML import script on the client .........................................137 Running bporaimp on the client ..............................................................138 Redirecting a restore of an XML export archive to a different client 144
Chapter 6
Types of backups ....................................................................................... 173 Schedule properties ................................................................................... 174 Templates and scripts ............................................................................... 175 Environment variables ............................................................................. 175
Chapter 7
Troubleshooting
General troubleshooting procedure ................................................................ 179 NetBackup reports ............................................................................................. 181 Enabling logging ........................................................................................ 182 Accessing the log files ............................................................................... 182 Setting the debug level ..................................................................................... 184 NetBackup server reports ......................................................................... 184 RMAN utility logs ...................................................................................... 184 Additional XML export and import logs ................................................. 184 Troubleshooting backup or restore errors .................................................... 185 Checking the logs to determine the source of the error ...................... 185 Troubleshooting each stage of the backup or restore .......................... 186 Troubleshooting XML export or XML import errors .................................... 188 Checking the logs to determine the source of the error ...................... 188 Troubleshooting each stage of the XML export or XML import ......... 189 Troubleshooting the browser interface and wizards ................................... 191 Troubleshooting NetBackup for Oracle with Snapshot Client ................... 192 Minimizing timeout failures on large database restores ............................ 193
Appendix A
Appendix B
Setting the maximum jobs per client global attribute .........................212 Creating directories for logging NetBackup activity ............................212 Selecting a backup method .......................................................................212 Creating notify scripts ..............................................................................213 Performing backups and restores ...................................................................217 Performing backups ..................................................................................217 Restoring backups ......................................................................................219 Troubleshooting .................................................................................................220 Checking logs ..............................................................................................220 Troubleshooting backup or restore errors .............................................221 Improving netbackup backup performance ..........................................224 Database recovery ......................................................................................224
Index
225
10
Chapter
Introduction
This chapter includes the following topics:
NetBackup for Oracle features on page 11 NetBackup for Oracle terminology on page 14 NetBackup for Oracle overview on page 19
NetBackup integrates the database backup and recovery capabilities of the Oracle Recovery Manager (RMAN) with the backup and recovery management capabilities of NetBackup. NetBackup for Oracle also allows you to export and import Oracle data in XML format for long-term archiving and retrieval. This chapter introduces NetBackup. To install, configure, and run a test backup of your Oracle database. Follow the instructions in the next chapter, NetBackup for Oracle QuickStart on page 27.
Scheduling facilities
Multiplexed backups NetBackup for Oracle lets you take advantage of NetBackups and restores multiplexing capabilities. Multiplexing directs multiple data streams to one backup device, thereby reducing the time necessary to complete the operation. Transparent Oracle and regular file system backup and restore operations All backups and restores run simultaneously and transparently without any action from the NetBackup administrator. The database administrator can run database backup and restore operations through NetBackup. Alternatively, you can use Oracles Recovery Manager (RMAN) as if NetBackup were not present. Alternatively, if you are using NetBackup for Oracle on an Oracle database, you can use RMAN as if NetBackup were not present. An administrator or any other authorized user can use NetBackup to run database backups and restores. Sharing the same storage units used for other file backups Centralized and networked backup operations It is possible to share the same devices and media used for other backups or to give Oracle exclusive use of certain devices and media. NetBackup for Oracle can use Media Manager, disk, and PureDisk storage units. From the NetBackup master server, you can schedule database backups or start them manually for any client. The Oracle databases can also reside on hosts that are different from the devices on which NetBackup stores the backups. NetBackup provides the following graphical user interfaces for client users and administrators:
Backup, Archive, and Restore user interface NetBackup administration console for Java NetBackup administration console for Windows
A database administrator or NetBackup administrator can start backup or restore operations for Oracle from the NetBackup graphical user interface on the master server.
13
Compression
Stream-based backups through both MaxDB and RMAN. File-based backups through backint. Snapshot Client backups through backint.
NetBackup for Oracle does not support compression for snapshot client backups through RMAN.
For more information on general NetBackup terminology, see the NetBackup Administrators Guide, Volume I.
Table 1-2 describes NetBackup for Oracle XML export and XML import archiving features. Table 1-2 Feature
System- and database-independent archive format
NetBackup for Oracle XML export and XML import archiving features Description
NetBackup for Oracle uses the eXtensible Markup Language (XML) standard to represent relational database table data extracted from an Oracle database. The eXtensible Markup Language (XML) is a universal format for structured documents and data. The XML 1.0 standards are produced by the World Wide Web Consortium and include the XML Schema standard. Unicode UTF-8 is the character set encoding generated by NetBackup for Oracle. UTF-8 is supported by standard XML processors and US7ASCII is a strict subset of UTF-8.
The XML Schema standard is used to describe the table data that 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. Parameter files specify the table data to include in an archive and the table data to extract from an archive for import into an Oracle database.
Command line interfaces that allow export and import at row-level granularity Restore destination option
NetBackup for Oracle can either restore XML data to an Operating System directory or import the data back into the Oracle database. The NetBackup catalog contains information on the contents of the archive that can be searched using flexible search criteria, such as tablename or user.
15
XML export
Archive
NetBackup
Process
NetBackup for Oracle extracts database table data, converts it into XML format, and stores XML data to either of the following types of repositories:
XML export
NetBackup for Oracle converts Oracle table data to XML format (XML schema, or metadata, and XML instance, or data). NetBackup stores the XML data on a NetBackup storage unit. NetBackup for Oracles XML export utility converts Oracle database table data into a self-identifying XML schema document and instance document that can be archived by NetBackup or redirected to an OS directory.
OS Directory
XML import restore
NetBackup
Process
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. NetBackup retrieves the XML-formatted data from the storage unit. NetBackup for Oracle parses XML-formatted Oracle table data and inserts data into the Oracle database. NetBackup for Oracles XML import utility can parse the XML-formatted data for re-insertion into the database or can redirect the data to an OS directory.
Restore
XML import
bporaimp command
17
Oracle terms
The following list explains some Oracle terms as they pertain to NetBackup. Term
Full backup
Definition
A full backup copies all 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. A full backup has no effect on subsequent incremental backups, which is why it is not considered part of the incremental strategy. In other words, a full backup does not affect which blocks are included in subsequent incremental backups.
Incremental backup
An incremental backup is a backup of only those blocks that have changed since a previous backup. Oracle allows you to create and restore incremental backups of data files, tablespaces, and a database. You can include a control file in an incremental backup set, but the control file is always included in its entirety. No blocks are skipped. RMAN allows you to create multilevel backups. An integer identifies each level; for example, 0, 1, 2, and so on. A level 0 incremental backup, which is the base of subsequent incremental backups, copies all blocks containing data. When you generate a level n incremental backup in which n is greater than 0, you back up the following:
All blocks that have been modified since the most recent backup at a level n or lower. This is the default type of incremental backup. It is called a differential incremental backup. All blocks that have been modified since the most recent backup at level n-1 or lower. This is called a cumulative incremental backup.
The benefit to performing multilevel incremental backups is that you do not back up all of the blocks all of the time. Incremental backups at a level greater than 0 only copy blocks that were modified, which means that the backup size can be significantly smaller and the backup might require much less time. The size of the backup file depends solely upon the number of blocks modified and the incremental backup level.
Term
Differential incremental backup
Definition
In a differential level n incremental backup, you back up all blocks that have changed since the most recent backup at level n or lower. For example, in a differential level 2 backup, you back up all blocks modified since the last level 2, level 1, or level 0 backup. Incremental backups are differential by default. In a cumulative level n incremental backup, you back up all blocks that have changed since the most recent backup at level n-1 or lower. For example, in a cumulative level 2 backup, you back up all blocks changed since the most recent level 1 or level 0 backup. Cumulative incremental backups reduce the work needed for a restore by ensuring that you only need one incremental backup from any particular level at restore time. Cumulative backups require more space and time than differential incremental backups, however, because they duplicate the work done by previous backups at the same level.
Definition
RMAN backs up, restores, and recovers database files. RMAN starts Oracle server processes on the target database. These Oracle server processes perform the backup and restore. RMAN performs backup and recovery procedures, and it greatly simplifies the tasks administrators perform during these processes. However, RMAN cannot directly manage the storage devices and media 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. Other advantages are access to NetBackups automatic scheduling facilities and the graphical interfaces. An RMAN recovery catalog or the database control file is a repository for information that is used and maintained by RMAN. RMAN uses this information to determine how to run requested backup and restore actions. For a description of the recovery catalog, see your Oracle documentation.
RMAN repository
19
Term
rman command
Definition
The rman command starts an RMAN backup or restore. Your Oracle documentation describes this command. 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. There are example RMAN shell scripts in the following directory: /usr/openv/netbackup/ext/db_ext/oracle/samples/ rman These example scripts run RMAN commands and are fully commented to explain the features used. You can review these examples and use them as a starting point for developing backup, restore, and recovery scripts.
RMAN script
Figure 1-3
Oracle database software supplies: Additional NetBackup software: Oracle Recovery Manager (RMAN) Oracle Call Interface (OCI) NetBackup client (required)
Network (TCP/IP)
NetBackup master server or remote media server NetBackup software: NetBackup master server NetBackup media server (if system is a media server)
Storage unit
RMAN
The following sections explain how RMAN works and how RMAN works with NetBackup.
21
components of the operation, such as the database objects to be backed up or restored. During a backup or restore, RMAN controls the data streams going into or out of a database. RMAN can access storage devices when it is integrated with a media management system, such as that provided by NetBackup.
NetBackup for Oracle includes a library of functions that enable RMAN to use NetBackup. To link with this library, see Linking the library on page 52. When using 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 or in the allocate channel command. NetBackup considers the backup piece name as the file being backed up, so this name must be unique in the catalog. If an Oracle 8.0.x RMAN backup uses a file name that already exists in the catalog, the original backup that has that name is deleted. In Oracle 8i or later, the RMAN backup fails with a file already exists in catalog error. For information on generating unique file names, see your Oracle documentation. Either NetBackup users or automatic schedules start database backups by specifying a template or shell script in the file list of the Oracle policy. The template or shell script specifies the backup commands that RMAN will perform on the client. For a backup: 1 2 3 The rman command starts the requested operation on the databases. 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 and transfers the database data to secondary storage.
A restore works in essentially the same manner except that RMAN issues a restore request. This 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 is the same status that is indicated by the output of the RMAN command used to run the backup or restore. This 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.
Data file and archive log backup sets and backup pieces. Data file copies. Archived redo logs and their copies. Tablespaces and data files on the target database. Stored scripts. These are named, user-created sequences of RMAN and SQL commands.
Oracle recommends you use RMAN with a recovery catalog, especially if you have 20 or more data files. However, you are not required to maintain a recovery catalog with RMAN. For information on the benefits and disadvantages of using a recovery catalog, see your Oracle documentation.
23
The XML format is used to provide a self-identifying and system-independent format ideal for database archiving.
NetBackup
Oracle DBMS
OCI Table list WHERE clause Script or template Command line (bporaexp) (Parameter file) Backup, archive, and restore 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: 1 2 3 4 5 6 7 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. Oracles OCI API executes the queries on the Oracle instance to be archived. 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.
25
Figure 1-5
XML Parser
NetBackup
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. For an XML import restore: 1 2 The NetBackup for Oracle script or template calls the bporaimp utility with a specified parameter file. The input parameters that identify the XML archive to restore are passed to NetBackup.
3 4 5
NetBackup locates and reads the set of XML schema and instance documents from the NetBackup storage unit. The XML data stream is passed to an XML parser, which passes the data to the XML data loader. The XML data loader uses Oracles OCI API to insert the data into the database.
Optionally, bporaimp allows the XML data stream to bypass the XML parser and be sent to an operating system directory. In addition, users can restore the table metadata only into an operating system directory. bporaimp also allows import from an operating system directory into Oracle.
Chapter
Installing NetBackup for Oracle on page 27 Configuring a NetBackup for Oracle policy and schedule on page 30 Backing up the Oracle database on page 33
This chapter shows how to install and configure a simple NetBackup for Oracle deployment and to run an Oracle RMAN database backup. The procedures in this chapter assume a regular Oracle RMAN backup with NetBackup for Oracle. For Snapshot Client options, see NetBackup for Oracle with Snapshot Client on page 147. For more detailed instructions, see the following chapters:
Installing the agent on page 37 Configuration on page 77 Using NetBackup for Oracle on page 109
The NetBackup version on the local machine must be the same as the NetBackup for Oracle version. For example, 6.5. The local machine can be a client or a NetBackup server that also happens to be a client. The local machine must have adequate disk space. Reserve a minimum of two megabytes of disk space in the /usr/openv/netbackup directory. More disk space might be necessary at run time.
NetBackup version 6.5 client or server software is installed and operational. This also means that the /usr/openv/netbackup directory already exists.
For a more comprehensive list of installation prerequisites, see Verifying the installation prerequisites on page 37.
If the local machine is a client, go to step 3. If the local machine is a server, go to step 2.
Make sure a valid license key for NetBackup for Oracle has been registered. To view or add license keys, perform one of the following:
Run the command /usr/openv/netbackup/bin/admincmd/get_license_key. Open the NetBackup Administration Console and choose Help > License Keys.
3 4 5
Insert the CD-ROM into the drive. Change to the working directory to the CD-ROM directory. cd /CD_mount_point Load and install the software by running the install script.
./install
Select the NetBackup Database Agent Software option. The following prompt appears: Answer y. You are presented with a menu of all database agents available on the CD-ROM. Select the NetBackup for Oracle option.
29
d e
Enter q to quit selecting options. A prompt appears asking if the list is correct. Answer y. The following actions occur:
The version file, compressed tar file, and install_dbext script are loaded to directory /usr/openv/netbackup/dbext. The install script automatically runs the install_dbext script. If install_dbext completes successfully, it writes a version file in directory /usr/openv/share that contains the version of NetBackup for Oracle that was installed.
(Conditional) Shut down all of the Oracle instances (SIDs). Perform this step if you are using an Oracle8 release. Oracle releases 9 and later do not need to perform this step. The user must connect as the SYSDBA, either using OS Authentication or Oracle Authentication (set up in the Oracle password file). The following example is for Oracle9i. a b Set the $ORACLE_SID environment variable to the first SID. Connect as SYSDBA in one of the following ways: Using OS Authentication: sqlplus /nolog connect / as sysdba shutdown immediate exit Using Oracle Authentication (via password file): sqlplus /nolog connect userid/password as sysdba shutdown immediate exit
30 NetBackup for Oracle QuickStart Configuring a NetBackup for Oracle policy and schedule
c 3
Change the $ORACLE_SID environment variable to any other SID that uses this Oracle installation, and repeat the preceding commands.
Set up automatic linking. a b Change directory to /usr/openv/netbackup/bin/ Run the oracle_link script: ./oracle_link This script determines the Oracle version level and then links Oracle to NetBackup. All output from this script is written to /tmp/make_trace.pid. To change the trace file location, change the MAKE_TRACE variable in the oracle_link script.
NetBackup for Oracle QuickStart Configuring a NetBackup for Oracle policy and schedule
31
To invoke the NetBackup Administration Console on a Windows master server This procedure shows how to invoke the Windows interface on a Windows master server. For information on invoking the Java interface on a Windows master server, see the NetBackup Administration Guide for Windows, Volume I. 1 2 Log on to the NetBackup master server as the administrator. Start the NetBackup administration console by clicking Start > All Programs > Veritas NetBackup > NetBackup Administration Console.
Complete the backup policy configuration wizard by supplying the following information: a b On the Policy Name and Type screen, select Oracle as the policy type. Click Next. On the Client List screen, click Add. Add the name of the NetBackup for Oracle client. Select the hardware and operating system. Click OK. Click Next. On the Backup Type screen, click Next to accept the defaults. On the Rotation screen, click Next to accept the defaults. On the Start Window screen, click Next to accept the defaults. Click Finish to create the policy.
c d e f 5
Proceed to To create schedules on page 32 for information on creating schedules for this policy.
32 NetBackup for Oracle QuickStart Configuring a NetBackup for Oracle policy and schedule
To create schedules Schedules determine when NetBackup for Oracle initiates a backup. An Oracle backup requires at least two different schedules:
An Application Backup schedule. When you create an Oracle policy, NetBackup for Oracle automatically creates a Default-Application-Backup schedule. An Automatic Full Backup schedule. You create this schedule. It enables scheduled backup operations on the client. Double-click the policy name. The Policy dialog appears. Click the Schedules tab. Double-click the schedule named Default-Application-Backup. By default, the NetBackup sets the following:
1 2 3
The schedule is seven days per week and 24 hours per day. This ensures that your backups can always commence. Make any changes to the Default-Application-Backup schedule if needed. 4 5 6 7 8 9 Click OK. Click New to create another schedule. Specify a unique name for the schedule. Select Automatic Full Backup as the Type of Backup. Click the Start Window tab. Follow the instructions on the Start screen to specify a time for this schedule. You must specify a time and a duration for the Automatic Full Backup schedule. Depending on the size of the database and your site conditions, an Automatic Full Backup can take a long time to complete. Choose a time when your system is not likely to be in use. For example, you might specify Sunday evenings from 1800-2300. By default, the retention period is infinity, and the frequency is once per week.
33
To log into the client and invoke the backup wizard on page 33 To back up the Oracle database using the backup wizard on page 35
To log into the client and invoke the backup wizard 1 2 3 Use operating system methods to log into the client upon which NetBackup for Oracle is installed. Make sure that the Oracle database is in the mount or open state. If this is not the case, this procedure fails. Start the NetBackup Backup, Archive, and Restore interface on the NetBackup client. Run the following command: /usr/openv/java/jbpSA & Provide the information requested by the login dialog box. For the host name, type the name of the client upon which the Oracle database and NetBackup for Oracle reside. Type your user name and password in the other fields. You can log in as a regular user. You do not have to log in as root or as the Oracle administrator. After NetBackup accepts your login information, the NetBackup administration console appears. Click the Backup Files tab.
Expand the Oracle node in the left pane by clicking the node icon to the left of Oracle. After you expand the node, you see the list of Oracle instances that you can back up. Decide whether you want to back up an entire Oracle instance or an individual Oracle instance data file.
To back up an entire Oracle instance, go to step 8. To back up an individual Oracle instance data file, go to step 9.
To back up an entire instance, perform the following steps: a b Click the check box to the left of the instance name. Proceed to step 10.
To back up individual instance data files, perform the following steps: a b Expand the instance by clicking the node icon to the left of the name of the Oracle instance data file you want to back up. (Conditional) If you are using Oracle authentication, the Database Connect Information dialog box appears. Type the Oracle administrator authentication information into the following fields:
User name: (must have SYSDBA privilege) Password: Net service name (TNS alias):
Select the data files or tablespaces in the instance that you want to back up by clicking in the checkbox to the left of each instance data files name. Proceed to step 10.
10 Click Backup. The NetBackup for Oracle backup wizard welcome screen displays.
35
To back up the Oracle database using the backup wizard Note: This procedure describes how to perform an ONLINE backup. It assumes that the Oracle databases archiving mode is set to ARCHIVELOG. 1 Invoke the backup wizard. The procedure in To log into the client and invoke the backup wizard on page 33 describes how to invoke this wizard. If you just completed that procedure, the backup wizard is displayed on your screen at this time. Click Next. The Target Database Logon Credentials dialog box displays. Fill in the fields in this dialog box, as follows:
If you use OS authentication for Oracle, select OS Authentication. If you use Oracle authentication via a password file, select Oracle_Authentication and supply the following:
A User name A Password with Oracle SYSDBA privileges (Optional) A Net service name (TNS alias)
(Optional) Select Use Oracle RMAN recovery catalog. This is not required. If this is your first NetBackup for Oracle backup, you can leave this option unselected. If you did not choose to use the recovery catalog, skip to step 4.
Click Next. If you chose to use the recovery catalog, you see the Recovery Catalog Logon Credentials screen. Supply the appropriate User name and Password for the recovery catalog. Click Next. The Archived Redo Logs screen displays. Click Next to accept all defaults. The Configuration Options screen displays. Click Next to accept all defaults. The Backup Options screen displays. Click Next to accept all defaults. The Database State screen displays. Click Next to accept all defaults. The NetBackup Configuration Variables screen displays. In the Backup policy name field, enter the name of the Oracle policy you created on the NetBackup master server. Click Next. The Backup Limits screen displays.
4 5 6 7 8
10 Click Next to accept all defaults. The Template Summary screen displays. 11 Click Perform backup immediately after wizard finishes.
12 To start the backup, click Finish. An ONLINE backup of your Oracle database begins. A NetBackup message window displays that the backup was successfully initiated. To check the progress of the backup in the Backup, Archive, and Restore status window, choose Yes in the message window.
Chapter
Verifying the installation prerequisites on page 37 Installing NetBackup for Oracle on page 39 Linking the Oracle Recovery Manager (RMAN) with NetBackup on page 50 About the Oracle recovery catalog on page 76
Perform the procedures in this chapter before you configure NetBackup for Oracle.
For information on supported cluster environments for NetBackup for Oracle, see NetBackup (tm) x.x Cluster Compatibility (updated date). 5 6 Click the link for the PDF document, which is a downloadable file that enables you to view the supported database spreadsheet for this release. Read the document and verify that the software in your environment is compatible with the NetBackup and the database agent.
NetBackup software
Verify that the following requirements are met for the NetBackup server and client software:
The NetBackup server software is installed and operational on the NetBackup server. The NetBackup server platform can be any that NetBackup supports. For installation information, see the NetBackup Installation Guide. The version of the NetBackup client and the version of the database agent you want to install must be the same (for example, 6.5). There must be adequate disk space on each machine upon which you want to install the database agent. Less than two megabytes of additional disk space is required in the /usr/openv/netbackup directory. However, more disk space might be needed at run time. Make sure that you configure any backup media that the storage unit uses. The amount of backup media that is required depends on the devices that are used, the sizes of the databases that you want to back up, the amount of data that you want to archive, the size of your backups, and the frequency of backups or archives. For information on using Media Manager, see the NetBackup Administrators Guide, Volume I.
Database software
Verify the following regarding the database software on the NetBackup client:
Oracle vendor software must be installed and operational. One or more Oracle instances must exist. For all Oracle 8 releases, make sure you have shut down the Oracle database. For more information about when you need to perform this step, see your Oracle documentation.
39
Cluster software
Verify the following requirements if you are installing the database agent software on a NetBackup server configured in a NetBackup cluster:
The Oracle vendor software is installed and operational on each node to which NetBackup can failover. The NetBackup server software is installed and configured to work in a NetBackup cluster. Follow the instructions in the NetBackup Installation Guide, including running the cluster_config script after the NetBackup server software has been installed. You only need to run the cluster_config script after you install the NetBackup server software. You do not need to run cluster_config after installing the database agent on a NetBackup server that is part of a NetBackup cluster.
Make sure you install the NetBackup client software and the database agent software on each node to which NetBackup can failover. Run commands such as bpplclients and update_dbclients from the active NetBackup master or media server. To perform a remote installation where you push the database agent software to clients located in a cluster, specify the individual node names in the client list, not the virtual names.
A remote installation. The user loads the software onto a master server or a media server and then pushes the database software out to the clients. You can perform an initial or upgrade remote installation in this manner. Remote installation of NetBackup for Oracle on page 39 describes this procedure. A local installation. The user loads and installs the software onto the local machine only. Local installation of NetBackup for Oracle on page 47 describes this procedure.
Log in as the root user on the master server or media server. If you are already logged in, but are not the root user, run the following command:
su - root
Verify that a registered and valid license key for NetBackup for Oracle resides on the master server. You can obtain master server license information from either the master server or the media server. To view or add license keys, perform one of the following actions:
From the master server or media server, run the following command: /usr/openv/netbackup/bin/admincmd/get_license_key When the system prompts you, type the host name of the NetBackup master server.
Open the NetBackup administration console and choose Help > License Keys. If the NetBackup master server is part of a NetBackup cluster, the license key must be registered on each node. Mount the CD-ROM. For more information on how to mount a CD-ROM, see the NetBackup Installation Guide.
41
Change the working directory to the CD-ROM directory. For example: cd /CD_mount_point Run the install script to load and install the software. For example: ./install a Select the NetBackup Database Agent Software option. The following prompt appears:
Do you want to do a local installation? (y/n) [n]
b c d e
Type n. Select the NetBackup for Oracle option. Type q to quit selecting options. A prompt appears that asks if the list is correct. Type y. The install script identifies the types of client software that is loaded during the installation of the NetBackup server. By default, any matching NetBackup for Oracle software is automatically loaded. If there are more platforms available, the script displays a menu that gives you the opportunity to add more client types to the default list. After the list is complete, the installation script copies the database agent version files and the install_dbext script to directory /usr/openv/netbackup/dbext. (These files are tar(1) files compressed with gzip(1).)
(Conditional) Select another node upon which to install the software. Perform this step under the following circumstances:
If you want to install the NetBackup for Oracle software on a server that is part of a NetBackup cluster. and
If you have any nodes that still need the software installed. If there are any inactive nodes that do not yet have the software installed, select one of these inactive nodes. Then repeat step 3 through step 8 for that node. If you installed the software on all the inactive nodes, select the active node and repeat step 3 through step 8 for that node. If you installed on all the nodes, proceed to step 9.
(Conditional) Unfreeze the active node. Perform this step if you want to install the NetBackup for Oracle software on a server that is part of a NetBackup cluster. The last step in the
installation process is to unfreeze the active node. Unfreeze the active node only after all the software is installed on all nodes. For information on how to unfreeze the active node in your specific cluster environment, see the NetBackup High Availability Administrators Guide. 10 Decide how you want to distribute the NetBackup for Oracle software to the clients. Use one of the following methods whether you want to upgrade clients in an existing environment or you want to perform a new installation:
Distribute to all clients currently specified in the database policy. This method distributes the NetBackup for Oracle software to all clients that are currently included in the database policy. You can use this method only if you want to push from a master server. For information on this method, see Pushing the software to all clients on page 42. Distribute to selected clients. This method distributes the NetBackup for Oracle software to selected clients only. If you want to perform a new installation and you plan to add clients to a database policy after you install the software. You can install the software on such clients now and configure the policy later. This method also allows you to skip any clients that you do not want to upgrade to 6.5 at this time. You can use this method whether you want to push from a master server or from a media server. For information on this method, seePushing the software to new or selected clients on page 45.
Note: Make sure that the NetBackup for Oracle version is the same version as the NetBackup client software.
43
Note: If you want to push the database agent software from a server that is part of a NetBackup cluster to an inactive node in the cluster, you need to force the installation to the inactive node. 1 Run the update_dbclients command to launch the installation script. Type the following command: Examine the client list that the update_dbclients command returns. a Locate the client list. The update_dbclients command compiles a list of clients that it detects are included in the policy. It presents this list to you. If 9 or fewer clients are in the client list, update_dbclients displays all the client names. If 10 or more clients are on the client list, update_dbclients writes the first 9 to standard output. It writes the entire list to $TMPDIR/NB_DBCLIENT_LIST.identifier. identifier is a mix of date, time, and process identifier information. The TMPDIR environment variable is defined as /tmp. Check the client list. The host names of the clients must be the clients individual node names. They cannot be virtual names. The hostname(1) and the domainname(1) commands return the correct value for the individual node names. The format can be either hostname or hostname.domainname. If the client list contains virtual names, you cannot complete this procedure. Do one of the following:
To exit this procedure if there are two or more clients, press the Enter key. Then type n to stop the upgrade and exit from this installation dialog box. To install the software in this situation, use Pushing the software to new or selected clients on page 45.
To exit this procedure if there is only one client, type n. To install the software in this situation, use Pushing the software to new or selected clients on page 45. If the client list contains only individual node names, proceed to the following step.
If update_dbclients detects that it cannot update a particular client, it does not include the name of that client in the client list. Such clients are skipped for one or more of the following reasons:
The client is a PC client. You cannot install or upgrade NetBackup for Oracle on a PC client from a UNIX server. The database agent does not support the client's platform type. The database agent software for that client type was not loaded onto the server. (In the procedure To load the database agent files on a UNIX server on page 40.) The client does not belong to the database policy type. The skipped client list is in $TMPDIR/skipped_clients.PID, where PID is the process identifier. The TMPDIR environment variable is defined as /tmp. If no file is present, no clients were skipped.
(Conditional) Specify the number of simultaneous client updates. If you want to update more than one client, the installation software displays the number of updates that are required to distribute the software to the clients. If the software detects the need to update more than one client, it displays the following prompt:
Enter the number of simultaneous updates you wish to take place. [1 - max] (default: dflt) max The maximum number of simultaneous updates that is allowed. The value that is displayed ranges from 1 to 30. The number the program uses if you press Enter without specifying a number. The value that is displayed ranges from 1 to 15.
dflt
If you want the installation software to perform dflt simultaneous updates, press Enter. You can specify a different number of simultaneous updates. Indicate a number that is greater or equal to 1 and less than or equal to the max, then press Enter. For example, if three clients are to be updated, the max and dflt values are 3. If 50 clients are to be updated, the max value is 30, and the dflt value is 15. update_dbclients starts the number of updates that you specify. This number may be less than the total number of client updates to be performed. If so, new updates start as the previous updates finish until all of the updates have been completed. 4 Indicate whether or not you want to upgrade the clients at this time.
45
Based on your answer, the time it takes to update the clients appears, followed by this question:
Do you want to upgrade the clients now? (y/n) [y]
Type y or n for the prompt. If you type n, update_dbclients quits and leaves the list of clients it would have updated in a file. You can use this file later as the argument to the -ClientList parameter. By default, the installation software writes the client list to $TMPDIR/NB_DBCLIENT_LIST.identifier, where identifier is a mix of date, time, and process identifier information. The TMPDIR environment variable is defined as /tmp. If you type y, you continue the installation process. The following actions occur:
The update_dbclients command distributes the software to the client. If it is successful, update_dbclients invokes the install_dbext script on the client. The install_dbext script runs on each client. If it is successful, it writes a version file in directory /usr/openv/share that contains the version of NetBackup for Oracle that was installed. The update_dbclients command displays a note on whether the update was successful for each client. When the update_dbclients command completes, it displays a file name that contains a complete log of what happened for each client. If the update failed for any client, examine the log file to determine the problem.
Note: If you want to push the database agent software from a server that is part of a NetBackup cluster to an inactive node in the cluster, you need to force the installation to the inactive node.
On the master server, type the following command to ensure that the bpdbm daemon is running: /usr/openv/netbackup/bin/bpps If the output shows that the bpdbm daemon is not running, type the following command to start the daemon: /usr/openv/netbackup/bin/initbpdbm Type the following command to change to the NetBackup bin directory: cd /usr/openv/netbackup/bin Use the bpplclients(1M) command to create a file that contains a list of clients currently configured in the NetBackup database. The options for this command depend on whether you want to install from a master server or from a media server, as follows:
2 3
If you want to perform the install from the master server, type the following command:
./admincmd/bpplclients -allunique -noheader > file
If you want to perform the install from a media server, type the following command:
./admincmd/bpplclients -allunique -noheader -M ms_name > file ms_name file Name of the NetBackup master server in this environment. Name of the file to contain the list of unique clients. If no clients have been configured in the NetBackup database, file is empty. Create file using the same format as that generated by bpplclients.
bpplclients writes output to file in the following format: hardware op_system client
hardware The hardware name. For examples, type the ls(1) command in directory /usr/openv/netbackup/client. The operating system name. For examples, type the ls(1) command in directory /usr/openv/netbackup/client/hardware. The name of the client.
op_system
client
For example, file might contain a line like the following: Solaris Solaris8 curry 4 (Optional) Edit file. Perform this step to change the contents of file. Edit file to contain only those clients you want to update with NetBackup for Oracle software.
47
The host names of the clients must be the clients individual node names. They cannot be virtual names. The hostname(1) and the domainname(1) commands return the correct value for the individual node names. The format can be either hostname or hostname.domainname. 5 Run the update_dbclients command to install the software. Specify the file you created in step 3 as the argument to update_dbclients. The command installs the software on the clients that are listed in file. For example: ./update_dbclients Oracle -ClientList file Answer questions as prompted by the update_dbclients command. The update_dbclients command initiates a dialog with you. It asks you to confirm actions during the update process and presents options to you if there are choices to be made. For more information, see step 2 of the procedure To push the software to all clients on page 42.
Note: You do not need to run the cluster_config script after you install the database agent on a server that is part of a NetBackup cluster.
In the next step, you log in to the first machine and start the installation process. Because you need to perform the installation on all inactive nodes first, make sure that the first machine you select is an inactive node. 3 Log in as the root user on the machine. If you are already logged in, but are not the root user, run the following command. su - root (Conditional) Log into a media server or the master server. Perform this step if the local machine is a NetBackup client. Verify that a registered and valid license key for NetBackup for Oracle resides on the master server. You can obtain master server license information from either the master server or the media server. To view or add license keys, perform one of the following actions:
4 5
From the master server or media server, type the following command: /usr/openv/netbackup/bin/admincmd/get_license_key When the system prompts you, type the host name of the NetBackup master server.
Open the NetBackup administration console and choose Help > License Keys. If the NetBackup master server is part of a NetBackup cluster, the license key must be registered on each node. (Conditional) Log out of the media server or master server and return to the local client. Perform this step if you logged into a media server or the master server in step 4 to verify the license. Mount the CD-ROM. For more information on how to mount a CD-ROM, see the NetBackup Installation Guide. Change the working directory to the CD-ROM directory. For example: cd /CD_mount_point Run the install script to load and install the software.
Note: Make sure that the NetBackup for Oracle version is the same version as the NetBackup client software.
49
Type the following command: ./install a Select the NetBackup Database Agent Software option. The following prompt appears:
Do you want to do a local installation? (y/n) [n]
b c d e
Type y. A menu of all database agents available on the CD-ROM appears. Select the NetBackup for Oracle option. Type q to quit if you do not want to select other options. A prompt appears that asks if the list is correct. Type y. The following actions occur:
The script writes the version file, a tar(1) file compressed with gzip(1), and the install_dbext script to directory /usr/openv/netbackup/dbext. The install script automatically runs the install_dbext script. If install_dbext completes successfully, it writes a version file in directory /usr/openv/share that contains the version of NetBackup for Oracle that was installed.
Note: You do not need to run the cluster_config script after you install NetBackup for Oracle on a server that is part of a NetBackup cluster. 10 (Conditional) Select another node upon which to install the software. Perform this step under the following circumstances:
If you want to install the NetBackup for Oracle software on a server that is part of a NetBackup cluster. and
If you have any nodes that still need the software installed. If there are any inactive nodes that do not yet have the software installed, select one of these inactive nodes. Then repeat step 3 through step 10 for that node. If you installed the software on all the inactive nodes, select the active node and repeat step 3 through step 10 for that node. If you installed on all the nodes, proceed to step 11.
50 Installing the agent Linking the Oracle Recovery Manager (RMAN) with NetBackup
Perform this step to install the NetBackup for Oracle software on a server that is part of a NetBackup cluster. The last step in the installation process is to unfreeze the active node. Unfreeze the active node only after all the software has been installed on all nodes. For information on how to unfreeze the active node in your specific cluster environment, see the NetBackup High Availability Administrators Guide.
Installing the agent Linking the Oracle Recovery Manager (RMAN) with NetBackup
51
NetBackup API libraries Oracle Library Name libobk.so.1 libobk.so64.1 libobk.so.1 libobk.so.1
Solaris (SPARC) and Digital 32-bit UNIX Solaris (SPARC) Solaris (Opteron) Tru64 64-bit 64-bit 64-bit
Definition
The directory path to the Oracle software location. The name of the Oracle instance.
2 3
(Conditional) Enter commands to shut down all Oracle instances (SIDs). Perform this procedure only for the Oracle 8 releases. a b Set the ORACLE_SID environment variable to the first SID. Type the following commands to shut down Oracle: svrmgrl connect internal shutdown exit Change the ORACLE_SID environment variable to any other SID that uses this Oracle installation and repeat the commands in step b.
c 4
Determine whether to restart Oracle and resume operations or to link the library.
If you are upgrading an existing NetBackup for Oracle installation, restart the Oracle instance you stopped before you ran the update_dbclients command and then resume operations.
52 Installing the agent Linking the Oracle Recovery Manager (RMAN) with NetBackup
If you are performing an initial installation, follow the instructions in Linking the library on page 52. This section describes both an automatic and a manual method. The automatic method is preferred.
To link automatically
Run the oracle_link script located in /usr/openv/netbackup/bin/. This script determines the Oracle version level and then links Oracle with the NetBackup API library. This script writes output to /tmp/make_trace.<pid>. To change the trace file location, change the MAKE_TRACE variable in the oracle_link script.
To link manually
Follow the instructions in one of the following platform-specific subsections: For Oracle8 and Oracle8i:
Manually linking AIX (32-bit or 64-bit) using 32-bit Oracle8i software on page 54 Manually linking AIX (64-bit) using 64-bit Oracle8i software on page 55 Manually linking HP-UX (32-bit or 64-bit) using 32-bit Oracle8 or Oracle8i software on page 56 Manually linking HP-UX (64 bit) using 64-bit Oracle8 or Oracle8i software on page 58 Manually linking IRIX (64-bit) using 64-bit Oracle8 or Oracle8i software on page 60 Manually linking Solaris (32-bit or 64-bit) using 32-bit Oracle8 or Oracle 8i software on page 62 Manually linking Solaris (64-bit) using 64-bit Oracle 8i software on page 64
Installing the agent Linking the Oracle Recovery Manager (RMAN) with NetBackup
53
Manually linking Tru64/Digital UNIX (OSFI) using Oracle8 or Oracle8i software on page 65 Oracle9i and Oracle10g:
Manually linking AIX using 64-bit Oracle9i or later software on page 67 Manually linking HP-UX (64-bit) using 64-bit Oracle9i or later software on page 68 Manually linking Linux (32-bit) and Linux IA-64 using Oracle9i or later software on page 69 Manually linking Linux (64-bit) using Oracle9i or later software on page 70 Manually linking IBM pSeries using Oracle 10g R2 or later software on page 71 Manually linking Solaris (32-bit or 64-bit) using 32-bit Oracle9i or later software on page 72 Manually linking Solaris (Opteron, 64-bit) using 64-bit Oracle9i or later software on page 73 Manually linking Solaris (SPARC, 64-bit) using 64-bit Oracle9i or later software on page 74 Manually linking Tru64/Digital UNIX (OSFI) using Oracle9i or later software on page 75
Note: If you are using a later Oracle release, you do not have to use the make(1) command to make a new Oracle executable to use the NetBackup for Oracle API library because the Oracle executable always searches for the shared library (for example, $ORACLE_HOME/lib/libobk.so). The instructions in the following subsections reflect this change and describe the conditions under which you need to issue the make(1) command.
54 Installing the agent Linking the Oracle Recovery Manager (RMAN) with NetBackup
In the C shell, edit the Oracle user's .cshrc file to include the following line:
setenv LIBPATH $ORACLE_HOME/lib:$LIBPATH
In the Bourne or Korn shells, edit the Oracle user's .profile file to include the following lines:
LIBPATH=$ORACLE_HOME/lib:$LIBPATH export LIBPATH
2 3
Type the following ls(1) command to determine whether the Oracle library exists:
ls -l libobk.a
(Conditional) Use the mv(1) command to move the Oracle library to an alternate location. Perform this step if the output from step 3 shows that libobk.a is present. For example:
mv libobk.a libobk.a.orig
Installing the agent Linking the Oracle Recovery Manager (RMAN) with NetBackup
55
In the C shell, edit the Oracle user's .cshrc file to include the following line:
setenv LIBPATH $ORACLE_HOME/lib:$LIBPATH
In the Bourne or Korn shells, edit the Oracle user's .profile file to include the following lines:
LIBPATH=$ORACLE_HOME/lib:$LIBPATH export LIBPATH
2 3
Type the following ls(1) command to determine whether the Oracle library exists:
ls -l libobk.a
(Conditional) Use the mv(1) command to move the Oracle library to an alternate location. Perform this step if the output from step 3 shows that libobk.a is present. For example:
mv libobk.a libobk.a.orig
56 Installing the agent Linking the Oracle Recovery Manager (RMAN) with NetBackup
Manually linking HP-UX (32-bit or 64-bit) using 32-bit Oracle8 or Oracle8i software
To link manually 1 Set the Oracle user's library search path. To prevent linking and runtime load errors, put $ORACLE_HOME/lib in the Oracle user's library search path. If $ORACLE_HOME/lib is not in the search path, the NetBackup API shared library, libobk, is not found when linking, and a runtime load error is issued when an application, such as svrmgrl, is run. Set the SHLIB_PATH environment variable as follows:
In the C shell, edit the Oracle user's .cshrc file to include the following line:
setenv SHLIB_PATH $ORACLE_HOME/lib:$SHLIB_PATH
In the Bourne or Korn shells, edit the Oracle user's .profile file to include the following lines:
SHLIB_PATH=$ORACLE_HOME/lib:$SHLIB_PATH export SHLIB_PATH
2 3
Type the following ls(1) command to determine whether the Oracle library exists:
ls -l libobk.sl
(Conditional) Use the mv(1) command to move the Oracle library to an alternate location. Perform this step if the output from step 3 shows that libobk.sl is present. For example:
mv libobk.sl libobk.sl.orig
5 6
Type the following ln(1M) command to create a new link: ln -s /usr/openv/netbackup/bin/libobk.sl libobk.sl (Conditional) Make a new Oracle executable. Perform this step if you are using Oracle8 releases 8.0.4, 8.0.5, 8.0.5.1, or 8.0.6. a b Type the following cd(1) command to change directories: cd $ORACLE_HOME/rdbms/lib Use the make(1) command to create a new executable. This step differs depending on your Oracle release level. Make sure to use the quotation marks ( " " ) as shown.
Installing the agent Linking the Oracle Recovery Manager (RMAN) with NetBackup
57
On Oracle8 releases 8.0.5, 8.0.5.1, and 8.0.6 for HP-UX 10.20 9000/816, type the following command and make sure to include the LIBMM= at the end: On Oracle8 releases 8.0.5, 8.0.5.1, and 8.0.6 for HP-UX 11.00 9000/879, type the following command:
58 Installing the agent Linking the Oracle Recovery Manager (RMAN) with NetBackup
Manually linking HP-UX (64 bit) using 64-bit Oracle8 or Oracle8i software
To link manually 1 Set the Oracle user's library search path. To prevent linking and runtime load errors, put $ORACLE_HOME/lib in the Oracle user's library search path. If $ORACLE_HOME/lib is not in the search path, the NetBackup API shared library, libobk, is not found when linking, and a runtime load error is issued when an application, such as svrmgrl, is run. Set the SHLIB_PATH environment variable as follows:
In the C shell, edit the Oracle user's .cshrc file to include the following line: setenv SHLIB_PATH $ORACLE_HOME/lib:$SHLIB_PATH In the Bourne or Korn shells, edit the Oracle user's .profile file to include the following lines: SHLIB_PATH=$ORACLE_HOME/lib:$SHLIB_PATH export SHLIB_PATH
Use the cd(1) command to change directories. This step differs depending on your Oracle release level.
On Oracle8 release 8.0.5.1, type the following command: cd $ORACLE_HOME/lib On Oracle8 release 8.0.6 and on Oracle8i releases 8.1.6 and 8.1.7, type the following command: cd $ORACLE_HOME/lib64
3 4
Type the following command to determine whether the Oracle library exists:
ls -l libobk.*
(Conditional) Use the mv(1) command to move the Oracle library to an alternate location. Perform this step if the output from step 3 shows that libobk.sl or libobk.a are present. For example:
mv libobk.a libobk.a.orig mv libobk.sl libobk.sl.orig
5 6
Type the following ln(1M) command to create a new link: ln -s /usr/openv/netbackup/bin/libobk.sl64 libobk.sl (Conditional) Make a new Oracle executable. Perform this step if you are using Oracle8 release 8.0.5.1 or 8.0.6. a Type the following cd(1) command to change directories: cd $ORACLE_HOME/rdbms/lib
Installing the agent Linking the Oracle Recovery Manager (RMAN) with NetBackup
59
Use the make(1) command to create a new executable. This step differs depending on your Oracle release level. Make sure to use the quotation marks (" ") as shown.
On Oracle 8.0.5.1, type the following command: On Oracle 8.0.6, type the following command:
60 Installing the agent Linking the Oracle Recovery Manager (RMAN) with NetBackup
In the C shell, edit the Oracle user's .cshrc file to include the following line: setenv LD_LIBRARY_PATH $ORACLE_HOME/lib:$LD_LIBRARY_PATH In the Bourne or Korn shells, edit the Oracle user's .profile file to include the following lines: LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH
2 3
Determine whether the Oracle library exists. This step differs depending on your Oracle release level.
On Oracle8i release 8.1.6, type the following commands: ls -l libobk.so ls -l libobk.so64 On Oracle8i release 8.1.7, type the following command: ls -l libobk.so
(Conditional) Use the mv(1) command to move the Oracle libraries to alternate locations. Perform this step if the output from step 3 shows that libobk.so or libobk.so64 are present. Perform this step if the output from step 3 shows that libobk.so is present. This step differs depending on your Oracle release level.
On Oracle8i 8.1.6, type the following commands: mv libobk.so libobk.so.orig mv libobk.so64 libobk.so64.orig On Oracle8i 8.1.7, type the following command: mv libobk.so libobk.so.orig
Installing the agent Linking the Oracle Recovery Manager (RMAN) with NetBackup
61
Use the ln(1M) command to create a new link. This step differs depending on your Oracle release level. On Oracle8i release 8.1.6, type the following command: ln -s /usr/openv/netbackup/bin/libobk.so64 libobk.so64
(Conditional) Create a new Oracle executable. Perform this step if you are using Oracle8i release 8.1.6. a b Type the following cd(1) command to change directories: cd $ORACLE_HOME/lib As the Oracle owner, type the following command to create the compiler.defaults file: Set the COMPILER_DEFAULTS_PATH environment variable. In the C shell, type the following: setenv COMPILER_DEFAULTS_PATH $ORACLE_HOME/lib In the Bourne or Korn shells, enter the following: COMPILER_DEFAULTS_PATH=$ORACLE_HOME/lib export COMPILER_DEFAULTS_PATH Type the following command to change to the rdbms/lib directory: cd $ORACLE_HOME/rdbms/lib Type the following command to create the new executable:
d e
62 Installing the agent Linking the Oracle Recovery Manager (RMAN) with NetBackup
Manually linking Solaris (32-bit or 64-bit) using 32-bit Oracle8 or Oracle 8i software
To link manually 1 2 Type the following cd(1) command to change directories:
cd $ORACLE_HOME/lib
Determine whether the Oracle library exists. This step differs depending on your Oracle release level.
On Oracle8 releases 8.0.5, 8.0.5.1, 8.0.6 or Oracle8i releases 8.1.5, 8.1.7, type the following command: ls -l libobk.so On Oracle8i release 8.1.6, type the following command: ls -l libdsbtsh8.so
(Conditional) Use the mv(1) command to move the Oracle library to an alternate location. Perform this step if the output from step 2 shows that libobk.so or libdsbtsh8.so are present. This step differs depending on your Oracle release level.
On Oracle8 releases 8.0.5, 8.0.5.1, 8.0.6 or Oracle8i releases 8.1.5, 8.1.7, type the following command: mv libobk.so libobk.so.orig On Oracle8i release 8.1.6, type the following command: mv libdsbtsh8.so libdsbtsh8.so.orig
Use the ln(1M) command to create a new link. This step differs depending on your Oracle release level.
On Oracle8 releases 8.0.5, 8.0.5.1, 8.0.6 or Oracle8i releases 8.1.5, 8.1.7, type the following command: ln -s /usr/openv/netbackup/bin/libobk.so.1 libobk.so
(Conditional) Make a new Oracle executable. Perform this step only if you are using Oracle8 releases 8.0.5, 8.0.5.1, 8.0.6 or Oracle 8i release 8.1.6. a b Type the following cd(1) command to change directories: cd $ORACLE_HOME/rdbms/lib Use the make(1) command to create a new executable. This step differs depending on your Oracle release level. Make sure to enter the command as shown.
Installing the agent Linking the Oracle Recovery Manager (RMAN) with NetBackup
63
On Oracle8 releases 8.0.5, 8.0.5.1, 8.0.6, type the following command: make -f ins_rdbms.mk ioracle On Oracle8i release 8.1.6, type the following command: make -f ins_rdbms.mk ioracle LLIBOBK=-lobk
64 Installing the agent Linking the Oracle Recovery Manager (RMAN) with NetBackup
Determine whether the Oracle library exists. This step differs depending on your Oracle release level.
On Oracle8i release 8.1.6, type the following command: ls -l libdsbtsh8.so On Oracle8i release 8.1.7, type the following command: ls -l libobk.so
(Conditional) Use the mv(1) command to move the Oracle library to an alternate location. Perform this step if the output from step 2 shows that libdsbtsh.so or libobk.so are present. This step differs depending on your Oracle release level.
On Oracle8i release 8.1.6, type the following command: mv libdsbtsh8.so libdsbtsh8.so.orig On Oracle8i release 8.1.7, type the following command: mv libobk.so libobk.so.orig
Use the ln(1M) command to create a new link. This step differs depending on your Oracle release level.
ln -s /usr/openv/netbackup/bin/libobk.so64.1 libdsbtsh8.so On Oracle8i release 8.1.7, type the following command: ln -s /usr/openv/netbackup/bin/libobk.so64.1 libobk.so
(Conditional) Make a new Oracle executable. Perform this step only if you are using Oracle8i release 8.1.6. a b Type the following cd(1) command to change directories: cd $ORACLE_HOME/rdbms/lib Type the following make(1) command to create a new executable: make -f ins_rdbms.mk ioracle LLIBOBK=-lobk
Installing the agent Linking the Oracle Recovery Manager (RMAN) with NetBackup
65
In the C shell, edit the Oracle user's .cshrc file to include the following line: setenv LD_LIBRARY_PATH $ORACLE_HOME/lib:$LD_LIBRARY_PATH In the Bourne or Korn shells, edit the Oracle user's .profile file to include the following lines: LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH
2 3
Type the following ls(1) command to determine whether the Oracle library exists:
ls -l libobk.*
(Conditional) Use the mv(1) command to move the Oracle library to an alternate location. Perform this step if the output from step 3 shows that libobk.so or libobk.a are present. Type one or both of the following commands:
mv libobk.a libobk.a.orig mv libobk.so libobk.so.orig
Use ln(1M) commands to create a new link. This platform requires two symbolic links. RMAN searches for libobk.so.1, but other applications search for libobk.so. Type the following commands: ln -s /usr/openv/netbackup/bin/libobk.so.1 libobk.so.1 ln -s libobk.so.1 libobk.so (Conditional) Make a new Oracle executable. Perform this step if you are using Oracle8 release 8.0.6 or Oracle 8i release 8.1.5. This step differs depending on your Oracle release level.
66 Installing the agent Linking the Oracle Recovery Manager (RMAN) with NetBackup
On Oracle8i release 8.1.5, type only one of the following two command sets:
The following commands use the provided relinking script to create a new Oracle executable. This is the preferred method: cd $ORACLE_HOME/bin relink oracle The following commands use the make(1) command to create a new Oracle executable:
Type the following odump(1) command, which shows the timestamp and checksum, to verify that the library is linked:
odump -Dl oracle ***LIBRARY LIST SECTION*** Name Time-Stamp CheckSum oracle: libobk.so.1 Aug 31 09:00:16 1999 0xe22db854 libjox8.so Mar 9 12:04:42 1999 0xae77f433 libexc.so Dec 29 17:09:57 1997 0x3184247e librt.so Dec 29 17:20:24 1997 0x3f3d024b libaio_raw.so Jan 5 14:40:38 1998 0x568dc639 libm.so Dec 29 17:09:53 1997 0xf29b0962 libxti.so Dec 29 17:20:11 1997 0x89ffa69d libc.so Dec 29 17:09:30 1997 0x5e955f9b
Installing the agent Linking the Oracle Recovery Manager (RMAN) with NetBackup
67
Type the following ls(1) command to determine whether the Oracle library exists:
ls -l libobk.*
(Conditional) Use the mv(1) command to move the Oracle library to an alternate location. Perform this step if the output from step 2 shows that libobk.a exists. For example:
mv libobk.a libobk.a.orig
Type the following ln(1M) command to create a new link: ln -s /usr/openv/netbackup/bin/libobk.a64 libobk.a
68 Installing the agent Linking the Oracle Recovery Manager (RMAN) with NetBackup
Type the following ls(1) command to determine whether the Oracle library exists:
ls -l libobk.*
(Conditional) Use the mv(1) command to move the Oracle library to an alternate location. Perform this step if the output from step 2 shows that libobk.sl or libobk.a are present.
If libobk.sl exists, type the following command: mv libobk.sl libobk.sl.orig If libobk.a exists, type the following command: mv libobk.a libobk.a.orig
libobk.sl
Installing the agent Linking the Oracle Recovery Manager (RMAN) with NetBackup
69
Manually linking Linux (32-bit) and Linux IA-64 using Oracle9i or later software
Use this procedure for Oracle9i or later releases. To link manually 1 2 Type the following cd(1) command to change directories:
cd $ORACLE_HOME/lib
Type the following ls(1) command to determine whether the Oracle library exists:
ls -l libobk.so
(Conditional) Use the mv(1) 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
Type the following ln(1) command to create a new link: ln -s /usr/openv/netbackup/bin/libobk.so libobk.so
70 Installing the agent Linking the Oracle Recovery Manager (RMAN) with NetBackup
Type the following ls(1) command to determine whether the Oracle library exists:
ls -l libobk.so
(Conditional) Use the mv(1) 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
Type the following ln(1) command to create a new link: ln -s /usr/openv/netbackup/bin/libobk.so64 libobk.so
Installing the agent Linking the Oracle Recovery Manager (RMAN) with NetBackup
71
Type the following ls(1) command to determine whether the Oracle library exists:
ls -l libobk.so
(Conditional) Use the mv(1) 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
Type the following ln(1) command to create a new link: ln -s /usr/openv/netbackup/bin/libobk.so libobk.so
72 Installing the agent Linking the Oracle Recovery Manager (RMAN) with NetBackup
Manually linking Solaris (32-bit or 64-bit) using 32-bit Oracle9i or later software
Use this procedure for Oracle9i or later releases. To link manually 1 2 Type the following cd(1) command to change directories:
cd $ORACLE_HOME/lib
Type the following ls(1) command to determine whether the Oracle library exists:
ls -l libobk.so
(Conditional) Use the mv(1) 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
Type the following ln(1) command to create a new link: ln -s /usr/openv/netbackup/bin/libobk.so.1 libobk.so
Installing the agent Linking the Oracle Recovery Manager (RMAN) with NetBackup
73
Manually linking Solaris (Opteron, 64-bit) using 64-bit Oracle9i or later software
Use this procedure for Oracle 9i or later releases. To link manually 1 2 Type the following cd(1) command to change directories:
cd $ORACLE_HOME/lib
Type the following ls(1) command to determine whether the Oracle library exists:
ls -l libobk.so
(Conditional) Use the mv(1) 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
Type the following ln(1) command to create a new link: ln -s /usr/openv/netbackup/bin/libobk.so.1 libobk.so
74 Installing the agent Linking the Oracle Recovery Manager (RMAN) with NetBackup
Manually linking Solaris (SPARC, 64-bit) using 64-bit Oracle9i or later software
Use this procedure for Oracle 9i or later releases. To link manually 1 2 Type the following cd(1) command to change directories:
cd $ORACLE_HOME/lib
Type the following ls(1) command to determine whether the Oracle library exists:
ls -l libobk.so
(Conditional) Use the mv(1) 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
Type the following ln(1) command to create a new link: ln -s /usr/openv/netbackup/bin/libobk.so64.1 libobk.so
Installing the agent Linking the Oracle Recovery Manager (RMAN) with NetBackup
75
Type the following ls(1) command to determine whether the Oracle library exists:
ls -l libobk.*
(Conditional) Use the mv(1) command to move the Oracle library to an alternate location. Perform this step if the output from step 2 shows that libobk.so or libobk.a are present.
Use the ln(1) command to create new links. This platform requires the two symbolic links shown in this step. RMAN searches for libobk.so.1, but other applications search for libobk.so. Type the following commands: ln -s /usr/openv/netbackup/bin/libobk.so.1 libobk.so.1 ln -s libobk.so.1 libobk.so
Datafile and archive log backup sets and backup pieces. Datafile copies. Archived redo logs and their copies. Tablespaces and datafiles on the target database. Stored scripts. These are named, user-created sequences of RMAN and SQL commands.
Oracle recommends you use RMAN with a recovery catalog, especially if you have 20 or more datafiles. However, you are not required to maintain a recovery catalog with RMAN. For information on the benefits and disadvantages of using a recovery catalog, see your Oracle documentation.
Chapter
Configuration
This chapter contains the following topics:
User interface terminology notes on page 77 Configuring the Maximum jobs per client on page 78 Configuring a backup policy for a database on page 78 Configuring the runtime environment on page 89 Creating templates and shell scripts on page 94 Testing configuration settings on page 106
Before attempting to configure NetBackup for Oracle, complete the installation procedure. See Installing the agent on page 37. After you complete the installation, follow the procedures in this chapter to configure your environment.
number_of_policies
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. Tip: Enter a large enough value for the Maximum jobs per client attribute to meet the number of jobs that Oracle runs. You might need to experiment with different values at your site.
79
Policy attributes Backup schedules Clients to be backed up Backup templates or script files to be run on the clients
To back up a database environment, you need to define at least one Oracle policy with the appropriate schedules. A configuration can have a single policy that includes all clients, or there can be many policies, some of which include only one client. Most requirements for database policies are the same as for file system backups. In addition to the policy attributes for this database agent, other attributes are available that you should consider. For configuration instructions and information on all the attributes available, see the NetBackup Administrators Guide, Volume I.
5 6 7
To add schedules, see Adding schedules on page 80. To add clients, see Adding clients on page 86. To add templates or scripts to the backup selections list, see Adding backup selections on page 87.
10 When you have added all the schedules, clients, and backup selections you need, click OK.
Description of attributes
With a few exceptions, NetBackup manages a database backup like a file system backup. Table 4-2 shows the policy attributes that are different for Oracle backups. This information is used when you add a new policy. Other policy attributes vary according to your specific backup strategy and system configuration. For more information on policy attributes, see the NetBackup Administrators Guide, Volume I. Table 4-2 Attribute
Policy type
Adding schedules
Each policy has its own set of schedules. These schedules initiate automatic backups and specify when a user can initiate operations. A database backup has two types of schedules: Application Backup and Automatic Backup.
For an XML Export backup to be used for database archiving purposes, set the Retention to infinity.
81
Set the window for the Application Backup schedule for 24 hours per day, seven days per week. This window ensures that your operations are never locked out due to the Application Backup schedule.
2 3
Users perform database backup operations during business hours, 08:00 to 13:00.
The Automatic backups that use this policy start between 18:00 and 22:00. In this scenario, the Application Backup schedule must have a start time of 0800 and a duration of 14 hours. Table 4-3 on page 81 shows this example schedule.
Description
Settings
The length of time the backup images 2 weeks are retained in the NetBackup catalog for restore. The time during which a NetBackup operation can be initiated. Sunday through Saturday 00:08:00 - 22:00:00
Backup Window
Description
The length of time to store the record of a backup, which NetBackup uses to determine if the schedule needs to be run. Frequency determines how often a backup should be performed. The time during which a NetBackup operation can be initiated. The length of time to store the record of a backup, which NetBackup uses to determine if the schedule needs to be run. Frequency determines how often a backup should be performed. The time during which a NetBackup operation can be initiated.
Settings
2 weeks
Frequency
every week
Backup Window
Retention
Frequency
every day
Backup Window
variables that are based on the type of automatic backup schedule selected. You can use these environment variables to initiate a backup conditionally. See Environment variables set by NetBackup for Oracle on page 92.
83
If this schedule is the last schedule, click OK. To add other schedules, repeat step 1 through step 6.
NetBackup backs up all blocks that have changed since the most recent full backup at level n-1 or lower. For example, in a cumulative level 2 backup, NetBackup backs up all blocks that have changed since the most recent level 1 or level 0 backup. Cumulative incremental backups reduce the work that is needed for a restore. You need only one cumulative incremental backup from any particular level at restore time. Cumulative backups typically require more space and time than Differential Incremental Backups, however. They they duplicate the information in previous backups at the same level. Do not use an Automatic Cumulative Incremental Backup schedule for Oracle XML Exports.
To help guard against such mistakes, use a template instead of a script whenever possible. When a template runs, it detects the backup type on the schedule. You are responsible for specifying a template with the correct operation type (backup or restore) in the policy.
Schedule properties
Some of the schedule properties have a different meaning for database backups than for a regular file system backup. Table 4-6 explains the schedule properties. Table 4-6 Property
Type of backup
Frequency
This setting is used only for scheduled backups and not for user-directed backups. Frequency specifies the period of time that can elapse until the next backup or archive operation begins on this schedule. For example, assume that the frequency is seven days and a successful backup occurs on Wednesday. The next full backup does not occur until the following Wednesday. Typically, incremental backups have a shorter frequency than full backups. This setting is used only for scheduled backups. It is not used for user-directed backups. The Calendar option allows you to schedule backup operations that are based on specific dates, recurring week days, or recurring days of the month.
Calendar
85
Multiple copies
If you want to specify multiple copies of a backup for the policy, configure Multiple copies on the Application Backup schedule.
Other schedule properties vary according to your specific backup strategy and system configuration. For more information on schedule properties, consult the NetBackup Administrators Guide, Volume I.
Oracle backup images and then synchronize the NetBackup and Oracle repositories. To manage expired backup images from the NetBackup repository
In the Retention setting of the Application Backup Schedule, specify the length of time before NetBackup expires a backup image. Note that the retention setting has a slightly different meaning for an Application Backup schedule versus an automatic backup schedule. For more information, see Schedule properties on page 84.
To manually remove references to backup images from the Oracle RMAN repository
Use RMAN repository maintenance commands to remove references to backup files. You can use these commands to delete backup image information from both the Oracle RMAN repository and the NetBackup repository. For more information on the RMAN repository maintenance commands, refer to Maintaining the RMAN repository on page 109. When a request is issued to delete a backup file from the RMAN repository, RMAN sends the request to NetBackup to delete the corresponding image from the NetBackup repository, regardless of the retention level.
Adding clients
The client list enumerates the clients on which your NetBackup for Oracle template or shell scripts can run during an automatic backup. A NetBackup client must be in at least one policy but can be in more than one. NetBackup attempts to run each template in the backup selections list for each client in the client list. If a template is not valid on a particular client, for example, if the Oracle home specified in the template does not exist on that client, the template is skipped. A policy can contain multiple clients and multiple templates. Only a subset of the templates needs to be valid on each client. If the valid templates are successful, the entire backup is successful. For a database policy, clients you want to add must have the following software installed:
Oracle NetBackup client or server NetBackup for Oracle The backup or XML export archive shell script(s)(unless, for Oracle, you are using templates)
87
To add clients to a policy 1 In the Policy dialog box, click the Clients tab. To access the Policy dialog box, double-click the policy name in the Policies list in the NetBackup administration console. Click New. Enter the name of the client you want to add. If Oracle is installed in a NetBackup cluster, specify the virtual Oracle name as the client name. From the Windows interface
2 3
Type the name of the client and press Enter. If NetBackup cannot detect the hardware and operating system, a dialog box displays so you can specify this information. OR
Click the Browse for Computer button to choose the client from the network. From the Java interface
a b 4 5
In the Client name field, type the name of the client you want to add. Choose the Hardware and operating system type and click Add.
To add another client, repeat step 2 and step 3. If this client is the last client, click OK.
Make sure the scripts reside on each client in the client list. Scripts can reside in any location. Make sure that NetBackup can access the location you choose and that NetBackup can run the scripts. Note that templates do not reside on the clients. Templates reside on the NetBackup master server. NetBackup installs sample scripts when you install the software, and you can modify these scripts for your own use. Write the scripts to a location
outside of the original installation location. This way future NetBackup installations do not overwrite your sites scripts.
If you use NetBackup for Oracle in a NetBackup server cluster, make sure that the scripts reside in a location that is available after a failover.
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 Full Backup, Automatic Differential Incremental Backup, or Automatic Cumulative Incremental Backup 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. For more information on backup templates and scripts, see Creating templates and shell scripts on page 94.
To add templates or scripts to the backup selections list from the Java interface 1 Open the Policy dialog box. To access the Policy dialog box, double-click the policy name in the Policies list in the NetBackup administration console. Click the Backup Selections tab. Click New. Specify the names of the templates that you want NetBackup to use. a b From the Template Set list, choose the template type by operation. Choose a template from the drop-down Script or Template list or type the name of a template. Include the .tpl extension. Do not include the full path. For example: weekly_full_backup.tpl Click Add.
2 3 4
89
d 5
Specify the names of the scripts that you want NetBackup to use. a In the Script: box, type the full path name of a script on the client. For example:
/backup_scripts/db/cold_backup.sh
b c 6
Click Add to add the script to the list. Repeat step a and step b to add any other scripts.
Click OK.
To add templates or scripts to the backup selections list from the Windows interface 1 In the Policy dialog box, click the Backup Selections tab. To access the Policy dialog box, double-click the policy name in the Policies list in the NetBackup administration console. Click New. Specify the names of the templates you want NetBackup to use. Use one of the following methods:
2 3
Type the name of the template with the .tpl extension. Do not include the full path. For example: weekly_full_backup.tpl Click the Template button. From the Template set list, choose the template type by operation. From the Template list, choose the correct template. Click OK.
Specify the names of the scripts you want NetBackup to use. Use one of the following methods:
Type the full path name of the script on the client. For example:
/backup_scripts/db/cold_backup.sh
Click the Remote Folder button. Navigate to and select the script file. Click OK.
Click OK.
below show the order of precedence for each situation. The following is the order of precedence for the runtime configuration variable settings. Scheduled backups with templates: 1 Environment variables set by NetBackup. For more information, see Environment variables set by NetBackup for Oracle on page 92. Environment variables set by the user.
For RMAN backups, these are set by the user with the Oracle RMAN send command and parms operand. For more information, see Oracle RMAN environment on page 91. For XML export archives, environment variables are set by the user in the XML export parameter file. For more information, see Environment variables set by a user in the XML export parameter file on page 92.
3 4
User bp.conf. For more information, see Creating a bp.conf file on page 93. Master bp.conf. For more information, see Creating a bp.conf file on page 93.
For RMAN backups, these are set by the user with the Oracle RMAN send command and parms operand. For more information, see Oracle RMAN environment on page 91.
For XML export archives, environment variables are set by the user in the XML export parameter file. For more information, see Environment variables set by a user in the XML export parameter file on page 92. The user can also set these variables on the Configuration Variables screen of the template generation wizards. However, variables set in this manner apply only for templates run from the client (through the wizard, or through Template Administration). When the scheduler runs these templates on the NetBackup master server, NetBackup overrides these variables.
Environment variables set by NetBackup. For more information, see Environment variables set by NetBackup for Oracle on page 92. User bp.conf For more information, see Creating a bp.conf file on page 93.
91
Master bp.conf For more information, see Creating a bp.conf file on page 93.
Local connection
send command or parms operand parms operand
When connected to a database through a LISTENER using SQL*Net, RMAN takes on the environment of the LISTENER. Therefore, the environment defined at the system level is not visible when RMAN is running. In this case, the send command is used to modify the runtime environment.
Templates
With templates, NetBackup for Oracle environment variables are specified on the NetBackup for Oracle configuration variables wizard page. For more information, see Creating RMAN templates using the NetBackup for Oracle RMAN template generation wizard on page 95.
Shell scripts
Use the send command or the parms operand to specify NetBackup for Oracle environment variables for use during a backup or restore. Example 1. This example uses 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'); }
Example 2. This example uses the parms operand to specify the policy and server to use for a database backup. parms is set with each allocate channel command in the shell script.
run { allocate channel t1 type 'SBT_TAPE' parms="ENV=(NB_ORA_POLICY=your_pol, NB_ORA_SERV=your_server)"; allocate channel t2 type 'SBT_TAPE' parms="ENV=(NB_ORA_POLICY=your_pol, NB_ORA_SERV=your_server)"; backup (database format 'bk_%s_%p_%t'); }
Environment variable
NB_ORA_SERV NB_ORA_CLIENT NB_ORA_POLICY NB_ORA_SCHED
For more information, see Creating XML export templates using the NetBackup for Oracle wizard on page 101.
93
scheduler or manually through the administrator interface. Table 4-9 shows the variables. Table 4-9 Variables that NetBackup for Oracle sets Purpose
Name of the NetBackup Server. Name of the Oracle policy. Name of the NetBackup client that hosts the Oracle database. Set to 1 for Automatic Full Backups. Set to 1 for Automatic Differential Incremental Backups. Set to 1 for Automatic Cumulative Incremental Backups.
Environment variable
NB_ORA_SERV NB_ORA_POLICY NB_ORA_CLIENT NB_ORA_FULL NB_ORA_INCR NB_ORA_CINC
BPBACKUP_SCHED
CLIENT_NAME
CLIENT_READ_TIMEOUT
SERVER
For more information, see the NetBackup System Administrators Guide, Volume I. The following shows example bp.conf entries for an Oracle user:
SERVER=jupiter CLIENT_READ_TIMEOUT=900 VERBOSE=1
Templates. The NetBackup for Oracle backup wizard creates backup templates. You can launch this wizard from the NetBackup Backup, Archive, and Restore interface. For more information, see Creating RMAN templates using the NetBackup for Oracle RMAN template generation wizard on page 95. The NetBackup for Oracle backup wizard does not support all of the RMAN commands and options provided by Oracle. Write a shell script if a template does not provide all the functionality you require. Shell scripts. Shell scripts are written by the user and 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.
95
For more information on sample scripts, see Creating RMAN scripts manually on page 98. NetBackup for Oracle also provides a utility, bpdbsbora, that can generate a shell script from a backup wizard template. This allows a user to create a template with the wizard and generate a shell script from the template. The user can then run the shell script or modify the shell script further. For more information, see Creating an RMAN script from a template on page 97.
Creating RMAN templates using the NetBackup for Oracle RMAN template generation wizard
The NetBackup for Oracle backup wizard stores information about desired RMAN backup operations. The wizard uses the information to create a template that you can run immediately or you can save in a NetBackup location on the master server for later use. For information on backup strategies and RMAN functionality, see your Oracle documentation. To launch the NetBackup backup, archive, and restore interface
Use the procedure called To log into the client and invoke the backup wizard on page 33 to bring up the NetBackup Backup, Archive, and Restore interface.
To use the backup wizard 1 In the Backup, Archive, and Restore interface, expand an Oracle instance and select the database object(s) (data files, tablespaces, archived redo logs)
to back up. Selecting the Oracle instance backs up the whole database using RMAN.
Click 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 Target Database Logon Credentials Recovery Catalog Logon Credentials Archived Redo Logs Configuration Options Backup Options Database State NetBackup 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.
97
After you complete the wizard, the Template Summary screen displays the summary of the backup template:
You can choose to 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, run, or save and run the template, click Finish.
where:
-backup -g script_file Specifies the template type. 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. Specifies the name of the template that you want to use as the basis for the script. Make sure the template exists. bpdbsbora retrieves backup templates from a known location on the master server, so specify only the template file name.
-t templ_name
-S server_name
Specifies the master server upon which the template resides. When specified, the bpdbsbora command retrieves backup templates from the specified master server.
Full Backup Level 0 Backup (Level 0 Incremental) Level n Backup (Differential Incremental Backup) Level n Backup (Cumulative Incremental Backup)
When generating a data file backup set, you can make either an incremental backup or a full backup. An incremental backup is a backup of one or more data files that contain only those blocks that have been modified since a previous backup. A full backup is a non-incremental backup of one or more data files that contain all blocks of the data files. When NetBackup for Oracle was installed, the installation software wrote example scripts to the following directory:
install_path/netbackup/ext/db_ext/oracle/samples/rman
To use sample scripts provided by NetBackup for Oracle 1 2 3 Copy the example scripts to a different directory on your client. Oracle scripts can be located anywhere on the client. Modify each script for your environment. Make sure the su command logs into the correct user. If you do not include an su - user (user is Oracle administrator account) in your Oracle scripts, they do not run with the proper permissions and
99
environment variables. This creates problems with your database backups and restores. Table 4-11 explains some of the sample scripts provided with NetBackup for Oracle. Table 4-11 Script
cold_database_backup.sh
hot_database_backup.sh
cold_duplex_database_backup_full.sh
Oracle8i and later versions of RMAN provide an API that allows you to make up to four backup sets simultaneously, each an exact duplicate of the others. Using NetBackup, for example, you can back up each copy to a different tape to protect against disaster, media damage, or human error. Use the set duplex and the send commands to take advantage of this feature. The set duplex command specifies the number of copies of each backup piece to create. The set duplex command affects all channels allocated after issuing the command, and it remains in effect until explicitly disabled or changed
during the session. You cannot issue the set duplex command after allocating a channel. The command syntax is:
set duplex = {ON | OFF | 1 | 2 | 3 | 4}
By default, duplex is OFF (a single backup set is produced). If you specify ON, it produces two identical backup sets. Observe the following with regard to file names:
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.
Note that you must enable the BACKUP_TAPE_IO_SLAVES initialization parameter to perform duplexed backups. RMAN configures as much 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/or 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:
send 'keyword=value [, keyword=value,...]';
The keywords 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 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.
Templates. The NetBackup for Oracle XML export wizard creates XML export templates. This wizard is initiated from the NetBackup Backup, Archive, and Restore interface.
101
The NetBackup for Oracle XML export wizard does not support all of the parameters provided by the command line utility, bporaexp. You can write a shell script if a template does not provide all of the required functionality.
Shell scripts. Shell scripts are written by the user and must conform to the operating systems shell syntax. Sample XML export and import shell scripts are installed on the client with the NetBackup for Oracle agent. Modify these scripts to meet your individual requirements. NetBackup for Oracle also provides a utility, bpdbsbora, that can generate a shell script from an XML export or import wizard template. This allows a user to create a template with the wizard and generate a shell script from it. The user can run or modify the shell script.
Creating XML export templates using the NetBackup for Oracle wizard
NetBackup for Oracle provides a wizard that solicits information about desired XML export operations. The wizard uses the information to create a template that can be run immediately or saved in a NetBackup specific location on the current master server for later use. To launch the NetBackup backup, archive, and restore interface
Use the procedure called To log into the client and invoke the backup wizard on page 33 to bring up the NetBackup Backup, Archive, and Restore interface.
To use the XML export wizard 1 In the left pane of the Backup, Archive, and Restore interface, select the Oracle instance. Database objects that can be exported are listed under the Users node. Only the schema owners and objects accessible by the current user login displays. Expand the Users list to the schema owners of the objects to be exported. In the right pane, select the Oracle objects to export. Figure 4-1 shows this.
2 3
Figure 4-1
Click Backup to start the wizard. The NetBackup for Oracle XML export wizard displays the following screens for you to enter information about the export operation you want to perform:
Welcome Target Database Logon Credentials Configuration Options Archive Export Options
NetBackup Archive Destination Options If you need an explanation of any of the fields on the wizard screens, or more details, click Help on the wizard screen. 5 When you have completed the wizard, the Template Summary screen displays the summary of the XML export template. Figure 4-2 shows this.
103
Figure 4-2
Template summary
You can choose to 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, run, or save and run the template, click Finish.
-t templ_name
Specifies the name of the template that you want to use as the basis for the script. Make sure the template exists. bpdbsbora retrieves XML export templates from a known location on the master server, so specify only the template file name. Specifies the master server upon which the template resides. When specified, the bpdbsbora command retrieves XML export templates from the specified master server.
-S server_name
For export:
/usr/openv/netbackup/ext/db_ext/oracle/samples/bporaexp
For import:
/usr/openv/netbackup/ext/db_ext/oracle/samples/bporaimp
105
To use the example scripts 1 2 3 Copy the example scripts to a different directory on your client. Oracle scripts can be located anywhere on the client. Modify each script for your environment. Make sure the su command logs into the correct user. If you do not include an su - user (user is Oracle administrator account) in your Oracle scripts, they do not run with the proper permissions and environment variables. The result is problems with your database backups and restores.
Templates
The NetBackup for Oracle backup and XML export wizards save a template to a NetBackup specific location on the current NetBackup master server. A backup or XML export template is retrieved from the master server as part of a backup (server-directed, scheduled, or user-directed) and is run on the client. Backup or XML export templates are associated with a policy by specifying its name in the policy backup Selections list. Because backup or XML export templates are stored on the server in a known location, server-directed and scheduled backups or XML exports use the same copy of the template for each client in the policy client list. Before running a template on a NetBackup for Oracle client, NetBackup verifies the validity of the template for that client by checking the Oracle installation information stored in that template. Only valid templates are run on each client.
The NetBackup for Oracle recovery and XML import wizards save a template to a user-specified location on the client. The location specified should include a fully qualified path to a directory where the user has write access. Templates store encrypted passwords that are decrypted at runtime.
Shell scripts
Shell scripts must reside on the NetBackup client. Backup or XML export shell scripts are associated with a policy by specifying the file name (including path) in the policy backup selections list. This means that for server-directed or scheduled backups or XML exports, each client in the policy's client list must have a copy of the script with the same name in the same location. For more information, see Adding backup selections on page 87. The backup and recovery processes sometimes require passwords for Oracle database access and/or system user accounts. Shell scripts, because a shell interprets them, store passwords in clear text.
4 5
6 7
107
When the Activity Monitor indicates job completion, check the output of the script(s) indicated in the policy you tested. The script shows the location to which the output is written. It is usually in the same directory as the original script, and it is similarly named. The Activity Monitor and the script output indicates the status of the backup operation. If the manual backup does not exit with a successful status, see Troubleshooting on page 179.
Chapterf
Maintaining the RMAN repository on page 109 Querying the RMAN repository on page 112 Performing a backup on page 113 Browsing backups on page 116 Performing a restore on page 117 Performing other RMAN actions on page 126 Performing an XML export archive on page 126 Browsing XML export archives on page 133 Restoring an XML export archive on page 135
The NetBackup graphical user interfaces and command line interfaces allow you to perform Oracle backup and recovery operations using Oracles RMAN utilities and to perform Oracle archives and restores using NetBackups XML export (bporaexp) and import (bporaimp) utilities. You 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.
can conduct all major backup and recovery operations using just the control file, some RMAN commands function only when you use a recovery catalog. Table 5-1 shows tasks and the commands needed to accomplish the tasks. It shows a subset of the repository maintenance commands provided by RMAN. Some of these commands might not be available with all versions of RMAN. Table 5-1 Task
Registering a database with the recovery catalog
Resetting the incarnation in the recovery catalog Cross checking the information in the RMAN repository
Determine whether a backup set is available or expired. Delete any expired backup sets. Call Media Manager about the status of a backup piece and then mark it as available or expired.
Use either the change ... crosscheck or crosscheck backup command to check the specified files. Note that these commands do not delete images or repository records. You must use separate commands for these operations. The change ... crosscheck command queries Media Manager to determine if a backup piece is available. If a backup piece is unavailable, RMAN marks the backup piece as expired. If it was expired but is now available, RMAN marks the backup piece as available. The command syntax is as follows: change backuppiece {primary_key_list|filename_list|tag} crosscheck; change backupset {primary_key_list} crosscheck; The crosscheck backupset command operates on available and expired backup pieces. RMAN updates their status with the result (available or expired). To cross-check a database, start RMAN and connect to the target database. Also connect to the recovery catalog if one is being used. At the rman command prompt, type the following commands: allocate channel for maintenance type 'SBT_TAPE'; crosscheck backupset of database;
111
Resynchronizing the recovery RMAN compares the recovery catalog to either the current control file of the target catalog database or a backup control file. It subsequently updates the catalog with information that is missing or changed. If you are running in ARCHIVELOG mode, resynchronize the recovery catalog regularly since 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, and the recovery catalog database is available when any of these commands are 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.
A restore validation executes a restore test run without restoring the files. Test the restore of the entire database or individual tablespaces, data files, or control files. 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.
Which files need a backup? Which files have not had been backed up in awhile? Which files are not recoverable due to unrecoverable operations? Which backup files can be deleted?
113
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 and/or within a specified range. Incarnations of a specified database or of all databases known to the recovery catalog.
For more information on querying the RMAN repository, see your Oracle documentation.
Performing a backup
This section describes how to perform several different types of backups.
Automatic backups
The most convenient way to back up your database is to set up schedules for 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:
In the same order as they appear in the file list On all clients in the client list
The NetBackup for Oracle backup templates or shell scripts start the database backup by running the rman command. When the backup is started through NetBackup, RMAN performs error checking. The rman command generates an error if it considers a command invalid, but it allows any of the commands it typically considers valid to proceed. This means that by specifying the wrong script file name, you could start an unintended operation.
Manual backups
The administrator can use the NetBackup server software to manually run an automatic backup schedule for the Oracle policy. For more information, see the NetBackup Administrators Guide, Volume I. For information on initiate a manual backup of an Oracle policy, see Testing configuration settings on page 106.
The Select Template list shows the names and descriptions of the RMAN backup templates stored on the current master server. 2 Select the name of the backup template you want to run.
115
Click Run. You can use the View Status tool to see the status of the backup. Click Actions > View Status.
The Oracle template administration window provides the following functions: Function name
Run Edit
Purpose
Runs the selected template. Changes the contents of an existing template. The selected backup template is loaded into the NetBackup for Oracle RMAN template generation wizard. Removes the selected template. You must be the root user or the template creator to delete a template. Changes the name of the selected template. You must be the root user or the template creator to rename a template. Displays a summary of the selected template.
Delete
Rename
View
where:
-backup -r -t templ_name Specifies the template type. Runs the template. Specifies the 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. Optional. Specifies the master server upon which the templates reside. When specified, the bpdbsbora command retrieves backup templates from the specified master server. Optional. Specifies a runtime progress log. Enclose prog_file in quotation marks ( ) if it contains space characters.
-S server_name
-L prog_file
For example:
bpdbsbora -backup -r -t ORCLMonfull.tpl -S my_mast -L my_prog_log
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:
/usr/openv/netbackup/ext/db_ext/oracle/samples/rman
Running RMAN
As an Oracle user, you can run the rman command from the operating systems command prompt with the RMAN command file as a parameter. This section describes how to set the master server to hag and the Oracle policy to obk before starting the backup. If you are connecting to a database using a TNS alias, use the RMAN send command to specify the environment variables. At the command prompt, type the following:
rman target internal/oracle@ORCL rcvcat rman/rman@RCAT send "NB_ORA_POLICY=obk,NB_ORA_SERV=hag" cmdfile /oracle/scripts/db_full_backup.rcv
Browsing backups
This section describes procedures for browsing backup images.
Log in as root to the master server Log in as root to the client with the appropriate altnames entry.
117
The following example uses bplist to search all Oracle backups for a client named jupiter:
/usr/openv/netbackup/bin/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 this command, see the bplist(1M) man page.
Performing a restore
Make sure a backup has completed successfully before you attempt a restore. An error occurs if a backup history does not exist. The following sections describe how to perform user-directed restores.
Limitations
The recovery wizard has several limitations:
The database is displayed only in its current state. If objects have been deleted from the database since the last backup, these objects do not appear among the objects you can select for restore. In order to restore the objects that have been deleted, you need to restore the entire database point in time before the objects were deleted. Data is restored to the original location. The wizard does not provide a way for the user to specify alternate file names. The wizard does not restore control files.
The recovery process sometimes requires passwords for Oracle database access and system user accounts. Templates store the encrypted passwords that are decrypted at runtime. Because recovery can be a complex process, it might be necessary to perform manual steps as part of the operation. For more information, see your Oracle documentation. The restore browser is used to display database objects. A hierarchical display is provided where objects can be selected for recovery. The top database node expands to show all of the installed databases. The oratab file is read to get the names and location of each database. The objects (tablespaces and datafiles) that make up an Oracle database are displayed by expanding an individual database node. This information is gathered from various database tables and views. Since you must be connected to the database before you can access its tables or views, logon criteria must be provided. When a user selects or expands a database node the wizard first tries to logon to the database using OS authentication. If the authentication fails the user is solicited for a user name and password. Optionally, the user is prompted for the Net Service Name if the connection is through SQL-Net, which is then used to logon to the database. This user must have a sysdba privilege since the logon credentials that are also used to perform the RMAN restore. The logon fails if the database is not in a mount or open state. The GUI uses the bpubsora utility to access and query the database. If there is a problem when NetBackup attempts to connect or browse a database this utility can be run from the command line to debug the issue.
To start the Backup, Archive, and Restore interface from the NetBackup administration console, do one of the following:
From the Java interface, click Backup, Archive, and Restore in the left pane of the console. From the Windows interface, click File > Backup, Archive, and Restore.
To start the Backup, Archive, and Restore interface from the command line, run the following command: /usr/openv/netbackup/bin/jbpSA &
119
From the Restore Files tab, expand the Oracle node in the left pane to view an Oracle instance hierarchy. Select a node in the left pane to view details in the right pane.
2 3
Figure 5-1
Object selections
Click Restore. Enter information about the recovery operation you want to perform in the screens that the NetBackup for Oracle recovery wizard displays. The screens are as follows:
Welcome Target Database Logon Credentials Recovery Catalog Logon Credentials Recovery Options Restore Options Recover Limits
Database State If you need an explanation of any of the fields on the wizard screens, click Help on the wizard screen. 5 Review the summary. When you have completed the wizard, the Selection Summary screen displays the summary of the recovery template. You can choose to run the template immediately after the wizard finishes or save the template locally, or both. If you need an explanation of any of the fields on the wizard panels, click Help on the wizard panel. Click Finish to run, save, or run and save the recovery template.
121
Using bpdbsbora
The bpdbsbora command lets you run a recovery template created by the NetBackup recovery wizard. At the command prompt, type this command and the following options:
bpdbsbora -restore -r -t templ_name [-L progress_file]
where:
-restore -r -t templ_name Specifies the template type. Runs the template. Specifies the full-path name of the template you want to use. Unlike backup templates, restore templates do not reside in a predetermined location on the master server. They are considered to be temporary in nature and should reside on the client. If the full path is not specified as part of the restore template name, the file might not be found. -L progress_file Optional. Specifies a run-time process log. Enclose progress_file in quotation marks ( ) if it contains space characters.
For example:
bpdbsbora -restore -r -t /oracle/restore_templs/ORCL_MON_Full.tpl
1. Cl ient A
gets back ed up
Server
.
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.
123
Note: For Oracle backups performed with NetBackup 6.0x or earlier, only the user who performed the backup can restore that backup. For any Oracle backup that is performed with NetBackup 6.5, any user who belongs to the database group that performed the backup can restore it. This ability will be added to future patches of NetBackup releases earlier than 6.5. The following sections describe how to perform a redirected restore using Oracle RMAN.
Server configuration
Ensure that the NetBackup server is configured to allow a redirected restore. The administrator can remove restrictions for all clients by creating the following file on the Netbackup master server: /usr/openv/netbackup/db/altnames/No.Restrictions Or, to restrict clients to restore only from certain other clients, create the following file: /usr/openv/netbackup/db/altnames/client_name Where client_name is the name of the client allowed to do the redirected restore (the destination client). Then, add the name of the NetBackup for DB2 source client to that file. For more information about redirected restores, see the NetBackup Administrators Guide, Volume I.
To perform a redirected restore 1 Enable a network connection to the RMAN catalog database that the source client used.
Note: If the RMAN catalog database has been lost, restore the catalog database first before continuing with the redirected restore. 2 3 Set the NB_ORA_CLIENT environment variable to the source client. 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 hostname of the source client. 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. Grant write permission to the directory to which you want to restore the data files. Set up a password file for the destination client database. Start up the database in the nomount state. Start RMAN, connecting to the catalog. Set dbid to be the DBID of the source client database.
5 6 7 8 9
10 Connect to the target database without using a userid and password. 11 Run an RMAN restore script or type the RMAN commands for the restore.
Example
For example, assume the following:
Source client is camel Destination client is giraffe Master server is lion ORACLE_SID is test The user is connected to the Oracle database using a local connection, not SQL*Net UNIX user is ora on both camel and giraffe
125
Create the following file on server lion and edit it to contain the name camel:
/usr/openv/netbackup/db/altnames/giraffe
2 3 4 5 6
Log in to 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. Modify the network tnsnames.ora file to enable RMAN catalog connection. Set the environment variables ORACLE_SID to test and NB_ORA_CLIENT to camel. Make sure 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. Create an inittest.ora file. Start up the database in a nomount state.
SVRMGR> startup nomount pfile=$ORACLE_HOME/dbs/inittest.ora %rman rcvcat rman/rman@rcat RMAN> set dbid=<dbid of source database on camel RMAN> connect target/ RMAN> run { RMAN> ALLOCATE CHANNEL CH00 TYPE 'SBT_TAPE'; RMAN> SEND 'NB_ORA_SERV=lion, NB_ORA_CLIENT=camel'; RMAN> restore controlfile; RMAN> } SVRMGR> alter database mount; %orapwd file=$ORACLE_HOME/dbs/orapwtest password=<oracle> %rman rcvcat rman/rman@RCVCAT RMAN>set dbid=<Saved dbID of Source Target> RMAN>connect target/ RMAN>run { RMAN> ALLOCATE CHANNEL CH00 TYPE 'SBT_TAPE'; RMAN> ALLOCATE CHANNEL CH01 TYPE 'SBT_TAPE'; RMAN> SEND 'NB_ORA_SERV=lion, NB_ORA_CLIENT=camel'; RMAN> restore database; RMAN> restore archivelog all; RMAN> } SVRGMR>recover database until cancel using backup controlfile;
7 8
Now apply the archived logs. Type cancel when you decide to stop recovery.
In the same order as they appear in the file list On all clients in the client list
The NetBackup for Oracle XML export template or shell scripts start the XML export by running NetBackups bporaexp utility.
127
Use this dialog to run, edit, delete, rename, and view existing XML export templates. These are the templates created by the NetBackup for Oracle XML Export Wizard and stored in a predetermined location on the master server. 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 stored on the current master server. Select the name of the XML export template you want to run. Click Run.
2 3
The Oracle template administration window provides the following functions: Function name
Run Edit
Purpose
Runs the selected template. Changes the contents of an existing template. The selected XML export template is loaded into the NetBackup for Oracle XML export template generation wizard. Removes the selected template. You must be the root user or the template creator to delete a template. Changes the name of the selected template. You must be the root user or the template creator to rename a template. Displays a summary of the selected template.
Delete
Rename
View
where:
-export -r -t templ_name Specifies the template type. Runs the template. Specifies the name of the template that you want to use. bpdbsbora retrieves XML export templates from a known location on the master server, so specify only the file name.
-S server_name
Optional. Identifies the master server. bpdbsbora retrieves XML export templates from a specific master server when you specify this option. Optional. Specifies a runtime process log. Enclose prog_log in quotation marks ( ) if it contains space characters.
-L prog_log
For example:
bpdbsbora -export -r -t sales_arch.tpl -S my_server -L my_progress_log
Running the NetBackup for Oracle XML export script on the client
You can initiate a database XML export from the operating system command prompt by typing the full path to the shell script that performs the export. For example:
/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: /usr/openv/netbackup/ext/db_ext/oracle/samples/bporaexp/
129
/db/netbackup/xml/test1/test1.xsd
/db/netbackup/xml/test1/USER1/TEST1.xsd Table schema for table USER1 /db/netbackup/xml/test1/USER1/TEST1.xml XML document for table USER1
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 /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:
/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 features that include searching and cataloging with the NetBackup catalog and automatic handling of output that exceeds file system limits. With the DIRECTORY parameter, file system limits, such as a 2 GB maximum, can cause an error.
Note: On 64-bit platforms, the bporexp64 command is also available. Table 5-3 shows the available bporaexp parameters with their default values. Note: Use the NetBackup parameters NB_ORA_SERV, NB_ORA_CLIENT, NB_ORA_POLICY, and NB_ORA_SCHED to specify the NetBackup runtime configuration. Otherwise, the order of precedence for the runtime configuration variable settings is used. Some parameters are valid only when writing to a storage unit. Other parameters are valid only when writing to a directory. In the following table, the right-most column contains either Storage Unit or Directory to indicate whether the parameter in that row is applicable for either writing to a storage unit or to a directory. Parameters that are recognized when writing to a directory are ignored when writing to a storage unit. Table 5-3 Parameter
CONSISTENT
Default
N
Description
Target location
Directory Specifies whether or not bporaexp uses the SET TRANSACTION READ ONLY statement to ensure that the data from all tables is consistent to a single point in time and does not change during the execution of the bporaexp command. If the default of CONSISTENT = N is used, each table is exported as an independent transaction. Optionally specifies a directory for the output of the bporaexp utility. Displays a help message with descriptions of bporaexp parameters. Does not export data if HELP=Y. Directory
DIRECTORY
no default
HELP
Directory
131
Default
no default
Description
Optionally specifies a keyword phrase that NetBackup associates with the image being created by the archive operation. Values for KEYWORD must be in double quotes.
Target location
Storage Unit
LOG
no default
Directory Optionally specifies a file name to receive informational and error messages. If this parameter is specified, messages are logged in the log file and not displayed to the terminal display. The name of the master XML schema file. Optionally specifies the name of the NetBackup master server. Directory
NAME
no default
NB_ORA_SERV
Storage Unit
NB_ORA_CLIENT
default client Optionally specifies the name of the NetBackup for Oracle client. default Optionally specifies the name of the Oracle policy NetBackup for Oracle policy. default backup policy schedule no default Optionally specifies the name of the backup policy schedule to use.
Storage Unit
NB_ORA_POLICY
Storage Unit
NB_ORA_SCHED
Storage Unit
OWNER
Lists the Oracle schema owners to export. For each owner, the tables, partitions, and views owned by that Oracle account are exported by default. The PARTITIONS and VIEWS parameters can be used to exclude partitions and views.
Directory
PARTITIONS
Optionally specifies whether or not Directory table partitions are included. Only valid when used with the OWNER parameter.
Default
no default
Description
Target location
This parameter lets you select a subset Directory of rows from a set of tables. The value of the query parameter is a string that contains a WHERE clause for a SQL select statement that is applied to all tables and table partitions listed in the TABLES parameter. For example, if TABLES = emp, bonus and QUERY = where job = SALESMAN and sal < 1600, two SQL statements are run:
SELECT*FROM emp where job=SALESMAN and sal<1600; SELECT*FROM bonus where job=SALESMAN and sal<1600;
Note that each query that runs refers to a single table at a time in the FROM clause, so it is illegal to have a join in the WHERE clause. ROW_BUFFER N 1000 Specifies the size, in rows, of the buffer used to fetch rows. Tables with LONG columns are fetched one row at a time. The maximum value allowed is 32767. Lists the table names, view names, and 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 USERID Y no default Specifies the username/password (and Directory optional connect string) of the user initiating the export. If a connect string is not provided, the ORACLE_SID environment variable is used. Directory
TABLES
no default
Directory
133
Default
Y
Description
Optionally specifies whether or not views are included. Only valid when used with the OWNER parameter.
Target location
Directory
Description
Optionally specifies a start date for the archive search. Used with ARCHIVE_DATE_TO to specify a range. The date format is mm/dd/yyyy [hh:mm:ss].
Description
Optionally specifies an end date for the archive search. Used with ARCHIVE_DATE_FROM to specify a range. The date format is mm/dd/yyyy [hh:mm:ss]. Optionally specifies a keyword phrase for NetBackup to use when searching for archives. The name of the master XML schema file. Optionally specifies a comma-separated list of table owners. Optionally specifies a list of table and partition names that were included in an archive.
ARCHIVE_DATE_TO
KEYWORD
no default
For example, assume you named the list parameter file bporaimp_list.param. At the command prompt, type the following:
bporaimp parfile = bporaimp_list.param
The -t 4 on this command specifies the Oracle backups or archives. The -R specifies the default number of directory levels to search, 999. For more information on this command, see the bplist(1M) man page.
135
To start the NetBackup Backup, Archive, and Restore interface from the NetBackup administration console, do one of the following:
From the Java interface, click Backup, Archive, and Restore in the left pane of the console. From the Windows interface, click File > Backup, Archive, and Restore.
To start the NetBackup Backup, Archive, and Restore interface from the command line, run the following command: /usr/openv/netbackup/bin/jbpSA &
To start the XML import wizard 1 (Conditional) Change the policy type. Perform this step if the Oracle node is not visible.
It is possible that your NetBackup for Oracle client does not have the appropriate policy type specified. Change the policy type with the following steps: a b c 2 3 On the Actions menu, select Specify NetBackup Machines and Policy Type. In the Specify NetBackup Machines and Policy Type dialog box, in the Policy type drop-down list, select Oracle. Click OK.
Click the Restore Files tab. Expand the Oracle node in the left pane to view an Oracle instance hierarchy in the right pane.
To use the XML import wizard When you are ready to perform an import, follow these steps to create and run a template with the XML import wizard. 1 In the left pane of the Backup, Archive, and Restore interface, select the Oracle 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. Expand the Users list to the schema owners of the objects to be imported. In the right pane, select database objects that exist in the archive to be restored. Click Restore. 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:
2 3 4 5
NetBackup Archive Source Options If you need an explanation of any of the fields on the wizard screens, or more details, click Help on the wizard screen. 6 Review the summary. When you have completed the wizard, the Selection Summary screen displays the summary of the XML import template.
137
You can choose to run the template immediately after the wizard finishes, save the template locally, or both. For explanations of your choices, click Help.
Using bpdbsbora
The bpdbsbora command allows you to run an XML import template created by the NetBackup XML import wizard. At the command prompt, type this command with the following options:
bpdbsbora -import -r -t template_name [-L progress_file]
where:
-import -r Specifies the template type. Runs the template.
-t template_name Specifies the full path name of the template you want to use. Unlike backup templates, XML import templates do not reside in a predetermined location on the master server. They are considered to be temporary in nature and should reside on the client. If the full path is not specified as part of the XML import template name, it must reside in the current directory. -L progress_file Optional. Specifies a run-time progress log. Enclose progress_file in quotation marks ( ) if it contains space characters.
For example:
bpdbsbora -import -r -t /oracle/imp_tpls/sales_imp.tpl -L prog_file
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. The NetBackup for Oracle installation script writes sample scripts to the following location: /usr/openv/netbackup/ext/db_ext/oracle/samples/bporaimp/
At the command prompt, type the bporaimp command in the following format:
bporaimp [username/password] parfile = filename | help=y
On 64-bit platforms, the bporaimp64 command is also available. Table 5-5 shows the available bporaimp parameters with their default values. Note: Use the NetBackup parameters NB_ORA_SERV and NB_ORA_CLIENT to specify the NetBackup runtime configuration. Otherwise, the order of precedence for the runtime configuration variable settings is used. Some parameters are valid only when writing to a storage unit. Other parameters are valid only when writing to a directory. In the following table, the right-most column contains either Storage Unit or Directory to indicate whether the parameter in that row is applicable for either writing to a storage unit or to a directory. Parameters that are recognized when writing to a directory are ignored when writing to a storage unit.
139
Default
no default
Description
Optionally specifies a start date for the archive 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].
Target location
Storage Unit
ARCHIVE_DATE_FROM
ARCHIVE_DATE_TO
no default
Storage Unit Optionally specifies an end date for the archive 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]. Specifies a directory for the Directory output of any BFILE columns being imported. Oracles CREATE DIRECTORY command can be used to create the DIRECTORY in Oracle, and the name should match the name used in the export file.
BFILE_DIRECTORY
Default
N
Description
Target location
Directory Specifies whether bporaimp should commit after each array insert. The size of the array is determined by ROW_BUFFER. By default, bporaimp commits only after loading each table, and performs a rollback when an error occurs, before continuing with the next object. Optionally specifies a directory Directory for the input of the bporaimp utility. Optionally specifies a comma-separated list of users to import from an archive containing multiple users tables. If not specified, all of the tables are imported. Displays a help message with descriptions of bporaimp parameters. Directory
DIRECTORY
no default
FROMUSER
no default
HELP
Directory
141
Default
N
Description
Specifies whether or not rows should be inserted into a table that is not empty. The default is that the table already exists and that it is empty. If it is not empty, IGNORE_ROWS = N causes an error to be reported, and the table is skipped with no rows inserted. IGNORE_ROWS = Y causes rows to be inserted with errors reported in the log file. If IGNORE_ROWS = Y and an error such as a primary key constraint violation occurs, no data is inserted if COMMIT = N. However, if COMMIT = Y, the array of rows (size determined by ROW_BUFFER) is not inserted, but bporaimp continues to process additional row arrays in the order in which they were exported. To cause all rows that do not violate a primary key constraint to be inserted, set COMMIT = Y, ROW_BUFFER = 1, and IGNORE_ROWS = Y.
Target location
Directory
KEYWORD
no default
Optionally specifies a keyword phrase for NetBackup to use when searching for archives from which to restore files. LIST = Y queries the NetBackup catalog and lists the archives available. Does not import the data if LIST = Y.
Storage Unit
LIST
Storage Unit
Default
no default
Description
Target location
Optionally specifies a file name Directory to receive informational and error messages. If this parameter is specified, messages are logged in the log file and not displayed to the terminal display. The name of the master XML schema file. This parameter is required if LIST = N. Optionally specifies the name of the NetBackup master server. Optionally specifies the name of the NetBackup for Oracle client. Used with RESTORE_TO_DIRECTORY to restore the XML schema files only to a directory. Directory
NAME
no default
NB_ORA_SERV
Storage Unit
NB_ORA_CLIENT
Storage Unit
RESTORE_SCHEMA_ONLY
Storage Unit
RESTORE_TO_DIRECTORY
no default
Optionally specifies a directory Storage Unit for the output of the bporaimp utility. If used, the XML data is not parsed and inserted into Oracle. Specifies the size, in rows, of the buffer used to insert rows. Tables with LONG or LOB columns are inserted one row at a time. The maximum value allowed is 32767. Directory
ROW_BUFFER
1000
143
Default
no default
Description
Target location
Directory Optionally specifies a list of table, view, and partition names to import. If not used, all objects in the archive are imported. The objects must already exist, and the USERID must have INSERT privilege on the objects. The object names cannot be qualified with owner names, and the FROMUSER parameter is used to specify a particular owner. If a partition name is specified, it indicates the exported partition only and the rows are inserted according to the partitioning scheme of the target table. If the export contains partitions, and the import does not specify them, all are inserted. Optionally specifies a comma-separated list of users to import to that can be used with the FROMUSER parameter to change the table owners. The TOUSER Oracle accounts must already exist, and the USERID must have INSERT privilege on the tables that must also exist. Specifies the username/password (and optional connect string) of the user initiating the import. If a connect string is not provided, the ORACLE_SID environment variable is used. Directory
TOUSER
no default
USERID
no default
Directory
1. Cl ient A
gets back ed up
Server
.
The user on client A cannot initiate a redirected restore to client B. Only the user on client B, the client receiving the backup image, can initiate the redirected restore. Note: For Oracle backups performed with NetBackup 6.0x or earlier, only the user who performed the backup can restore that backup. For any Oracle backup that is performed with NetBackup 6.5, any user who belongs to the database group that performed the backup can restore it. This ability will be added to future patches of NetBackup releases earlier than 6.5.
Server configuration
Ensure that the NetBackup server is configured to allow a redirected restore. The administrator can remove restrictions for all clients by creating the following file on the Netbackup master server: /usr/openv/NetBackup/dbaltnames/No.Restrictions Or, to restrict clients to restore only from certain other clients, create the following file: /usr/openv/NetBackup/dbaltnames/client_name
145
For client_name, specify the name of the client allowed to do the redirected restore (the destination client). Then, add the name of the NetBackup for Oracle source client to that file.
Client configuration
For Oracle backups performed with NetBackup 6.0x or earlier, only the user who performed the XML export archive can restore that archive. For any Oracle XML export archive that is performed with NetBackup 6.5, any user who belongs to the database group that performed the archive can restore it. This ability will be added to future patches of NetBackup releases earlier than 6.5. To use bporaimp for a redirected restore Perform the following on the new client host if you want to restore XML export archives that are owned by another client. 1 2 Set environment variables for bporaimp on the new client, including ORACLE_HOME and ORACLE_SID. In the bporaimp parameter file, include the following lines:
nb_ora_serv = NetBackup_server nb_ora_client = original_client_where_XML_export_occurred. 3 4 Specify other bporaimp parameters. For more information, see Running bporaimp on the client on page 138. Run bporaimp.
Example
For example, assume the following:
Original client is jupiter New client is saturn Server is jupiter ORACLE_SID is test on both saturn and jupiter UNIX user is ora on both jupiter and saturn Archive name is sales Create the following file on server jupiter:
/usr/openv/netbackup/db/altnames/saturn
1 2 3 4
Edit the preceding file to contain the name jupiter. Log on to saturn as ora. Create file bporaimp.param.
Run bporaimp parfile=bporaimp.param to restore sales archive to saturn and to import the data into the test database on saturn.
Chapter
Installation and licensing requirements on page 147 NetBackup for Oracle with Snapshot Client overview on page 148 How does NetBackup for Oracle with Snapshot Client work? on page 151 Configuring snapshot backups on page 158 Restoring data from a snapshot backup on page 165 Snapshot Client effects on page 173
This chapter explains how to use NetBackup for Oracle with NetBackup Snapshot Client to perform snapshot backups and block-level incremental backups of your Oracle database. To use NetBackup for Oracle with Snapshot Client, you must have both NetBackup Snapshot Client and NetBackup for Oracle licensed and installed.
No additional NetBackup software is required. You might need to modify other hardware and software configurations. For more information about the following, see the NetBackup Snapshot Client Administrators Guide:
148 NetBackup for Oracle with Snapshot Client NetBackup for Oracle with Snapshot Client overview
How to install and configure the NetBackup Snapshot Client Configuration requirements for specific snapshot methods
Snapshot backup
A snapshot is a disk image of the client's data made almost instantaneously. When used in conjunction with NetBackup Snapshot Client, NetBackup for Oracle can back up Oracle objects by taking snapshot images of the component files. Later, it backs up the snapshot version to the storage unit. Snapshot backup captures the data at a particular instant without causing significant client downtime. Client operations and user access continue without interruption during the backup. The resulting capture or snapshot can be backed up without affecting the performance or availability of the database.
Instant recovery
This feature makes backups available for instant recovery from disk. Instant recovery 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 makes it possible to perform block-level restores.
Off-host backup
An off-host backup shifts the burden of backup processing onto a separate backup agent, such as an alternate client. This reduces the effect on the client's computing resources ordinarily caused by a local backup. The backup agent reads the data from the client disk and writes it to storage. An off-host backup can also be directed to a NetBackup media server, or third-party copy device
NetBackup for Oracle with Snapshot Client NetBackup for Oracle with Snapshot Client overview
149
time, decreases the amount of backup media required, and significantly reduces CPU and network overhead during backups. You can perform a BLI backup with, or without, RMAN.
Proxy copy
A proxy copy is a special type of backup in which the control of the data transfer is managed by the NetBackup for Oracle agent. 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 managed by NetBackup. 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 Oracles Media Management API. Backups and restores remain tightly integrated with RMAN and its catalog, greatly simplifying administration tasks.
File-based operations
Standard NetBackup for Oracle backups and restores are stream-based. When Snapshot Client is enabled, the operations are file-based. The following sections illustrate the differences between these operation types.
Stream-based operations
Stream-based operations are the standard NetBackup implementation of conventional RMAN backup and restores. In a stream-based backup, NetBackup moves the data provided by the server process. NetBackup captures the data stream content provided by RMAN. If the user has specified multiple streams, then RMAN opens multiple streams and NetBackup catalogs them as separate images. Figure 6-1 on page 150 represents a stream-based backup or restore.
150 NetBackup for Oracle with Snapshot Client NetBackup for Oracle with Snapshot Client overview
Figure 6-1
Oracle Server Oracle database disk Control commands Data Oracle database disk
NetBackup
File-based operations
File-based operations are the NetBackup for Oracle with Snapshot Client implementation of Oracle proxy copy backups and restores. In a file-based operation, RMAN provides the list of files that require backup or restore to NetBackup for Oracle with Snapshot Client. NetBackup for Oracle with Snapshot Client performs the data movement. Figure 6-2 on page 151 represents a file-based backup or restore.
NetBackup for Oracle with Snapshot Client How does NetBackup for Oracle with Snapshot Client work?
151
Figure 6-2
Oracle Server
Control commands
List of files
Data NetBackup
Data
152 NetBackup for Oracle with Snapshot Client How does NetBackup for Oracle with Snapshot Client work?
The agent checks that the policy it is using 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 that are being backed up are in backup mode only for the period of time necessary to capture a snapshot of the data.
2 3
NetBackup for Oracle with Snapshot Client How does NetBackup for Oracle with Snapshot Client work?
153
For control files and archived redo logs, Oracle RMAN performs only conventional stream-based backups. This means that NetBackup for Oracle must use stream-based backups for control files and archived redo logs even when using Snapshot Client methods for the other database objects. Note: Oracle 10g and later releases support proxy copy backups for archived redo logs. Control files, however, must still be included in a stream-based backup schedule. If you are using an Oracle 10g or later release, you can include archived redo logs in your database proxy file backups, and you can ignore the instructions in this chapter that direct you to back up the archived redo logs in a stream-based backup schedule. 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 kinds of backups. For information on configuring such a policy, seeSnapshot Client effects on page 173.
Multistreaming
On the initial call, NetBackup for Oracle with Snapshot Client returns a special entry to RMAN indicating that it supports proxy copy. It also indicates to RMAN that it supports an unlimited number of files to be proxy copied in a single proxy copy session. This means that the number of channels allocated for the RMAN backup proxy command does not control the degree of parallelism for proxy backups. RMAN uses only one channel for proxy copy backups except when a specific configuration is used. The NB_ORA_PC_STREAMS variable controls the number of proxy copy backup streams to be started. By default, the agent initiates one backup job for all files. If the RMAN send command passes NB_ORA_PC_STREAMS, NetBackup for Oracle splits the files into the number of groups specified by the variable based on the file size. The agent attempts to create streams of equal size.
154 NetBackup for Oracle with Snapshot Client How does NetBackup for Oracle with Snapshot Client work?
set newname command or ALTER DATABASE RENAME DATAFILE statement before initiating a restore. For example, to restore a data file for tablespace TEST to a new location, you can use the following RMAN commands:
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 data files 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.
NetBackup for Oracle with Snapshot Client How does NetBackup for Oracle with Snapshot Client work?
155
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).
156 NetBackup for Oracle with Snapshot Client How does NetBackup for Oracle with Snapshot Client work?
Example 1
This RMAN sample script initiates a whole database backup, which includes the control file. RMAN starts one proxy copy backup session by sending a list of all data files to the NetBackup for Oracle agent on channel t1. The agent splits the files into 3 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.
run { allocate channel t1 type 'SBT_TAPE'; send 'NB_ORA_PC_STREAMS=3'; backup proxy format 'bk_%U_%t' (database); release channel t1; }
Example 2
This RMAN sample script initiates a whole database backup, which includes the control file. RMAN starts one proxy copy backup session by sending a list of all data files to the NetBackup for Oracle agent on channel t1. The agent splits the files into 3 streams and initiates a file-based backup for each stream. At the same time, RMAN starts a non-proxy conventional backup of the control file on channel t2.
run { allocate channel t1 type 'SBT_TAPE'; allocate channel t2 type 'SBT_TAPE'; send 'NB_ORA_PC_STREAMS=3'; backup proxy format 'bk_%U_%t' (database); release channel t1; release channel t2; }
Note that if the RMAN recovery catalog is not used, then the version of the control file being backed up does not contain the 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 t2; }
NetBackup for Oracle with Snapshot Client How does NetBackup for Oracle with Snapshot Client work?
157
Example 3
In this sample script, RMAN initiates two proxy copy backups sequentially on channel t1. It starts a proxy backup of tablespace tbs1 data files. After the backup is done, it starts another proxy backup of tablespace tbs2 data files.
run { allocate channel t1 type 'SBT_TAPE'; backup proxy format 'bk_%U_%t' (tablespace tbs1); backup proxy format 'bk_%U_%t' (tablespace tbs2); release channel t1; }
This configuration can cause problems if the sequential backups create snapshots on the same volumes. In such a situation, issue a single backup command such as the following, which specifies both tablespaces, rather than two separate backup commands:
run { allocate channel t1 type 'SBT_TAPE'; backup proxy format 'bk_%U_%t' (tablespace tbs1, tbs2); release channel t1; }
Example 4
In this example, RMAN distributes proxy copy backups over two channels. It creates two proxy copy backup sessions sending tbs1 data files on channel t1 and tbs2 data files on channel t2. Such a method is useful if you want to specify different NetBackup configurations for each channel. In this example, each send command specifies a different policy to be sent and used by each proxy backup.
run { allocate channel t1 type 'SBT_TAPE'; send NB_ORA_POLICY=policy1; allocate channel t2 type 'SBT_TAPE'; send NB_ORA_POLICY=policy2; backup proxy format 'bk_%U_%t' (tablespace tbs1 channel t1); (tablespace tbs2 channel t2); release channel t1; release channel t2; }
158 NetBackup for Oracle with Snapshot Client Configuring snapshot backups
A snapshot backup occurs when NetBackup creates a point-in-time disk image of the database and copies that image to disk. This process is nearly instantaneous, so user access to the database is not interrupted during the backup. An instant recovery occurs when NetBackup restores the on-disk snapshot copy of the database.
Another feature, off-host backup, can reduce the I/O processing load on the client that hosts the database. To use off-host backup, specify an alternate client (UNIX and Windows clients) or a data mover (UNIX clients only) to assume the I/O processing load.
Configuration requirements
Each agent has its own hardware requirements, software requirements, compatibility with certain features, and snapshot methods that are supported. There are also special requirements for specific types of backups. Refer to the NetBackup Snapshot Client Administrators Guide and the Symantec Support Web site for more information. Familiarize yourself with this information before you configure any snapshot backups. The following list highlights some of the requirements that pertain to database agents:
The user identification and group identification numbers (UIDs and GIDs) associated with the files to be backed up must be available to both the primary client and the alternate backup client. You should allocate at least two different volumes or file systems for database activities, as follows:
Allocate one or more volumes or file systems to the database data files.
Allocate a different set of volumes or file systems to the Oracle executables, configuration files, and the archive redo logs. One reason for to have two different volumes is to separate the data files from the other files. If the logs are configured on the same volumes (or file systems) as the data files, the logs are temporarily frozen while NetBackup takes the snapshot. The process cannot access the logs when the database is active, so the database activity might freeze until the logs become accessible again. Another reason for writing the data files to their own repository is because it is required for an instant recovery point-in-time
159
rollback. Only data files may exist on the volume or file system being restored.
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 key for this option must be registered. To perform off-host backups, perform any special configuration that is required.
Snapshot methods for the file systems (logical volumes) on which the data files reside. Snapshot methods for the file systems (raw partitions or logical volumes) on which the data files reside. A backup method on the policy attributes dialog box. An Automatic Full Backup schedule to perform file-based snapshot and off-host backups of the data files. An Application Backup schedule to perform the stream-based backup of control files and archived redo logs. Oracle does not support proxy backups of database control files and archived redo logs. These files are backed up using standard RMAN operations.
160 NetBackup for Oracle with Snapshot Client Configuring snapshot backups
2 3
Click on the Attributes tab. Select the Oracle policy type. Figure 6-3 on page 160 shows the interface that lets you configure a snapshot policy. Snapshot policy interface
Figure 6-3
Select the policy type Select appropriate storage unit or storage unit group
Click Perform snapshot backups (Optional) Click Retain snapshots for instant recovery (Optional) Click Perform off-host backup and specify a method
Select a policy storage unit from the Policy storage unit list. Select a policy storage unit in this step even if you plan to select Instant Recovery Snapshots Only later in this procedure. NetBackup uses this storage unit for the stream-based backups of the control files and the archived redo logs that are included in this policy. NetBackup also uses this storage unit if you select Third Party Copy Device when you configure the schedule. Any_available is not supported for the following data movers: NetBackup Media Server or Third-party Copy Device. Click Perform snapshot backups.
161
(Optional) Click Advanced Snapshot Options to choose a snapshot method. By default NetBackup chooses a snapshot method for you. To choose a snapshot method, click auto (the default) or click one of the methods that are presented in the list. The snapshot method you can use depends on your hardware environment and software environment. Only certain snapshot methods are supported in certain environments. See the NetBackup Snapshot Client Administrators Guide or the supported platforms matrix on the Symantec Support Web site for more information. You can configure only one snapshot method per policy. For example, assume you want one snapshot method for clients a, b, and c, and a different method for clients d, e, and f. Then you need to create two policies for each group of clients and select one method for each policy. (Optional) Select Retain snapshots for instant recovery. When this option is selected, NetBackup retains the snapshot backup image on disk for later use in recovery. (Optional) Select Perform off-host backup. By default, the client that hosts the database performs the backup. If you want to reduce the I/O processing load on the client that hosts the database, specify an alternate client to perform the backup. Select an off-host backup method by specifying the following:
Use alternate client (UNIX and Windows clients). If you click Use alternate client, also specify the name of the client to perform the backup. This option might require additional configuration. The alternate client must be a client that shares the disk array. Use data mover (UNIX clients only). If you click Use data mover, also select one of the possible data movers:
10 Click New. Configure both an Automatic schedule and an Application Backup schedule, as follows:
The Automatic schedule is for the database files. If you want to create only disk images, in the Destination panel, under Instant Recovery, select Snapshots only. This suppresses NetBackups default behavior, which is to copy the snapshot to a storage unit. When you select Snapshots only, NetBackup creates the on-disk snapshot copy of the database, but it does not copy the snapshot to a storage
162 NetBackup for Oracle with Snapshot Client Configuring snapshot backups
unit. The on-disk snapshot becomes the only backup copy. Note that the on-disk snapshot is not considered to be a replacement for a traditional backup.
(Conditional) The Application Backup schedule is for the control files and archived redo logs. NetBackup uses this storage unit for the stream-based backups of the control files and the logs that are included in this policy. NetBackup copies the databases control files and archived redo logs to the storage unit you selected. For UNIX clients, if you selected Third-Party Copy Device as an off-host backup method, click Override policy storage unit. Then select a non-SAN Media Manager or other storage unit type that is appropriate to back up the control files and archived redo logs.
11 Click the Clients tab. Specify the clients to be included in this policy. 12 Click the Backup Selections tab. Specify a backup template or script. For information about using templates and scripts with a NetBackup for Oracle policy with Snapshot Client, see Snapshot Client effects on page 173. 13 Configure other attributes and add any additional schedules and backup selections.
163
Figure 6-4 on page 163 shows the interface to use when you define a NAS snapshot policy. Figure 6-4 NAS snapshot policy interface
Select the policy type Select appropriate storage unit or storage unit group
Click Perform snapshot backups Click Retain snapshots for instant recovery Click Perform off-host backup
Decide on a storage unit. a If you do not want to use a SnapVault storage unit, from the Policy storage unit list, select an appropriate non-SnapVault storage unit. Although the policy cannot run without a specified storage unit, NetBackup does not use the storage unit for NAS snapshot backups. NetBackup creates the snapshot on disk regardless of which storage unit you select. The policy storage unit is used for stream-based backups of control files and archived redo logs unless you override it in the Application Backup schedule.
164 NetBackup for Oracle with Snapshot Client Configuring snapshot backups
If you want to use a SnapVault storage unit, make sure you have defined a disk storage unit. Select the disk storage unit you have configured for SnapVault in the Policy storage unit list.
5 6 7
Select Perform snapshot backups and Retain snapshots for instant recovery. Select Perform off-host backup and Use data mover. From the pull-down menu under Use data mover, select Network Attached Storage. When the policy runs, NetBackup automatically selects the NAS_Snapshot method for creating the snapshot. As an alternative, you can manually select the NAS_Snapshot method using the Advanced Snapshot Options dialog from the policy display. For information about the Maximum Snapshots (Instant Recovery only) parameter, see the policy configuration chapter of the NetBackup Snapshot Client Administrators Guide. Click the Schedules tab. Click New. Configure both an Automatic Backup schedule and an Application Backup schedule, as follows:
8 9
The Automatic Backup schedule is for the database files. In the Destination panel, under Instant recovery, select Snapshots only. This suppresses NetBackups default behavior, which is to copy the snapshot to a storage unit. If you use SnapVault, the level you specify in the Retention field determines the retention period for the SnapVault copies on the SnapVault secondary. The Application Backup schedule is for the archived redo logs and the control files. If you use SnapVault, override the policy storage unit and specify a storage unit that is appropriate for the control files and archive logs.
10 Click the Clients tab. Specify clients to be backed up by this policy. 11 Click the Backup Selections tab. Specify a backup template or script. For information about using templates and scripts with a NetBackup for Oracle with Snapshot Client policy, seeSnapshot Client effects on page 173. 12 Configure other attributes and add any additional schedules and backup selections.
NetBackup for Oracle with Snapshot Client Restoring data from a snapshot backup
165
The NetBackup Snapshot Client Administrators Guide contains more information on snapshot rollbacks.
166 NetBackup for Oracle with Snapshot Client Restoring data from a snapshot backup
The following considerations are relevant for NetBackup for Oracle restores:
Snapshot rollback overwrites the entire volume. With NetBackup for Oracle, snapshot rollback always performs file verification. The agent checks for the following:
The requested files (number and names) are identical to those in the snapshot The primary volume does not contain any files that were created after the snapshot was made
RMAN only requests those files that have changed since the point in time indicated. This behavior can cause file verification to fail because the number of files requested does not match the number of files in the snapshot. To prevent this error, run the restore command with a shell script and use the FORCE option. If verification fails, the rollback aborts with 249.
Snapshot rollback should be used with database files only. Database files and archived redo logs should exist on different file systems or volumes.
For example: subvol1_restore.2005.05.19.10h49m04s To use the restored and new subvolume 1 2 3 4 Unmount the original subvolume, which is the subvolume that the restore process did not overwrite. Rename the original subvolume. Rename the new subvolume with the name of the original. Mount the new subvolume on the client. Use the ALTER DATABASE RENAME DATAFILE command to point to the restored data file on the newly created subvolume.
NetBackup for Oracle with Snapshot Client Configuring block-level incremental backups
167
To specify a snapshot rollback restore from the Java or Windows interface 1 2 Go to the NetBackup Backup, Archive, and Restore Interface. Click the Restore Files tab.
Note: 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 4 5 Set the Restore Type to Point in Time Rollback. Use the NetBackup for Oracle recovery wizard for the restore. Follow the restore procedure for typical backups. See Performing a restore on page 117.
If you want to use a shell script or RMAN command, set a new variable, NB_PC_ORA_RESTORE=rollback.
Note: 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. For 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; }
Troubleshooting
If the rollback restores fails, it might be because Oracle still has a file open. Shut down and restart the database to try to correct this problem.
168 NetBackup for Oracle with Snapshot Client Configuring block-level incremental backups
backup interface extends the capabilities of NetBackup to back up only changed data blocks. A database BLI backup is done at the file system block level, which means only changed blocks are backed up. Changed files are not backed up. VxFS Storage Checkpoint facility identifies changed blocks in real time. BLI backup does not need to search the entire database for the modified blocks. BLI backup saves time, decreases the amount of backup media that is required, and significantly reduces CPU and network overhead during backups. In addition, BLI backup allows more frequent backups, so backup images are more up-to-date. BLI backup is particularly useful for any large databases that are sized in terms of hundreds of gigabytes or terabytes. Using most traditional methods for database backup, any change in the databaseno matter how smallrequires that the entire database is backed up. Using BLI backup, only modified data blocks need to be backed up. The recommended method for performing BLI backups is the proxy BLI agent with RMAN. This method supports the other features of NetBackup for Oracle, including the policy types and schedules and the convenience of the RMAN template generation wizard. It also remains tightly integrated with RMAN and its catalog, which greatly simplifies administration tasks. Note: Symantec 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. For instructions on using the script-based BLI method without RMAN, see Script-based block-level incremental (BLI) backups without RMAN on page 203.
NetBackup for Oracle with Snapshot Client Configuring block-level incremental backups
169
stored the last full backup and the subsequent incremental backups must be available, or the restore cannot proceed. Note that restoring a file rewrites all blocks in that file. The first subsequent differential incremental backup and all subsequent cumulative incremental backups back up all the blocks in the restored file. After restoring an entire database, the first subsequent backup results in a full backup. The restore destination can be a VxFS, UFS (Solaris), JFS (AIX), or HFS (HP-UX) file system. The destination VxFS file system does not need to support the Storage Checkpoint feature to restore files, but a VxFS file system with the Storage Checkpoint feature is needed to perform BLI backups of the restored data. This section uses the following terms to describe BLI backups:
Full Backup. A backup in which NetBackup backs up the entire database file, not just data blocks changed since the last full or incremental backup. Cumulative BLI Backup. This is a backup of all the data blocks of database files that changed since the last full backup. A cumulative BLI backup image contains only the data blocks of database files that changed since the last full backup, but a cumulative BLI backup can reduce the number of incremental backup images that must be applied to a restore operation. This speeds up the restore process. Differential BLI backup. This is a backup in which NetBackup performs a backup of only those data blocks of database files that changed since the last backup of any type (full, cumulative incremental, or differential incremental backup) was performed.
When NetBackup initiates full database backups, followed by BLI backups, it creates, manages, and uses the appropriate Storage Checkpoints of the Oracle data file file systems.
Storage Checkpoint
The BLI backup methodology uses the Storage Checkpoint facility in the Veritas File System (VxFS). This facility is available through the Storage Foundation for Oracle. The VxFS Storage Checkpoint facility keeps track of data blocks modified by the database since the last backup. NetBackup with BLI backup leverages this facility to back up only changed blocks, not the entire database, for an incremental backup. VxFS Storage Checkpoint is a disk- and I/O-efficient snapshot of file systems. A Storage Checkpoint provides a consistent, stable view of a file system at the instant when the file system was snapped or checkpointed. Instead of making a physically separate copy of the file system, a Storage Checkpoint identifies and
170 NetBackup for Oracle with Snapshot Client Configuring block-level incremental backups
maintains only changed file system blocks, saving disk space and significantly reducing I/O overhead. By keeping track of changed blocks, the VxFS Storage Checkpoint enables BLI backups. VxFS Storage Checkpoint facility provides a consistent view of file systems, allowing BLI backup to freeze the database image during database backups. The Storage Checkpoint operation is similar to the snapshot file system mechanism. However, unlike a snapshot, the Storage Checkpoint persists after a system reboot. Also, the Storage Checkpoint operation is totally transparent to administrators. The Checkpoint image is managed and available only through 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 documentation. 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.
NetBackup for Oracle with Snapshot Client Configuring block-level incremental backups
171
backup window is relatively short (such as for incremental backups), an additional 10% of the file system size is usually sufficient. If the database has a heavy workload while a full backup is running, the file systems might require more space. While archive log mode is required when the database is online, this mode provides the best recoverability for taking offline Storage Checkpoints, too.
Configuration requirements
Before configuring BLI backups, make sure your configuration meets the following requirements:
NetBackup for Oracle is installed, licensed, and configured. NetBackup Snapshot Client is installed and configured, and the license key for this option has been registered. Veritas Storage Foundation for Oracle must be installed and configured. Veritas File System must have Storage Checkpoint licensed.
For more information on requirements, see the NetBackup Snapshot Client Administrators Guide.
172 NetBackup for Oracle with Snapshot Client Configuring block-level incremental backups
An Automatic Backup schedule to perform full and incremental file-based backups of the data files. An Application Backup schedule to perform a stream-based backup of control files and archived redo logs. These files are backed up using standard RMAN operations.
The following procedure describes how to configure a NetBackup for Oracle policy with BLI backups. To configure a policy for BLI backups 1 2 3 4 5 6 Open the policy you want to configure. Click the Attributes tab. From the Policy Type list, choose Oracle. Select a Policy storage unit. Select Perform block level incremental backups. To configure schedules, click the Schedules tab. Oracle does not support proxy backups of database control files and archived redo logs. To perform a whole database proxy backup, which automatically includes a backup of the control file, configure the following:
One or more automatic backup schedules to perform proxy BLI backups of the data files. An Application Backup schedule type to back up the control files and archived redo logs.
7 8
On the Clients tab, specify clients to be backed up with this policy. On the Backup Selections tab, specify the template or script.
173
To ensure that it has a proper set of images to restore, NetBackup performs a full backup when it encounters the following situations:
If the number of backup streams specified has changed from the previous backup. This can be accomplished by changing the NB_ORA_PC_STREAMS environment variable. If NetBackup does not have a valid full backup image for the same policy in its database. This can occur, for example, 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.
Types of backups
The backup types available on the Schedules tab of the policy play a different role for NetBackup for Oracle with Snapshot Client backups. Table 6-1 on page 173 explains these roles.
Application Backup
174 NetBackup for Oracle with Snapshot Client Snapshot Client effects
Automatic Full Backup, Automatic Differential Incremental Backup, Automatic Cumulative Incremental Backup
Automatic backup schedules automatically start the backups by running the NetBackup for Oracle RMAN scripts or templates. Automatic backup schedules control file-based snapshot backups of the database objects.
Note: Snapshot backups do not support BLI functionality. Oracle always updates the data file headers when performing a checkpoint of the database. This means that an incremental backup that copies each changed file in its entirety is likely to include all of a databases files, effectively performing a full backup. For snapshot backups, specifying any of the automatic backup types results in a full backup.
Schedule properties
Some schedule properties have a different meaning for Snapshot Client database backups than for a regular database backup. Table 6-2 on page 174 explains these properties.
175
Schedule properties on page 84 describes other schedule properties that are specific to database agent backups.
Environment variables
You can use environment variables to change the number of streams used for a proxy copy session or to specify an alternate backup schedule. For information on specifying these variables, see Configuring the runtime environment on page 89.
176 NetBackup for Oracle with Snapshot Client Snapshot Client effects
The following list shows variables that you can to set that are specific to the NetBackup for Oracle Snapshot Client: Environment variable
NB_ORA_PC_SCHED
Description
NetBackup for Oracle schedule used for a proxy copy file-based backup (Automatic Full, Automatic Differential Incremental, or Automatic Cumulative Incremental backup type). For scheduled backups, this variable is passed from the scheduler. When creating an RMAN template using the NetBackup for Oracle RMAN template generation wizard, this variable is automatically created in the template.
NB_ORA_PC_STREAMS
Specifies the number of backup streams that the NetBackup for Oracle Snapshot Client starts simultaneously in each proxy copy session. When a backup starts, NetBackup for Oracle Snapshot Client groups all data files into a specified number of backup streams based on the file size. NetBackup for Oracle Snapshot Client attempts to create streams of equal size. The default value for NB_ORA_PC_STREAMS is 1. Only a user can set this variable. When creating an RMAN template using the NetBackup for Oracle RMAN template generation wizard, this variable is automatically created in the template when you provide a value for the Number of parallel streams.
For NetBackup for Oracle with Snapshot Client, the order of precedence for environment variables is the same as for standard NetBackup for Oracle. Configuring the runtime environment on page 89 contains instructions for configuring variables set by NetBackup and variables set by a user. NetBackup for Oracle installs sample scripts in the following location:
/usr/openv/netbackup/ext/db_ext/oracle/samples/rman
The following are the NetBackup for Oracle with Snapshot Client sample scripts that show how to configure the required variables:
hot_database_backup_proxy.sh This script sets the environment and calls RMAN with the appropriate command to perform a whole database proxy backup. When NetBackup runs a schedule, it sets the environment variables that NetBackup for Oracle with Snapshot Client uses. The script shows how to use the RMAN send command to pass the NetBackup for Oracle with Snapshot Client variables with a vendor-specific quoted string. This script sets the environment and calls RMAN with the appropriate command to perform a tablespace proxy backup.
hot_tablespace_backup_proxy.sh
177
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 provided with the agent.
178 NetBackup for Oracle with Snapshot Client Snapshot Client effects
Chapter
Troubleshooting
This chapter contains the following topics:
General troubleshooting procedure on page 179 NetBackup reports on page 181 Setting the debug level on page 184 Troubleshooting backup or restore errors on page 185 Troubleshooting XML export or XML import errors on page 188 Troubleshooting the browser interface and wizards on page 191 Troubleshooting NetBackup for Oracle with Snapshot Client on page 192 Minimizing timeout failures on large database restores on page 193
NetBackup, NetBackup for Oracle, and the Oracle Recovery Manager (RMAN) all provide reports on database backup, archive, and restore operations. These reports are useful for finding errors associated with those applications.
NetBackup 6.5. Oracle RDBMS 8.0.4 or later. XML export and XML import require Oracle RDBMS 8.1.5 or later. NetBackup for Oracle 6.5.
To perform initial troubleshooting steps 1 When verifying your installation, ensure that the following NetBackup for Oracle binaries exist. These are located in /usr/openv/netbackup/bin.
bphdb. This binary resides on the client and is used by both the NetBackup scheduler and the graphical interface to start backups. The main purpose of bphdb is to run an Oracle template or shell script that in turn calls rman, bporaexp, or bporaimp. libobk is a shared library module that contains functions callable by RMAN. This library is loaded when RMAN is started. The name of this binary depends on the operating system.
libobk.so on NCR, SGI, Sequent, Linux, and Data General libobk.so.1 on Solaris Opteron (64-bit Oracle) libobk.so.1 on Solaris SPARC, Tru64 and Digital UNIX (32-bit Oracle) libobk.so64.1 on Solaris SPARC (64-bit Oracle) libobk.sl on HP-UX (32-bit Oracle) libobk.sl64 on HP-UX (64-bit Oracle) libobk.a on AIX libobk.a64 on AIX (64-bit Oracle) libobk.so64 on SGI (64-bit Oracle)
For XML export and XML import, verify that the following binaries exist.
/usr/openv/netbackup/bin/bporaexp /usr/openv/netbackup/bin/bporaimp /usr/openv/lib/libbpora.so.8.0 (libbpora.sl.8.0 on HP-UX) /usr/openv/lib/libbpora.so.9.0 (libbpora.sl.9.0 on HP-UX) /usr/openv/netbackup/bin/bporaexp64 /usr/openv/netbackup/bin/bporaimp64 /usr/openv/lib/libbpora64.so.8.0 (libbpora64.sl.8.0 on HP-UX) /usr/openv/lib/libbpora64.so.9.0 (libbpora64.sl.9.0 on HP-UX)
181
For the Backup, Archive, and Restore interface, verify that the following binaries exist.
Check that both the NetBackup server and client software are working 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. Check that the following NetBackup log directories exist.
On the client: bpdbsbora, bporaexp (or boraexp64), bporaimp (or boraimp64), dbclient, bphdb, and bpcd. On the master server: bprd and bpdbm.
On the host with the storage unit: bpbrm and bptm. These directories must have 777 permissions. The VERBOSE level must be 5.
Note: The logs can become very large, especially bpdbm. Ensure that enough free disk space exists in the log directory disk partition.
NetBackup reports
The NetBackup server and client software allow you to enable detailed debugging logs. The information in these log files can help you troubleshoot problems that occur outside of either the database agent or RMAN. Note the following with regard to these logs:
These logs do not reveal errors that occur when RMAN is running unless those errors also affect NetBackup. Oracle might (or might not) write to the NetBackup logs for errors in the application. Your best sources for Oracle error information are the logs provided by Oracle. Generally, each debug log corresponds to a NetBackup process and executable. However, for an RMAN backup, the debug log is created in the dbclient directory, which has no corresponding executable.
For information about the debugging log files, see the NetBackup Troubleshooting Guide and the /usr/openv/netbackup/logs/README.debug file.
Enabling logging
To enable the database agent logs 1 Create the following directories on the client:
/usr/openv/netbackup/logs/bpbackup /usr/openv/netbackup/logs/bpbkar /usr/openv/netbackup/logs/bpdbsbora /usr/openv/netbackup/logs/bphdb /usr/openv/netbackup/logs/bporaexp /usr/openv/netbackup/logs/bporaimp /usr/openv/netbackup/logs/bprestore /usr/openv/netbackup/logs/tar /usr/openv/netbackup/logs/dbclient
For example:
cd /usr/openv/netbackup/logs mkdir bphdb
Set the access permissions to 777 on these log directories. For example:
chmod 777 bphdb
Enable logging for the nbpem, nbjm, and nbrb scheduling processes, which use unified logging. NetBackup writes unified logs to /usr/openv/logs. You do not need to create log directories for processes that use unified logging. For information on using logs and reports, see the NetBackup Troubleshooting Guide.
183
obk_stderr.mmddyy Unless redirected elsewhere, NetBackup writes NetBackup for Oracle template or shell script errors to this file. log.mmddyy bphdb is the NetBackup database backup binary. This log contains debugging information for the bphdb process. NetBackup for Oracle uses this client process for NetBackup for Oracle template or shell script execution. It is invoked when an automatic backup schedule is run.
Enable detailed logging by entering the following line in the bp.conf file:
VERBOSE = 5
185
/user/openv/netbackup/logs/bporaimp When bporaexp and bporaimp are being used and the backup images are written to an operating system directory, the file specified by the LOG= parameter is the only source of error logging and tracing.
On the NetBackup side, an error can be from the API, from the NetBackup server or client, or from Media Manager. On the Oracle side, an error can be from RMAN or from the target database.
Symantec suggests that you use the following steps when troubleshooting a failed operation: 1 2 Check the logs to determine the source of the error. Troubleshoot each stage of the backup or restore.
The first place to start is to run rman from the command line rather than having the NetBackup scheduler run a script. These troubleshooting steps assume you are running rman from the command line. If NetBackup and RMAN are communicating, look for a log in /usr/openv/netbackup/logs/dbclient. If a log file exists and you are having problems, this usually indicates a configuration problem within the NetBackup policy or media availability. For example:
cd /usr/openv/netbackup/logs/dbclient ls log.123098
The preceding example shows how to check for a log files presence. The presence of a log file indicates that NetBackup and Oracle RMAN are linked correctly.
If NetBackup and Oracle rman are not communicating, you do not see a log in /usr/openv/netbackup/logs/dbclient. Logs are not created in this directory if the permissions are not set correctly for the Oracle user to write to the directory. A full permission setting is best. Type chmod 777 to open up all permissions. If you receive an error such as one of the following, it often means that the link step (oracle_link) failed:
RMAN-00571:============================================================ RMAN-00569:=============== ERROR MESSAGE STACK FOLLOWS: =============== RMAN-00571:============================================================ RMAN-03009: failure of allocate commands on t1 channel at 05/11/2005 09:29:37 ORA-19554: error allocating device, device type: SBT_TAPE, device name: ORA-27211: Failed to load Media Management Library Additional information: 25
If you suspect a link failure, refer to Linking the library on page 52.
Use the following procedure to verify that the RMAN script works correctly:
To verify the RMAN script 1 2 3 4 Use RMAN to make a backup directly to disk. Do not use NetBackup. Use RMAN with NetBackup to create a backup. Check the /usr/openv/netbackup/logs/dbclient directory permissions. They should be set to 777. Look for a log file in /usr/openv/netbackup/logs/dbclient If no log file exists, libobk is not linked into Oracle properly. For the relinking procedure, see Linking the library on page 52.
From an RMAN backup or restore initiated from the operating system prompt such as:
187
rman target user/pwd[@TNS_alias] \ rcvcat user/pwd[@TNS_alias]\ cmdfile RMAN_script_file_name where the RMAN_script_file_name is fully qualified.
Using a template run from the NetBackup client interface or from bpdbsbora. Manually from the administrator interface on the master server.
Automatically by an automatic backup schedule. If an error occurs at this point, check the RMAN log. 2 RMAN verifies its environment and then issues requests to the API. Some information, such as the NetBackup version, API versions, trace file name, and NetBackup signal handlers, is registered with RMAN. An error at this point 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 client. RMAN issues a backup or restore request. 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 returning. The API then sends this information to the master servers bprd process. To troubleshoot a problem in this part of the first sequence, examine the following file: /usr/openv/netbackup/logs/dbclient/log.mmddyy If the bprd process failed, check the logs for bprd and bpbrm. A failure at this point 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. 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: setenv NB_ORA_POLICY policyname setenv NB_ORA_SCHED application_backup_schedule_name setenv NB_ORA_SERV NetBackup_server 4 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 NetBackupor RMAN.
RMAN aborts if it encounters an error while reading 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. NetBackup might return an error code to the API if for some reason it could not complete the backup successfully.
On the NetBackup side, an error can be from the bporaexp or bporaimp programs, the NetBackup server or client, or Media Manager. On the Oracle side, an error can be from the target database.
Symantec suggests that you use the following steps when troubleshooting a failed operation: 1 2 Check the logs to determine the source of the error. Troubleshoot each stage of the XML export or XML import.
The following sections describe these steps in detail. These sections describe the log files from the bporaexp and bporaimp commands. For 32-bit Oracle, the logs are created in /usr/openv/netbackup/logs/bporaexp or /usr/openv/netbackup/logs/bporaimp. For 64-bit Oracle, the logs are created in /usr/openv/netbackup/logs/bporaexp64 and /usr/openv/netbackup/logs/bporaimp64. The following sections reference the bporaexp and bporaimp directories. If you are using 64-bit Oracle, look in the bporaexp64 and bporaimp64 directories.
189
For example, the following common problems are caused by incorrect installation or configuration:
The bporaexp or bporaimp program was unable to connect to the target database. When bporaexp and bporaimp are being used and the backup images are being written to an operating system directory, these logs are the only source of error logging and tracking. 2 Check the NetBackup logs. The first NetBackup log to check is /usr/openv/netbackup/logs/bporaexp/log.mmddyy or /usr/openv/netbackup/logs/bporaimp/log.mmddyy. 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:
Activities between bporaexp and bporaimp and NetBackup processes If /usr/openv/netbackup/logs/bporaexp/log.mmddyy /usr/openv/netbackup/logs/bporaimp/log.mmddyy do not contain any messages, the following conditions could be present:
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. Usually, the error is 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. 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.
specified in the bporaexp or bporaimp commands parfile. It suggests solutions for problems that can occur at each point in the sequence. To troubleshoot by stage 1 bporaexp or bporaimp starts. An export or import can be started in any of the following ways:
Command line from the system prompt. For example: bporaexp parfile = parameter_filename bporaimp parfile = parameter_filename Using a template 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 at this point, check the bporaexp or bporaimp log.
bporaexp or bporaimp verifies its environment and then connects to Oracle and NetBackup. Oracle connect errors can be caused by an Oracle environment problem, a database problem, an incorrect userid, or an incorrect password. A NetBackup error at this point 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 client. bporaexp or bporaimp issues a backup or restore request. bporaexp or bporaimp gathers necessary parameters, sends the backup or restore request to the NetBackup server, and waits until both the server and client are ready to transfer data before proceeding. The NetBackup client interfaces gather information from the following places:
The environment, including bporaexp and bporaimp parameter files. If you are using templates, the parameter files are generated from the template. If you are using scripts, you have to generate the parameter file manually.
The users bp.conf and /usr/openv/netbackup/bp.conf files on the client. This information is sent to the master servers bprd process. To troubleshoot a backup problem in this part of the sequence, examine the following file: /usr/openv/netbackup/logs/bporaexp/log.mmddyy If the bprd process failed, check the bprd and bpbrm logs.
191
Frequently, incorrect NetBackup server or Oracle policy configuration parameters cause failures at this point. 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. 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
To troubleshoot a restore, examine the following log file: /usr/openv/netbackup/logs/bporaimp/log.mmddyy Make sure that the correct NetBackup server and NetBackup client values are being used by setting the following bporaimp parameters:
NB_ORA_SERV=NetBackup_server NB_ORA_CLIENT=NetBackup_client
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. The reverse process is used by bporaimp. 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. 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.
A NetBackup for Oracle license is installed on the master server. For browsing in the restore window, the policy type must be set to Oracle. Perform the following actions to change the client policy type:
a b c
On the Actions menu, select Specify NetBackup Machines and Policy type. In the Policy type drop down list, select Oracle. Click OK.
The oratab file is in the correct location (/etc/oratab or /var/opt/oracle/oratab) and contains all of the available Oracle SIDs.
If you have trouble connecting to the Oracle database, verify the following:
Make sure the database is in a mount or open state. Make sure that your login ID and password have Oracle SYSDBA privileges. Initially, NetBackup for Oracle attempts OS Authentication to log on. If that fails, you are prompted for a user name, password, and an optional Transparent Network Substrate (TNS) alias. The user name and password you enter must have SYSDBA privileges. In a clustered environment, failure to connect to the database can mean a problem with the network configuration. The browser must connect locally. However, in some environments, all connections are considered to be remote connections, even a connection to a local database. This is true, for example, in an Oracle Real Application Clusters (RAC) environment. In such cases, you must make the connection using a TNS alias.
In a Linux environment, Oracle backups and restores fail if the Linux login is not the Oracle user. In such cases, Oracle generates the following message:
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.
193
bptm/bpdm on the NetBackup media server online_util on the NetBackup client and alternate client bpbkar on the NetBackup client and alternate client bpfis on the NetBackup client and alternate client bppfi on the NetBackup client or alternate client
Snapshot Client restore and debug messages are written to the following subdirectories on the NetBackup master server:
bprestore. This is almost always a client log. bprd. bpbrm. This is always a media server log. bptm/bpdm. This is always a media server log. tar. This is always a client log.
Additional troubleshooting information, including troubleshooting installation problems, is available in the NetBackup Snapshot Client Administrator's Guide.
To minimize loading and unloading of tapes You can minimize excessive unloading and reloading of tapes between multistreamed backups by making changes on the NetBackup media server.
In the /usr/openv/netbackup/bp.conf file on the NetBackup media server, add the following options:
MEDIA_UNMOUNT_DELAY. MEDIA_REQUEST_DELAY. Use this variable only with non-robotic drives, such as tape stackers.
Appendix
Virtual names on page 195 Archiving schemes on page 196 Backing up a database on page 199 Restoring a database on page 200 Restoring archive logs on page 201
In an Oracle9i or Oracle 10g Real Application Clusters (RAC) environment, many Oracle instances exist on separate servers, each with direct connectivity to a single Oracle database. All the servers can run transactions concurrently against the same database. Should any single server or instance fail, processing continues on the surviving servers. RAC supports all Oracle backup features that are available in exclusive mode, including both online and offline backups of either an entire database or individual tablespaces.
Virtual names
A virtual name is a network host name resource (mapped to a IP address) that is associated with an application. If it is possible, virtual names should be used for the client and server nodes. Using a virtual node name for the client allows you to specify a single client entity for all of the Oracle backups. This allows NetBackup to perform a restore to any physical node. If a virtual client name is not used, a regular restore can only be performed from the node associated to the client name specified on the backup. Another possible solution in this environment is to use an alternate client restore.
Archiving schemes
The preferred RAC configuration uses a cluster file system archiving scheme. In this scheme, each node writes to a single Cluster File System (CFS) archived log destination and can read the archived log files of the other nodes. Figure A-1 on page 196 depicts a CFS archiving scheme. Figure A-1 CFS archiving scheme
Node 1
Node 2
If the CFS solution is not available, Oracle recommends a scheme like that in Figure A-2 on page 197. In that figure, 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 Non-CFS local archiving scheme with archive sharing
Archive destination 1
Archive destination 2
Archive destination 1
Archive destination 2
Node 1 NFS mount or Shared location read and write access Physically attached Logically attached
Node 2
A scheme similar to the previous one exists if each node archives to a local directory, as in Figure A-3 on page 198, and the locations are shared (read-only) with the other nodes in the cluster. These locations are shared between the nodes by NFS-mounting the directory (UNIX) or sharing the locations (Windows). Therefore, each node can read each archive destination. Figure A-3 Non-CFS local archiving scheme with archive read-only sharing
Archive destination 1
Archive destination 2
Archive destination 1
Archive destination 2
Node 1 NFS mount or Shared location read and write access Physically attached Logically attached
Node 2
The simplest archiving scheme is local archiving with no sharing, as shown in Figure A-4 on page 199. Each node writes only to the local destination, and no access is given to the other nodes in the cluster. Figure A-4 Non-CFS local archiving scheme with no archive sharing
Archive destination 1
Archive destination 2
Node 1
Node 2
For more information, including configuration and additional archiving scheme examples, see your Oracle documentation.
Backing up a database
If you are in a RAC environment and you chose one of the archive log schemes described in the previous section, you can perform a backup and a restore using typical RMAN scripts. In the following example, RMAN backs up the database, including all of the archive logs. This example assumes that the archive logs are accessible by each node in the cluster. If they are not, then the archive logs need to be backed up separately on each node.
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; }
Restoring a database
Restoring the database using a virtual name or restoring from the node where the backup was performed is straightforward and identical to a typical RMAN restore.
Example
In this example, the client is saturn and the server is jupiter. The names saturn and jupiter can be either the physical names or the virtual names of the nodes in the cluster. 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; }
Troubleshooting
An RMAN restore to one node of a cluster can fail with a status code 39. This happens when the following situation is present:
The NB_ORA_CLIENT environment variable is set to the virtual host name of the cluster. and The CLIENT_NAME variable in the user or master bp.conf file on the client is set to the virtual host name of the cluster.
To remedy this, set the CLIENT_NAME variable to the node name. For more information on restores and redirected restores, see Performing a restore on page 117.
If the remote archived log destinations allow write access. See Figure A-2 on page 197. If the archive logs reside on a CFS. See Figure A-1 on page 196.
In the examples that follow, the client is saturn and the server is jupiter. The names jupiter and saturn can be either the physical names or the virtual names of the nodes in the cluster. The following example restores all of the archive logs:
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'; SET ARCHIVELOG DESTINATION TO <directory>; RESTORE ARCHIVELOG ALL; RELEASE CHANNEL ch00; }
where <directory> is the directory into which you copied the archive logs. Use a script like the preceding one if your configuration is like that shown in Figure A-3 on page 198 and Figure A-4 on page 199.
Appendix
Script-based BLI backup overview on page 204 Installation requirements on page 206 Configuring script-based BLI backups on page 207 Performing backups and restores on page 217 Troubleshooting on page 220
NetBackup for Oracle with Snapshot Client extends the capabilities of NetBackup to back up only changed data blocks of Oracle database files. NetBackup recommends using RMAN-based BLI backups, which allow the use of templates and remain tightly integrated with Oracle administration. For more information on BLI backups, see NetBackup for Oracle with Snapshot Client on page 147. If you choose to use script-based BLI backups without RMAN, this chapter describes the necessary configuration.
Terms
The following list contains terms that might be new to you: Term Definition
cold database backup A cold database backup is taken while the database is offline or closed. 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. hot database backup A hot database backup allows the database to be online and open while 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. To use hot backups, the database must be in ARCHIVELOG mode. BLI backup uses the alter tablespace begin backup command and the alter tablespace end backup command to put the database into and take it out of backup mode. This method is also referred to in Oracle documentation as an inconsistent whole database backup or open backup. Unlike the cold database backup method, the data in hot backups is fuzzy or inconsistent until the appropriate redo log files (online and archived) are applied after the restore operation to make the data consistent.
Term
Definition
quick freeze database A quick freeze database backup is a combination of the traditional backup cold and hot database backup. A quick freeze database backup initially shuts down the database to create a Fulldata Storage Checkpoint for a consistent database backup. Because the VxFS Fulldata Storage Checkpoint is a snapshot of the database image, an Oracle instance can be brought back online as soon as the Fulldata Storage Checkpoint is created. The Oracle instance can remain online while NetBackup is backing up the database using the Fulldata Storage Checkpoint. A quick freeze database backup is different from the traditional Oracle online backup. Quick freeze database backup is also an online database backup, but 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 after the Fulldata Storage Checkpoint is taken. A backup image from a quick freeze database backup is equivalent to a backup image from a cold database backup. You can choose to use this backup method when configuring BLI notify scripts. See Creating notify scripts on page 213.
Installation requirements
To verify the installation requirements 1 Make sure that the following products are properly installed and configured:
NetBackup 6.5 A supported level of Oracle NetBackup for Oracle 6.5 Veritas Storage Foundation for Oracle
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
The command displays all the valid licenses 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 are working properly. Particularly, verify that you can back up and restore typical operating system files from the client.
Policy attributes Clients and the files or directories to be backed up on the client Storage unit to use Backup schedules
Most database NetBackup BLI backup policy requirements are the same as for file system backups. The differences or special requirements, where they exist, are defined in the following sections.
One full backup schedule One incremental backup schedule One user-directed backup schedule for control files and archive logs
Only one backup stream is initiated for each backup policy during automatic backups. To enable multiple backup streams, define multiple policies for the same database. If you have more than one database SID, configure policies for each SID. If you intend to do simultaneous backups of more than one SID on the same file system, use Nodata Storage Checkpoints. Set the METHOD to NODATA_CKPT_HOT. For example, to back up file systems F1, F2, F3, and F4 with two streams, you need to define two policies (P1 and P2) with F1 and F2 backed up in P1, and F3 and F4 backed up in P2. If you have one large file system that needs to be backed up with multiple streams, divide the files in the file system between different policies. After a file is added to a policy, it should stay in that policy. If you must rearrange the file list, do so only prior to a full backup.
If you have more than one policy defined for an Oracle instance, the instance is grouped by the NetBackup keyword phrase. Identify one of the policies as the POLICY_IN_CONTROL in the NetBackup notify scripts. This is the policy that performs database shutdowns and restarts. All policies with the same keyword phrase need to be configured to start simultaneously. Caution: 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. For more information, see Troubleshooting on page 220. 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:
File System Backup Coverage Report (UNIX only) ----------------------------------------------Key: * - Policy is not active UNCOVERED - Mount Point not covered by an active policy MULTIPLE - Mount Point covered by multiple active policies CLIENT: mars Mount Point ----------/ /home /oradata1 /oradata2 /oradata3 /opt /oracle /stand /usr /var
Device -----/dev/vg00/lvol3 /dev/vg00/lvol5 /dev/dsk/c1t0d0 /dev/dsk/c1t0d0 /dev/nbuvg/nbuvol /dev/vg00/lvol6 /dev/vg00/oracle /dev/vg00/lvol1 /dev/vg00/lvol7 /dev/vg00/lvol8
Backed Up By Policy ------------------production_servers production_servers block_incr1 block_incr1 UNCOVERED production_servers production_servers production_servers production_servers production_servers
Notes -----
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.
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.
Policy attributes
NetBackup applies policy attribute values when it backs up files. Certain attributes must be set for BLI backup:
Policy Type. Set to Standard. Perform block level incremental backups. Select to enable BLI backups. If the BLI attribute is not enabled, 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. Keyword phrase. Define as the Oracle instance name ($ORACLE_SID) in each of the policies for the same instance. Multistream backups start when all the policies with a particular keyword phrase complete their respective startup scripts. If you have multiple Oracle instances (SIDs) use a separate set of policies for each SID. If the SIDs are backed up simultaneously and any share a common file system for data files, use Nodata Storage Checkpoints. Set the METHOD to NODATA_CKPT_HOT.
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. The NetBackup Administrators Guide, Volume I describes other policy attributes and how to configure them.
Client list
The client list specifies the clients upon which you configured a BLI backup. For a database backup, specify the name of the machine upon which the database resides. Specify the virtual hostname if clustered.
existing configuration are backed up without having to update the file list. Use the check_coverage script to make sure all file systems are backed up. 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.
Schedules
The NetBackup server starts these schedule types:
Each BLI backup policy must include one full backup schedule and at least one incremental backup schedule. In addition, you must designate one of the BLI backup policies as the POLICY_IN_CONTROL. The policies for each stream must have the same types of schedules. The NetBackup Administrators Guide, Volume I describes other schedule attributes and how to configure them.
Schedule types
You can configure the following types of schedules:
User-directed backup schedule. The user-directed backup schedule encompasses all the days and times when user-directed backups are allowed to occur. Set the backup window as described in Schedule times on page 211. The policies for each stream must have the same types of schedules. Automatically initiated backup schedules. Include server-initiated backup schedules to specify the days and times for NetBackup to automatically start backups of the files specified in the policy file list. Set the backup window as described in Schedule times on page 211.
Schedule times
For server-initiated full and incremental backup schedules, set the start times and durations to define the appropriate windows for the backups. Follow the same procedure used to define backup schedules for other policies. For more information on these procedures, see the NetBackup Administrators Guide, Volume I. The backups are started by the scheduler only within the backup window specified. For the POLICY_IN_CONTROL, include in the user-directed backup schedule the time periods when the BLI backup policies complete.
Retention
Set the retention level and periods to meet user requirements.
18:00:00 --> 18:00:00 --> 18:00:00 --> 18:00:00 --> 18:00:00 --> 18:00:00 --> Schedule: userbkup Type: User Backup Retention Level: 3 (one month) Daily Windows: Sunday 00:00:00 --> Monday 00:00:00 --> Tuesday 00:00:00 --> Wednesday 00:00:00 --> Thursday 00:00:00 --> Friday 00:00:00 --> Saturday 00:00:00 -->
In this example, the oracle_backup1 policy backs up all the files in /oradata/oradata1. The policy specifies a weekly full backup, a daily differential incremental backup, and a user-directed backup schedule. The archive logs and the control file are backed up using the user-directed schedule at the completion of the full or incremental backup.
Cold database backup. Set METHOD to SHUTDOWN_BKUP_RESTART. An offline backup where 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 is running. Hot database backup. Set METHOD to ALTER_TABLESPACE.
An online backup of an open database. Hot backups are required if the database must be up and running 24 hours a day, 7 days a week.
Nodata Storage Checkpoint Hot. Set METHOD to NODATA_CKPT_HOT. A backup where the tablespaces are in backup mode for the duration of the backup and a Nodata Storage Checkpoint is used to reduce the amount of file system space consumed. Use this method if all of the following conditions are present:
You are backing up multiple Oracle instances. More than one instance shares the file system. The backup of the instances can overlap in time.
Quick freeze backup. Set METHOD to SHUTDOWN_CKPT_RESTART. A backup where all database files are consistent to the same point in time when the database was last shut down to take a Fulldata Storage Checkpoint. Unlike a cold backup, a quick freeze database backup requires only a brief offline period during the creation of the Fulldata Storage Checkpoint. After the Fulldata Storage Checkpoint is created, the database is online while the backup is running.
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 using the cold and quick freeze database backups, the default shut down command used in the bpstart_notify.oracle_bli script is shutdown or shutdown normal. These commands wait for all users to log off before initiating the shut down. 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 shut down. Attempt to use the default shut down commands to shut down the database cleanly. Alternatively, you can use shutdown immediate to initiate the database shut down immediately.
/usr/openv/netbackup/ext/db_ext/oracle/bin/setup_bli_scripts This script copies the sample notify script templates to /usr/openv/netbackup/bin and makes the necessary changes based on the information you provide. The notify script templates are located on the local machine in the following location: /usr/openv/netbackup/ext/db_ext/oracle/samples The following sections describe the information you need to supply when running setup_bli_scripts. For more information about using the notify scripts to back up your Oracle database, see Manual backups on page 218.
Purpose
User name of the Oracle database administrator. Typically, oracle. $ORACLE_BASE of the Oracle instance. $ORACLE_HOME of the Oracle instance. Oracle instance ID ($ORACLE_SID) if it is different from the keyword. Directory in which the Oracle archive logs reside. Location to which a copy of the Oracle control file is written so that it can be backed up. sqldba, svrmgrl, or sqlplus command to start up or shut down the database. 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_LOGS ORACLE_CNTRL
SQLCMD
ORACLE_INIT
Environment variable
ORACLE_CONFIG
Purpose
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.
Cold backup. Set METHOD to SHUTDOWN_BKUP_RESTART. NetBackup shuts down the database, backs up the database, and then restarts the database. Hot backup. Set METHOD to ALTER_TABLESPACE. NetBackup uses the alter tablespace begin backup command to change the tablespaces to online backup mode, take a Fulldata Storage Checkpoint of the database file, and then use the alter tablespace end backup command to change the tablespaces back to normal mode. Nodata Storage Checkpoint Hot backup. Set METHOD to NODATA_CKPT_HOT. NetBackup uses the alter tablespace end backup command to change the tablespaces to online backup mode, take a Nodata Storage Checkpoint, and back up the tablespaces while in the backup mode. The tablespaces are taken out of backup mode by using the alter tablespace end backup command when the backup is complete. Quick freeze backup. Set METHOD to SHUTDOWN_CKPT_RESTART. NetBackup shuts down the database, creates the Fulldata Storage Checkpoint, and then restarts the database before the database backup starts.
Please enter the user name of your Oracle administrator? orac901 ORACLE_BASE is the Oracle enviroment variable that identifies the directory at the top of the Oracle software and administrative file structure. The value of this variable is typically /MOUNTPOINT/app/oracle Please enter your ORACLE_BASE? /dbhome/oracle/orac901 ORACLE_HOME is the Oracle enviroment variable that identifies the directory containing the Oracle software for a given Oracle server release. The value of this variable is typically /dbhome/oracle/orac901/product/RELEASE Please enter your ORACLE_HOME? /dbhome/oracle/orac901 sqlplus will be used. 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 "connect / as sysdba" will be used.
Please enter the Oracle instance (ORACLE_SID) you want to back up? orac901 If you are using a CONFIG.ORA file, you need to specify where it is, so that it can be backed up. If this does not apply apply to your configuration, hit ENTER to go on. If this does apply to your configuration, specify the file path. Typically this would be: /dbhome/oracle/orac901/admin/orac901/pfile/configorac901.ora but this file could not be found. Enter your Oracle config file path or hit ENTER: 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.
Enter the directory path to your Oracle archive logs? /dbhome/oracle/orac901/admin/orac901/arch Do you have more archive log locations? (y/n): n
Do you want the output of successful executions of the NetBackup scripts mailed to you? y Please enter the mail address to send it to? [email protected] Do you want the output of unsuccessful executions of the NetBackup scripts mailed to you? y Please enter the mail address to send it to? [email protected] There are 4 backup methods to choose from: ALTER_TABLESPACE - Use alter tablespace begin backup method NODATA_CKPT_HOT - Use alter tablespace begin backup with nodata ckpts SHUTDOWN_CKPT_RESTART - Shutdown, create the ckpt clones, and restart SHUTDOWN_BKUP_RESTART - Shutdown the DB, backup, and then restart If one of the methods requiring DB shutdown are selected, you may experience problems with timeouts if the database can't be shut down in a timely manner. You may want to change the shutdown command in the notify scripts to shutdown immediate, or you may have to increase the BPSTART_TIMEOUT value in the bp.conf file on the master server, or you may want to change the backup method to ALTER_TABLESPACE or NODATA_CKPT_HOT. Note: the default BPSTART_TIMEOUT value is 300 seconds. Do you want to use the ALTER_TABLESPACE method? y 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 Please Please Please Please Please Please enter enter enter enter enter enter enter the the the the the the the name name name name name name name of of of of of of of the policy that will be the POLICY_IN_CONTROL? BLI_1 another policy or DONE to stop? BLI_2 another policy or DONE to stop? BLI_3 another policy or DONE to stop? BLI_4 another policy or DONE to stop? BLI_5 another policy or DONE to stop? BLI_6 another policy or DONE to stop? DONE
Performing backups
Note: You must be the root user to perform all operations using the BLI backup software.
Automatic backups
The best way to back up databases is to set up schedules for automatic backups. To add a new schedule or change an existing schedule, follow the guidelines in Creating NetBackup policies for script-based BLI backup on page 207.
Manual backups
You can also run an Automatic Backup schedule manually using the NetBackup Administration Console. For information about performing manual backups of schedules, see the NetBackup Administrators Guide, Volume I. 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 in the bpstart_notify script to NODATA_CKPT_HOT. The bpstart_notify script changes the tablespaces to online backup mode before the backup begins. The bpend_notify script changes the tablespaces back to normal mode after the backup completes. To perform a quick freeze backup, set the environment variable METHOD in the bpstart_notify script to SHUTDOWN_CKPT_RESTART. The bpstart_notify script shuts down the database and the post_checkpoint_notify script restarts it immediately after the Fulldata Storage Checkpoints are created. Taking VxFS Fulldata Storage Checkpoints is very fast (within a minute), and with the NetBackup queueing delay for scheduling the backup jobs, the database down time is typically only a few minutes.
ls -la /db02 total 2192 drwxr-xr-x 2 root root 96 drwxr-xr-x 9 root root 8192 -rw-r--r-- 1 oracle dba 1048576 lrwxrwxrwx 1 oracle dba 22 .cust.dbf::cdev:vxfs:
20 20 20 20
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 backup all Quick I/O files in a directory, you can simplify the process by just 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, but not all, files in those directories.
Restoring backups
Restoring the backup images created by a BLI backup is no different than restoring the backup images created using the default NetBackup configuration. Restoring to any of the incremental backup images requires NetBackup to restore the last full backup image and all the subsequent incremental backups until the specified incremental backup image is restored. NetBackup does this automatically. The media that stored the last full and the subsequent incrementals must be available, or the restore cannot proceed. You can start the restores from the NetBackup client by using the Backup, Archive, and Restore interface. To restore the latest copy of each file, select either the files or parent directories with the latest backup date, and click Restore. For more information on restoring, see the NetBackup Backup, Archive, and Restore Getting Started Guide. If the operation is to restore files from an incremental backup image, NetBackup issues multiple restore operations beginning from the last full backup image and the subsequent incremental backup images until the selected date. The activity of multiple restores is logged in the Progress Log. If you plan to restore files backed up by another client or to direct a restore to another client, start the restore from the NetBackup server using the Backup, Archive, and Restore interface. Before initiating a restore, a backup must have successfully completed or an error occurs during the execution. For Solaris, the restore destination can be a VxFS or UFS file system. The destination file system does not need to support the Storage Checkpoint feature, but to be able to perform BLI backups of the restored data, a VxFS file system with the Storage Checkpoint feature is required. For HP-UX, the restore destination can be a VxFS or HFS file system. The destination file system does not need to support the Storage Checkpoint feature
220 Troubleshooting
to restore files, however, a VxFS file system with the Storage Checkpoint feature is required to perform BLI backups of the restored data. For AIX, the restore destination can be a VxFS or JFS file system. The destination file system does not need to support the Storage Checkpoint feature to restore files, however, a VxFS file system with the Storage Checkpoint feature is required to perform BLI backups of the restored data. Note that restoring a file causes all blocks in that file to be rewritten. Thus, all the blocks in the file are considered to have been modified. This means that the first subsequent differential incremental backup and all subsequent cumulative incremental backups will back up all of the blocks in the restored file. If you are restoring an entire database and/or file system, note that the first subsequent backup backs up all blocks that are restored. 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.
Troubleshooting
This section provides tips on troubleshooting common issues with script-based BLI backups.
Checking logs
NetBackup provides logs on the database backup and restore operations. These logs are useful for finding problems associated with those operations.
221 Troubleshooting
For more information on debug logs, see the NetBackup Troubleshooting Guide for UNIX and Windows 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 this and other reports, see the NetBackup Administrators Guide, Volume I.
Automatically by a NetBackup server using a full or incremental schedule If an error occurs during the start operation, examine the Java reports window for the possible cause of the error.
If the backup or restore started successfully, but eventually failed, one of the following could be the cause:
VxFS errors For more information, see the NetBackup Troubleshooting Guide for UNIX and Windows.
222 Troubleshooting
There can be insufficient disk space for the VxFS Fulldata Storage Checkpoints to keep track of changed block information. Check the All Log Entries report for errors. If there is a file system out-of-space condition, increase the size of the file system so it is large enough for Fulldata Storage Checkpoints or use the Nodata Storage Checkpoint Hot backup method. This error does not affect the integrity of the backup images because a full backup of the affected file system will occur after the condition is fixed. If an incremental backup is intended, but the whole file system is backed up instead, one of the following conditions might be present:
Storage Checkpoints that keep track of changes have been removed The Block level incremental attribute is not selected
Other errors with a nonzero status code The most common cause of this problem is the Storage Checkpoint that keeps track of the block changes was removed by the file system. This might happen if the file system runs out of space, and there are no volumes available to allocate to the file system. This does not affect the integrity of the backup images because a full backup of the file system will occur at the next backup opportunity after NetBackup detects that a Storage Checkpoint is missing.
Status codes
The status codes and their meanings are as follows:
Status Code 9. An extension package is needed but was not installed. The client does not have the NetBackup binaries required to do BLI backups. Use update_clients on the server to push out new binaries. Also, use vxlicense -p to verify that the Storage Checkpoint feature [83] and the Veritas Storage Foundation for Oracle [100] are installed. Status Code 69. Invalid file list specification. Look for a message such as the following in the error log on the server:
FTL - /oradata is not in a VxFS file system. A block incremental backup of it is not possible.
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
223 Troubleshooting
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. Check the BPEND_TIMEOUT setting on the NetBackup server. The BPEND_TIMEOUT specified did not allow enough time for the script to complete. The restart database operation might be taking too long, or the script might be waiting for other streams to call the bpend_notify script. Check the bpend_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 can allow all streams to be started at the same time are configured. Verify that all needed tape drives are working and available during backup. Status Code 77. Execution of the specified system command returned a nonzero status code. Check the post_checkpoint_notify_output.KEYWORD file in the /usr/openv/netbackup/bin/BLOCK_INCR directory for the possible cause. The post_checkpoint_notify script exited with a nonzero status code. Status Code 143. Invalid command protocol. Check to see if the Block level incremental policy attribute is selected without a keyword specified. Set the Keyword phrase in the policies to the Oracle instance name ($ORACLE_SID).
224 Troubleshooting
Database recovery
A BLI backup does not perform automatic database recovery. This process includes restoring the database files from NetBackup images and applying the Oracle redo log files to the database files. Follow the Oracle documentation to perform database recovery after a restore.
Index
Symbols
.xml 128 .xsc 128 /Oracle/XMLArchive 134
B
backup automatic using scripts 113, 126 errors 221 methods 213, 215 methods or types of 212 performing 218 wizard, invoking 175 Backup Selections list adding selections 88, 89 overview 87 backups manual 106 BFILE_DIRECTORY 139 binaries, pushing out 222 BLI Backup restores 219 BLI no RMAN adding policies 207 backup example 211 cold backup 204 goodies directory 208 hot backup 204 improving performance 224 mailid 208 requirements 206 schedule types 210 schedules 205 standard policy type 207 workload 224 Block level incremental 222 Block-level Incremental backup, see Snapshot Client boraexp64 181 boraimp64 181 bp.conf 93 administrator 194 troubleshooting 187, 191 BPBACKUP 93 BPBACKUP_POLICY 93 BPBACKUP_SCHED 93
A
Advanced Client for Oracle 147 ALTER_TABLESPACE 212, 215, 218 API error 185, 188 libobk module 179 Application Backup schedule backup window 81 configuring 81 for Block-level Incremental backups 172 overview 81, 83 retention 81 with Snapshot Client 159 archive 15, 24 ARCHIVE_DATE_FROM 133, 139 ARCHIVE_DATE_TO 134, 139 ARCHIVELOG 213, 218 attributes Block level incremental 222 automatic archive 126 automatic backup policy 113, 126 schedule manual backup 114, 126 schedules, configuring 82 automatic backups 218 Automatic Cumulative Incremental Backup schedule Snapshot Client effects 174 Automatic Differential Incremental Backup schedule overview 83 Snapshot Client effects 174 Automatic Full Backup schedule 82, 83 Snapshot Client effects 174 with Snapshot Client 159
226
bpbrm log verbose mode 181 bpcd 181 verbose mode 181 bpdbm daemon 46 bpdbm log verbose mode 181 bpdbsbora for XML import 137 bpend_notify 213, 223 BPEND_TIMEOUT 223 bphdb 180, 181 description 180 log 183 bphdb log verbose mode 181 bplist 116 browsing for backups 116 browsing for XML export archives 134 example 116 bplist log verbose mode 181 bporaexp 15, 23, 128, 130, 181 bporaexp64 130, 180 bporaimp 16, 25, 133, 134, 181 performing a restore 138 bporaimp64 134, 138, 180 bpplclients command 39, 46 bprd log verbose mode 181 bpsched verbose mode 181 bpstart_notify 213, 218 bpstart_notify.oracle_bli 213 BPSTART_TIMEOUT 223 bptm log verbose mode 181 bpubsoraarc 181 browsing archives 133
command bplist 116 bporaexp 128 commands allocate channel 21 backup 21, 111 bplist 116, 134 bporaexp 15, 23, 130 bporaimp 25, 133, 134 bporexp64 130 bpplclients 39, 46 change 112 copy 111 crosscheck 110 crosscheck backupset 110 delete expired backupset 111 get_license_key 40, 48 initbpdbm 46 install_dbext 45, 49 list 112 register database 110 report 112 reset database 110 restore 111 resync catalog 111 rman execute scripts 126 performing restore 122 script syntax 126 send 99 set duplex 99 switch 111 update_dbclients 39, 43, 47 COMMIT 140 compatibility information 37 configuration database debug level 184 Media Manager 38 CONSISTENT 130 correcting errors 221
C
check_coverage 210 client list for installation 43 client read timeout property 193 CLIENT_NAME 93 CLIENT_READ_TIMEOUT 93 cluster software prerequisites 39 cluster_config script 39, 47, 49
D
daemons, see processes database software prerequisites for installation 38 debug logs 221 accessing 182 enabling 181 in /usr/openv/netbackup/logs 182 troubleshooting with log files 181
227
E
environment variables 175 environmental variable user-directed backup 116 error checking 113 errors, correcting 221 example bplist 116 RMAN script 98 examples parameter files 105 scripts 105 execution log 183
local 47 platform compatibility 37 prerequisites 37 prerequisites in a cluster 39 remote 39 requirements for NetBackup software 38 instant recovery, see Snapshot Client
J
Java interface 77 jbpSA 135
K
KEYWORD 131, 134, 141
L
libbpora.so.8.0 180 libbpora.so.9.0 180 libbpora64.so.8.0 180 libbpora64.so.9.0 180 libobk,shared library module 180 license keys 28 licensing information 40, 48 LIST 141 LIST parameters 133 local installation procedure 47 LOG 131, 142 log files enabling 182 logs NetBackup progress 220
F
failed operation troubleshooting 185, 188 file system growing 222 UNCOVERED 208 file-based operations 149, 150 FlashSnap snapshots 165 FROMUSER 134, 140 Fulldata Storage Checkpoint 170
G
get_license_key 28 get_license_key command 40, 48
H
HELP 130, 140 hot backup 212
M
manual archive 126 manual backups 114, 126, 218 maximum jobs per client 78 Media Manager configuring backup media 38 multiple copies feature 85, 175 multiplexing overview 12 multi-streamed backups 193
I
IGNORE_ROWS 141 INIT.ORA 215 initbpdbm command 46 install script 41, 48 install_dbext 29 install_dbext command 45, 49 installation database software prerequsites 38
N
NAME 131, 142 NAS Snapshot 162
228
configuring a policy for 162 NAS_Snapshot 165 NAS_Snapshot method 164 NB_ORA_CLIENT 92, 130, 131, 133, 138, 142 NB_ORA_POLICY 92, 130, 131 NB_ORA_SCHED 92, 130, 131 NB_ORA_SERV 92, 130, 131, 133, 138, 142 NB_PC_ORA_RESTORE variable 167 nbjm scheduling process 182 nbpem scheduling process 182 nbrb scheduling process 182 NetBackup 14 logs and reports 220 NetBackup mode 129 Nodata Storage Checkpoint 170
scheduling (nbpem, nbjm, nbrb) 182 Progress Log 219 proxy copy 149
Q
QUERY 132
R
Recovery Wizard use with Snapshot Client 175 redirected restores 122, 144 redo log 210 remote folder button 89 remote installation procedure 39 reports All Log Entries report 184 database operations 179 NetBackup server reports 184 reports See also log files restore 16, 24 to a different client 122, 144 user-directed 137 restore errors 221 RESTORE_SCHEMA_ONLY 142 RESTORE_TO_DIRECTORY 142 restores snapshot rollback 165, 167 with Snapshot Client methods 165, 167 retention period for frequency-based schedules 85 for Snapshot Client 174 rman change command 86 RMAN script example 98 robust logging 182 ROW_BUFFER 132, 142
O
offhost backup, See Snapshot Client Oracle environment variables 214 Intelligent Agent 213 Oracle Advanced Client 147 Oracle Recovery Manager errors 185 example RMAN script 98 OWNER 131
P
parameter file 24, 25, 128 parms operand 92 PARTITIONS 131 permission bits 222 platform compatibility 37 point in time rollback 165 policy configuration adding clients 87 attributes 80 backup selections list 87 for databases 79 for Snapshot Client 159, 171 overview 78 schedules 80 testing 106 POLICY_IN_CONTROL 214, 215 post_checkpoint_notify 213, 223 processes bpdbm 46 log files for NetBackup processes 182
S
schedule automatic backup 113, 126 schedules adding 80 frequency 84 properties 84 properties for Snapshot Client 174 retention 85 retention for Snapshot Client 174
229
types of schedules 80 scripts bpend_notify 223 bpstart_notify.oracle_bli 213 cautions for using 83 check_coverage 210 cluster_config 39, 47, 49 install 41, 48 notify 218 RMAN 19, 20 scheduler 113, 126 XML export 101 SERVER 93 setup_bli_scripts contents of 214 sample of 215 Shared library module, libobk 180 SHUTDOWN_BKUP_RESTART 212, 215, 218 SHUTDOWN_CKPT_RESTART 213, 215, 218 skipped clients 43 snapshot backup 148, 158, 159, 165 Snapshot Client Block-level Incremental backup configuring a policy 171 overview 148, 167 configuring policies 159 effect on backup schedules 84 effects on policies and schedules 173 file-based operations 149, 150 instant recovery configuration requirements 158 overview 148 policy configuration 159 restore method 165 offhost backup configuration 158 configuring 161 overview 148 overview 148 proxy copy 149 snapshot backup configuration 158 configuration requirements 158 database objects included 159 overview 148 policy configuration 159 restore method 165 stream-based operations 149 snapshot rollback 165, 167
SnapVault 166 Storage Checkpoint 169 backup 213 removing 222 stream-based operations 149
T
TABLES 132, 134, 143 templates administration 126 advantages over scripts 83 button on Backup Selections tab 89 creating for XML export 101 overview 13 XML export 100 testing policy configuration 106 timeout failures, minimizing 193 TOUSER 143 transaction logs see archive logs
U
UNCOVERED file system 208 Unicode 14 unified logging 182 update_clients 222 update_dbclients command 39, 43, 47 user-directed archive 126 user-directed restore 137 USERID 132, 133, 143 UTF-8 14
V
VERBOSE 94 Verifying installation 180 Veritas Storage Foundation 171 VIEWS 133 VxFS_Checkpoint snapshot 165 vxvm snapshot 165
W
Windows interface 77 wizard overview 13 use with Snapshot Client 175
230
X
XML 14 XML export 15 XML Export Wizard 101 XML import 16 XML Import Wizard 136 XML instance 15, 23, 25, 128 XML schema 14, 23, 25, 128