290217

download 290217

of 184

Transcript of 290217

Veritas NetBackup for SAP Administrators Guidefor UNIX and Linux

Release 6.5

12308320

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

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

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

Technical supportFor 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

IntroductionNetBackup for SAP features ...............................................................................12 NetBackup for SAP overview .............................................................................13 Technical overview ......................................................................................13 Sequence of operation .................................................................................15 NetBackup for SAP on Oracle databases ..................................................15 NetBackup for SAP on MaxDB databases .................................................19

Chapter 2

Installing the agentVerifying the installation prerequisites ...........................................................21 Operating system and platform compatibility ........................................21 NetBackup software .....................................................................................22 Database software ........................................................................................22 Cluster software ...........................................................................................23 Installing NetBackup for SAP ............................................................................23 Remote installation of NetBackup for SAP ..............................................23 Local installation of NetBackup for SAP ..................................................31 Linking NetBackup for SAP with backint (Oracle databases without RMAN only) ....................................................34 Linking the Oracle database with the SBT library (Oracle databases with RMAN only) ..........................................................35

Chapter 3

ConfigurationUser interface terminology notes .....................................................................39 Configuring the Maximum jobs per client .......................................................40 Configuring a backup policy for a database .....................................................41 Adding a new policy .....................................................................................41 Adding schedules .........................................................................................43 Adding clients ...............................................................................................47 Adding backup selections ...........................................................................48 Backing up files mounted with LOFS ........................................................50 Creating scripts ....................................................................................................50 Modifying the backup scripts .....................................................................51 Script parameters ........................................................................................53 Modifying the configuration files .....................................................................54

6

Files to configure ......................................................................................... 54 Relationships between files ....................................................................... 54 Modifying the initSID.utl file ..................................................................... 55 Modifying the initSID.sap file (NetBackup for SAP on Oracle databases only) ............................... 56 Modifying the bsi.env file (NetBackup for SAP on MaxDB databases) ...................................... 59 Testing configuration settings .......................................................................... 61 Testing multiple drives and files ....................................................................... 62

Chapter 4

Using NetBackup for SAPPerforming a backup ........................................................................................... 65 Method 1: Using Netbackup schedules to start an SAP backup ........... 65 Method 2: Using BRTools to start an SAP backup (for Oracle database only) ....................................................................................................... 66 Performing an archive ........................................................................................ 70 Method 1: Using the NetBackup multiple copies feature ...................... 70 Method 2: Using two brarchive commands in sequence ....................... 71 Performing a restore ........................................................................................... 72 Using the SAPDBA utility (NetBackup for SAP on Oracle databases only) ....................................................................................................... 72 Redirecting a restore to a different client (NetBackup for SAP on Oracle databases only) ..................................................................................... 72 Disaster recovery using BRRECOVER ...................................................... 76 Restarting failed backups and restores ............................................................ 76 Restarting backups ...................................................................................... 76 Restarting restores ...................................................................................... 81

Chapter 5

NetBackup for SAP with Snapshot ClientUsing NetBackup for SAP to backup large databases .................................... 87 NetBackup for SAP with Snapshot Client overview ....................................... 89 Snapshot backup .......................................................................................... 90 Instant recovery ........................................................................................... 90 Off-host backup ............................................................................................ 90 Block-level incremental backup ................................................................ 90 RMAN proxy copy ........................................................................................ 90 RMAN stream-based backups .................................................................... 91 RMAN proxy and RMAN stream-based backups intermixed ................ 91 How does NetBackup for SAP Snapshot Client work? ................................... 91 Sequence of operations: backup ................................................................ 92 Sequence of operation: restore .................................................................. 96 Database objects that are supported by advanced backup methods ... 97

7

Configuring snapshot backups ..........................................................................97 Configuration requirements ......................................................................98 Configuring an SAP policy with Snapshot Client backup methods .....99 Restoring data from a snapshot backup .........................................................105 Restoring individual files ..........................................................................105 Restoring volumes and file systems using snapshot rollback ............105 Configuring block-level incremental backups ...............................................107 How does BLI work? ...................................................................................108 Storage Checkpoint ....................................................................................109 Configuration requirements ....................................................................111 Configuring policies for BLI backups ......................................................111 Additional snapshot client configuration information ...............................113 Backup types ...............................................................................................113 Backup scripts ............................................................................................114 Additional configuration that is required for brbackup using RMAN proxy ....................................................................................................114 Intermixing RMAN stream and RMAN proxy backups ........................115 Performing user-directed backups ..........................................................115 Additional configuration required for Network Attached Storage (NAS) 116 BACKINT backups with NAS ....................................................................116 RMAN proxy backups with NAS ..............................................................117

Chapter 6

NetBackup for SAP on MaxDB databasesConfiguration .....................................................................................................119 Creating a backup medium ...............................................................................120 Using NetBackup for SAP on a MaxDB database to perform backups and restores ........................................................................................................121 Performing a backup .................................................................................121 Performing a query ....................................................................................122 Performing a restore .................................................................................122 Performing backups and restores using parallel medium groups .....122

Chapter 7

TroubleshootingSetting the debug level ......................................................................................125 NetBackup reports .............................................................................................125 Enabling logging ........................................................................................126 Accessing the log files ...............................................................................126 NetBackup server reports .........................................................................127 sapdba logs and messages (Oracle-based SAP environments only) ...........127 Backup and restore log files .....................................................................128 Archive log files ..........................................................................................128 Minimizing timeout failures on large database restores .............................129

8

Appendix A Appendix B Appendix C

backint command line backint -i in_file contents backint -o out_file contents

131 135 137

Information returned for a backup ................................................................. 137 Information returned for a restore ................................................................. 137 Information returned for an inquiry .............................................................. 138

Appendix D Appendix E Appendix F

Environment variables bp.conf file Parameters used in initSID.utl

139 141

Parameter summary .......................................................................................... 143 Parameters .......................................................................................................... 145 backint_dir work_directory ......................................................... 145 backup_stream_buffersize size ................................................... 146 bplist_filter script_path ........................................................... 146 client client_machine_name ......................................................... 147 custom_sort_file file_path ......................................................... 147 drives number_of_drives ................................................................ 149 inquiry_query_period months ........................................................ 149 master_time_offset minutes ......................................................... 150 media_notify_script script_path ............................................. 150 policy policy_name ............................................................................ 150 policy2 policy_name ......................................................................... 151 restore_filter script_path ......................................................... 151 restore_stream_buffersize size ................................................. 152 retry_backup number_of_retries ............................................... 152 schedule schedule_name .................................................................. 152 schedule2 schedule_name ................................................................ 152 server server_name ............................................................................ 153 sleep seconds ....................................................................................... 153 sort_backup_type value .................................................................. 153 sort_restore_type value ................................................................ 157 switch_list control_file_path ................................................. 159 switch_log control_file_path .................................................... 159 switch_sem control_file_path .................................................... 160

Appendix G

Using NetBackup for SAP to back up SAPDBCreating backup environment configuration files ....................................... 162

9

backint for SAPDB configuration file ..................................................162 Adapter program configuration file ........................................................163 NetBackup for SAP configuration file, initSID.utl ................................165 Defining a backup medium in SAPDB .............................................................165 Performing a backup .........................................................................................165 Performing a restore .........................................................................................166

Appendix H

Configuring split mirror backupsLocal-host snapshot method: nbu_snap (Solaris SPARC platform only) ..167 Requirements .............................................................................................167 Configuration ..............................................................................................168 Local-host snapshot method: VxVM (Solaris SPARC, HP-UX, Windows 2000/2003) ..................................................................................................169 Requirements .............................................................................................169 Configuration ..............................................................................................169 Local-host snapshot method: VxFS_Checkpoint ..........................................170 Offhost alternate client: flashsnap method ...................................................170 Requirements .............................................................................................170 Configuration ..............................................................................................171 Offhost alternate client: VVR method (Solaris SPARC, HP-UX) .................172 Requirements .............................................................................................172 Configuration ..............................................................................................173 Hardware array-based snapshot method: Hitachi Shadow Image, EMC TimeFinder, HP Business Copy ................................................................175

Appendix I Index

Differences in NetBackup for SAP in release 6.x

177 179

10

Chapter

1

IntroductionThis chapter contains the following topics:

NetBackup for SAP features on page 12 NetBackup for SAP overview on page 13

NetBackup for SAP integrates the database backup and recovery capabilities of SAP with the backup and recovery management capabilities of NetBackup. NetBackup for SAP supports SAP environments based on the following databases:

Oracle databases. In an Oracle environment, you can use the Oracle database either with or without the recovery manager (RMAN). SAP DB and MaxDBTM databases. This documentation describes using NetBackup for SAP with both SAP DB and MaxDB databases. For readability, the remainder of this manual uses only the term MaxDB to describe these database platforms. The SAP DB name refers to the 7.4 and earlier releases. The MaxDB name refers to the 7.5 and later releases.

This chapter explains the differences and similarities between using NetBackup for SAP in each environment. For example, one major difference is that the SAP tools are supported only for Oracle databases. Note: This manual differentiates between SAP on an Oracle database and SAP on a MaxDB database only when necessary to explain differences between using NetBackup for SAP with these specific databases. For most tasks, NetBackup for SAP operates the same way in each environment.

12 Introduction NetBackup for SAP features

NetBackup for SAP featuresTable 1-1 shows NetBackup for SAPs main features and introduces some terms used in the NetBackup for SAP documentation.

Table 1-1 FeatureMedia and device management

NetBackup for SAP features and descriptions DescriptionAll devices supported by Media Manager are available to NetBackup for SAP.

Scheduling facilities NetBackup scheduling facilities on the master server can be used to schedule automatic and unattended SAP backups. This also lets you choose the times when these operations can occur. For example, to prevent interference with normal daytime operations, you can schedule your database backups to occur only at night. Multiplexed backups NetBackup for SAP 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 SAP 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, if you are using NetBackup for SAP on an Oracle database, you can use SAP tools 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 SAP exclusive use of certain devices and media. NetBackup for SAP 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 SAP databases can also reside on hosts that are different from the devices on which NetBackup stores the backups.

Introduction NetBackup for SAP overview

13

Table 1-1 FeatureGraphical user interfaces

NetBackup for SAP features and descriptions (continued) DescriptionNetBackup provides the following graphical user interfaces for client users and administrators:

NetBackup administration console for Java NetBackup administration console for Windows

A database administrator or NetBackup administrator can start backup or restore operations for SAP from the NetBackup graphical user interface on the master server. Parallel backup and restore operations NetBackup for SAP supports the parallel backup and restore capabilities of the SAP tools. For example, this permits the user to run more than one tape device at a time for a single SAP backup or restore, thereby reducing the time necessary to complete the operation. Compression increases backup performance over the network and reduces the size of the backup image that NetBackup writes to the storage unit. NetBackup for SAP supports compression for the following types of backups:

Compression

Stream-based backups through both MaxDB and RMAN. File-based backups through backint. Snapshot Client backups through backint.

NetBackup for SAP does not support compression for snapshot client backups through RMAN.

For more information on general NetBackup terminology, see the NetBackup Administrators Guide, Volume I.

NetBackup for SAP overviewThe following sections provide a technical overview and explain the sequence of operation for NetBackup for SAP.

Technical overviewFigure 1-1 shows the major components in a NetBackup for SAP configuration. The server that is hosting the Oracle or the MaxDB database must be a NetBackup client. It must also have NetBackup for SAP installed.

14 Introduction NetBackup for SAP overview

Figure 1-1

NetBackup for SAP environment on an Oracle or MaxDB database

System hosting the Oracle or MaxDB database NetBackup for SAP supplies: Oracle or MaxDB database backint Interface Sample script files

Additional required NetBackup software: NetBackup client

Network (TCP/IP)

NetBackup master server or remote media server NetBackup software: NetBackup master server NetBackup media server (if system is a media server)

Storage unit

NetBackup for SAP assumes either an Oracle or a MaxDB database as the underlying database. The following additional components are present depending on the underlying database:

In an Oracle environment, the SAP tools perform database-related tasks. The brbackup, brarchive, and brrestore utilities communicate with NetBackup through the NetBackup for SAP backint interface. The sapdba component of SAP tools accesses the backup catalog used by NetBackup in order to determine the status of the valid backups. In a MaxDB environment, you initiate backups and restores through the MaxDB administrative interface. This interface can be the database manager graphical user interface (DBM GUI), the database manager command line interface (DBM CLI), and the Web database manager (Web DBM).

Introduction NetBackup for SAP overview

15

Sequence of operationNetBackup users or schedules start database backups or restores by selecting an SAP script. A NetBackup process called bphdb starts the SAP script on the client if the backup is initiated by a policy on the master server. The SAP application then starts the requested operation on the databases. Figure 1-2 shows the sequence of operation. Figure 1-2 NetBackup for SAP operations

Database files

SAP tools or MaxDB administrative interface (DBM CLI)

NetBackup for SAP backint

NetBackup XBSA API

Script

Command line

bphdb NetBackup client

NetBackup master server Scheduler NetBackup

For a backup, brbackup calls the NetBackup for SAP backint interface. The backint interface calls the XBSA API to interface with NetBackup. A restore works similarly except that the NetBackup for SAP backint interface calls the XBSA API, causing NetBackup to retrieve the data from secondary storage and send it to the client.

NetBackup for SAP on Oracle databasesThe following sections provide an overview of the software in a NetBackup for SAP on Oracle database environment. You can use NetBackup for SAP on Oracle databases either with or without the recovery manager (RMAN). The following subsections explain the components in Oracle environments with and without RMAN.

16 Introduction NetBackup for SAP overview

Using NetBackup for SAP on Oracle databases without RMANFigure 1-3 shows the components found in a NetBackup for SAP on Oracle database environment. Figure 1-3 Software components in a NetBackup for SAP on Oracle database environment

SAP environment Oracle database

NetBackup for SAP brbackup sapdba brrestore brarchive brconnect SAP tools backint Interface

NetBackup

XBSA API

Using NetBackup for SAP on Oracle databases with RMANNetBackup for SAP implements the Oracle defined SBT interface, which integrates the SAP tools with RMAN. You do not need to use RMAN to use NetBackup for SAP on Oracle databases, but the benefits of using RMAN backups are as follows:

RMAN supports incremental backups, which are backups of only those blocks that have changed since the previous backup. This reduces the number of blocks that are backed up. Unused and unchanged database blocks are not backed up. RMAN detects logical errors in database blocks during backup processing. The BEGIN BACKUP and END BACKUP commands are not needed for online backups because RMAN performs a block-by-block check to verify data consistency. This reduces the amount of redo log information. You can use RMANs verify command to verify backups.

Introduction NetBackup for SAP overview

17

Figure 1-4 shows a NetBackup for SAP on Oracle database environment that includes RMAN. Figure 1-4 Software components in a NetBackup for SAP on Oracle database environment with RMAN

SAP tools

Oracle database

Phase 2

Phase 1

RMAN

Oracle server libobk (liborasap) (NetBackup for Oracle)

Control files Profiles Log files

backint NetBackup for SAP

NetBackup

Storage unit

Local disk

If you are in a NetBackup for SAP on Oracle database environment with RMAN, the backup consists of two phases:

Phase 1 backs up the Oracle database files. Phase 2 backs up the SAP control, log, and configuration files.

18 Introduction NetBackup for SAP overview

SAP tools overviewThe SAP environment consists of many modules and applications. One component is the SAP tools. You can use the SAP tools whether or not you also use RMAN. Table 1-2 shows the software included in the SAP tools. Table 1-2 Componentsapdba

SAP tools software Functionsapdba is a menu-driven utility, with menus designed to reflect the users point of view. sapdba provides easy access to brbackup, brarchive, and brrestore for database backups and restores. The tool can restore a backup of an entire database or reset the database to a previous state.

brbackup

This command brings database servers online or offline, checks the status of SAP files, and places database tablespaces into BACKUP mode to guarantee their data consistency. The brbackup command provides online and offline backups. It also keeps a profile and log of each backup. brbackup uses the NetBackup software, through NetBackup for SAP, for the following actions:

SAP data file backups Data file and online log backups Error handling

brarchive

This command archives Oracle offline redo log files by communicating with the NetBackup for SAP backint interface. These files are copied by Oracle in its archiving directory. The brarchive command ensures that duplicates of these logs are available and that original files are not deleted prematurely. This command also keeps a profile and log of each archive. This command recovers database data files, control files, and online redo log files through the NetBackup for SAP backint interface. The brrestore command ensures that sufficient space is available prior to restoring these files, and it removes files that are overwritten during the recovery. This command also provides a query mode. This is a small script that contains SAP commands such as brbackup and brrestore.

brrestore

SAP script

Introduction NetBackup for SAP overview

19

NetBackup for SAP on MaxDB databasesFigure 1-5 shows the components found in a NetBackup for SAP on MaxDB database environment. Figure 1-5 Software components for a NetBackup for SAP on MaxDB database environment

DBM CLI

DBM GUI

Web DBM

MaxDB server

MaxDB Instance

Named pipes

NetBackup for SAP (backint)

NetBackup

20 Introduction NetBackup for SAP overview

Chapter

2

Installing the agentThis chapter includes the following topics:

Verifying the installation prerequisites on page 21 Installing NetBackup for SAP on page 23 Linking NetBackup for SAP with backint (Oracle databases without RMAN only) on page 34 Linking the Oracle database with the SBT library (Oracle databases with RMAN only) on page 35

Perform the procedures in this chapter before you configure NetBackup for SAP.

Verifying the installation prerequisitesPerform the procedures in this section before you install the database agent. These requirements apply for remote and local installations.

Operating system and platform compatibilityVerify that NetBackup for SAP is supported on your operating system or platform. To verify compatibility 1 2 3 4 Go to the technical support Web page: http://entsupport.symantec.com. From the Product Lookup list, choose NetBackup Enterprise Server and click on the > button. From the list on the right, click on Compatibility List. In the list of documents, click Veritas NetBackup Enterprise Server (tm) x.x/ NetBackup Server x.x Database Agent Compatibility (Updated date). For x.x, look for the current release. For date, look for the most recent date.

22 Installing the agent Verifying the installation prerequisites

For information on supported cluster environments for NetBackup for SAP, 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 softwareVerify that the following requirements are met for the NetBackup server and client software:

The NetBackup server software is installed and operational on theNetBackup server. The NetBackup server platform can be any that NetBackup supports. For installation information, see the NetBackup Installation Guide.

The NetBackup client software is installed on the client that has thedatabases you want to back up.

The version of the NetBackup client and the version of the database agentyou want to install must be the same (for example, 6.5).

There must be adequate disk space on each machine upon which you want toinstall 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 softwareVerify the following regarding the database software on the NetBackup client:

SAP vendor software must be installed and operational. One or more SAP instances must exist.

Installing the agent Installing NetBackup for SAP

23

Cluster softwareVerify the following requirements if you are installing the database agent software on a NetBackup server configured in a NetBackup cluster:

The SAP vendor software is installed and operational on each node to whichNetBackup can failover.

The NetBackup server software is installed and configured to work in aNetBackup 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. The following additional information also pertains to cluster environments:

Make sure you install the NetBackup client software and the database agentsoftware on each node to which NetBackup can failover.

Run commands such as bpplclients and update_dbclients from theactive 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.

Installing NetBackup for SAPYou can install the database agent software in one of the following ways:

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 SAP on page 23 describes this procedure. A local installation. The user loads and installs the software onto the local machine only. Local installation of NetBackup for SAP on page 31 describes this procedure.

Remote installation of NetBackup for SAPDuring a remote installation, you load the database agent files onto either a UNIX master server or media server. Then you push the software to the clients to install it.

24 Installing the agent Installing NetBackup for SAP

Loading the database agent files onto the serverUse the following procedure to load the files onto the server. To load the database agent files on a UNIX server 1 Review Verifying the installation prerequisites on page 21. If you want to install the database agent on a clustered NetBackup server, read Cluster software on page 23. (Conditional) Perform this step only if you want to install on a server that is part of a NetBackup cluster. a Freeze the active NetBackup node. When you install NetBackup for SAP, install the software on all the inactive nodes first, then install on the active node. For information on how to freeze the active node in your specific cluster environment, see the NetBackup High Availability Administrators Guide. Decide which of the inactive nodes to install the software on first. 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.

2

b

3

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

4

Verify that a registered and valid license key for NetBackup for SAP 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.

5

Installing the agent Installing NetBackup for SAP

25

6

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]

7

b c d e

Type n. Select the NetBackup for SAP 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 SAP 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).)

8

(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 SAP 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.

9

(Conditional) Unfreeze the active node. Perform this step if you want to install the NetBackup for SAP software on a server that is part of a NetBackup cluster. The last step in the installation

26 Installing the agent Installing NetBackup for SAP

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 SAP 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 SAP 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 26. Distribute to selected clients. This method distributes the NetBackup for SAP 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, see Pushing the software to new or selected clients on page 29.

Note: Make sure that the NetBackup for SAP version is the same version as the NetBackup client software.

Pushing the software to all clientsUse the following procedure to install or upgrade the database agent software on all clients currently configured in a NetBackup database policy. You can use this procedure only from a master server. To push the software to all clients Note: If you want to push the database agent software from a server that is part of a NetBackup cluster, type all commands in this procedure from the active NetBackup node.

Installing the agent Installing NetBackup for SAP

27

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:

/usr/openv/netbackup/bin/update_dbclientsSAP ALL ALL

2

b

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 29.

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 29. If the client list contains only individual node names, proceed to the following step.

c

Check the skipped client list, if any.

28 Installing the agent Installing NetBackup for SAP

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 SAP 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 24.) 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.

3

(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.

Installing the agent Installing NetBackup for SAP

29

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 SAP 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.

Pushing the software to new or selected clientsUse the following procedure if you want to install or upgrade the NetBackup for SAP software on selected clients. You can use this procedure from either a master server or from a media server. To push the software to new or selected clients Note: If you want to push the NetBackup for SAP software from a server that is part of a NetBackup cluster, type all commands in this procedure from the active NetBackup node.

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.

30 Installing the agent Installing NetBackup for SAP

1

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 SAP software.

Installing the agent Installing NetBackup for SAP

31

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 SAP -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 26.

6

Note: You do not need to run the cluster_config script after you install the database agent on a server that is part of a NetBackup cluster.

Local installation of NetBackup for SAPDuring a local installation, the database agent files are extracted and installed. The local machine can be a client or a server that also happens to be a NetBackup for SAP client. To install NetBackup for SAP on a local machine 1 Review Verifying the installation prerequisites on page 21. To install the database agent on a clustered NetBackup server, read Cluster software on page 23. (Conditional) Perform this step only if you want to install on a server that is part of a NetBackup cluster. a Freeze the active NetBackup node. When you install NetBackup for SAP, install the software on all the inactive nodes first, then install on the active node. For information on how to freeze the active node in your specific cluster environment, see the NetBackup High Availability Administrators Guide. Decide which of the inactive nodes to install the software on first.

2

b

32 Installing the agent Installing NetBackup for SAP

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 SAP 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.

6

7

8

9

Note: Make sure that the NetBackup for SAP version is the same version as the NetBackup client software.

Installing the agent Installing NetBackup for SAP

33

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 SAP 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 SAP that was installed.

f

Type q to quit from the script.

Note: You do not need to run the cluster_config script after you install NetBackup for SAP 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 SAP 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.

11 (Conditional) Unfreeze the active node.

34 Installing the agent Linking NetBackup for SAP with backint (Oracle databases without RMAN only)

Perform this step to install the NetBackup for SAP 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.

Linking NetBackup for SAP with backint (Oracle databases without RMAN only)Perform the linking described in this section only if you are using NetBackup for SAP with an Oracle database but without the Oracle recovery manager (RMAN). SAP requires that all SAP tools be located in a predetermined directory. The directory path is as follows:/usr/sap/SID/SYS/exe/run

where SID is the unique name for an Oracle database instance. SID is also known as the System ID. The directory should contain the following commands:

brarchive brbackup brconnect brrestore brtools sapdba

To link the NetBackup for SAP binary file

Link backint from the NetBackup install directory to the SAP tools directory. For example, if the Oracle instance name is CER, enter the following command: ln -s /usr/openv/netbackup/bin/backint \ /usr/sap/CER/SYS/exe/run/backint

Installing the agent Linking the Oracle database with the SBT library (Oracle databases with RMAN only)

35

Linking the Oracle database with the SBT library (Oracle databases with RMAN only)Perform the linking described in this section only if you are using NetBackup for SAP with an Oracle database and RMAN. The exact linking command to use depends on your operating system platform. To link the NetBackup for SAP binary file on AIX (32-bit or 64-bit) and 32-bit Oracle8 or Oracle8i software

Enter the following command to link the Oracle database and the SBT library to NetBackup: ln -s /usr/openv/netbackup/bin/libsapora.a \ $ORACLE_HOME/lib/libobk.a

To link the NetBackup for SAP binary file on AIX (64-bit) and 64-bit Oracle8i software

Enter the following command to link the Oracle database and the SBT library to NetBackup: ln -s /usr/openv/netbackup/bin/libsapora.a64 \ $ORACLE_HOME/lib64/libobk.a

To link the NetBackup for SAP binary file on AIX and 64-bit Oracle9i software

Enter the following command to link the Oracle database and the SBT library to NetBackup: ln -s /usr/openv/netbackup/bin/libsapora.a64 \ $ORACLE_HOME/lib/libobk.a

To link the NetBackup for SAP binary file on HP-UX (32-bit or 64-bit) and 32-bit Oracle8 or Oracle8i software

Enter the following command to link the Oracle database and the SBT library to NetBackup: ln -s /usr/openv/netbackup/bin/libsapora.sl \ $ORACLE_HOME/lib/libobk.sl

To link the NetBackup for SAP binary file on HP-UX (64-bit) and 64-bit Oracle8 or Oracle8i software

Enter the following command to link the Oracle database and the SBT library to NetBackup: ln -s /usr/openv/netbackup/bin/libsapora.sl \ $ORACLE_HOME/lib64/libobk.sl

36 Installing the agent Linking the Oracle database with the SBT library (Oracle databases with RMAN only)

To link the NetBackup for SAP binary file on HP-UX (32-bit or 64-bit) and 64-bit Oracle9i or later software

Enter the following command to link the Oracle database and the SBT library to NetBackup: ln -s /usr/openv/netbackup/bin/libsapora.sl64 \ $ORACLE_HOME/lib/libobk.sl

To link the NetBackup for SAP binary file on Linux and Oracle8 or Oracle8i software

Enter the following command to link the Oracle database and the SBT library to NetBackup: ln -s /usr/openv/netbackup/bin/libsapora.so $ORACLE_HOME/lib/libobk.so

To link the NetBackup for SAP binary file on Linux and Oracle9i or later software

Enter the following command to link the Oracle database and the SBT library to NetBackup: ln -s /usr/openv/netbackup/bin/libsapora.so \ $ORACLE_HOME/lib/libobk.so

To link the NetBackup for SAP binary file on Solaris (32-bit or 64-bit) and 32-bit Oracle8 or Oracle8i software

Enter the following command to link the Oracle database and the SBT library to NetBackup: ln -s /usr/openv/netbackup/bin/libsapora.so.1 $ORACLE_HOME/lib/libobk.so

To link the NetBackup for SAP binary file on Solaris (32-bit or 64-bit) and 64-bit Oracle8 or Oracle8i software

Enter the following command to link the Oracle database and the SBT library to NetBackup: ln -s /usr/openv/netbackup/bin/libsapora.so64.1 \ $ORACLE_HOME/lib64/libobk.so

To link the NetBackup for SAP binary file on Solaris (32-bit or 64-bit) and 32-bit Oracle 9i or later software

Enter the following command to link the Oracle database and the SBT library to NetBackup: ln -s /usr/openv/netbackup/bin/libsapora.so.1 \ $ORACLE_HOME/lib/libobk.so

Installing the agent Linking the Oracle database with the SBT library (Oracle databases with RMAN only)

37

To link the NetBackup for SAP binary file on Solaris (32-bit or 64-bit) and 64-bit Oracle 9i or later software

Enter the following command to link the Oracle database and the SBT library to NetBackup: ln -s /usr/openv/netbackup/bin/libsapora.so64.1 \ $ORACLE_HOME/lib/libobk.so

To link the NetBackup for SAP binary file on Tru64

Enter the following command to link the Oracle database and the SBT library to NetBackup: ln -s /usr/openv/netbackup/bin/libsapora.so.1 \ $ORACLE_HOME/lib/libobk.so.1

38 Installing the agent Linking the Oracle database with the SBT library (Oracle databases with RMAN only)

Chapter

3

ConfigurationThis chapter contains the following topics:

User interface terminology notes on page 39 Configuring the Maximum jobs per client on page 40 Configuring a backup policy for a database on page 41 Creating scripts on page 50 Modifying the configuration files on page 54 Testing configuration settings on page 61 Testing multiple drives and files on page 62

Before attempting to configure NetBackup for SAP, complete the installation procedure as described in Installing the agent on page 21. After you complete the installation, follow the procedures in this chapter to configure your environment. Note: If you are using NetBackup for SAP on an Oracle database, all the information in this chapter applies to you. If you are using NetBackup for SAP on a MaxDB database, this section notes a few differences. Also refer to NetBackup for SAP on MaxDB databases on page 119.

User interface terminology notesYou can perform many of the configuration steps in this chapter from the NetBackup administration console on the master server. Depending on your master servers platform, the console is available in one or two forms. NetBackup supports a Java interface for both Windows and UNIX master servers. In addition, NetBackup supports a Windows interface for Windows master servers.

40 Configuration Configuring the Maximum jobs per client

The Java and Windows interfaces are nearly identical. If interface differences exist in the configuration procedures, this manual uses the following headings to identify the interface being described: From the Windows interface: From the Java interface:

Configuring the Maximum jobs per clientThe following procedure shows how to set the Maximum jobs per client attribute. To configure the maximum jobs per client 1 2 3 4 5 In the left pane of the NetBackup administration console, expand Host Properties. Select Master Server. In the right pane, double-click the server icon. Click Global Attributes. Change the Maximum jobs per client value to 99. The Maximum jobs per client specifies the maximum number of concurrent backups that are allowed per client. The default is 1. You can use the following formula to calculate a smaller value: Maximum jobs per client = number_of_drives X number_of_policiesnumber_of_drives The number of concurrent brbackup jobs. The drives parameter in the initSID.utl file defines these jobs. The number of policies of any type that can back up this client at the same time. This number can be greater than one. For example, a client can be in two policies in order to back up two different databases. These backup windows can overlap.

number_of_policies

Tip: Enter a large enough value for the Maximum jobs per client attribute to meet the number of jobs that SAP runs. You might need to experiment with different values at your site.

Configuration Configuring a backup policy for a database

41

Configuring a backup policy for a database

A NetBackup backup policy for a database defines the backup criteria for a specific group of one or more clients. These criteria include:

Storage unit and media to use Policy attributes Backup schedules Clients to be backed up The script files to be executed on the clients

To back up a database environment, you need to define at least one SAP 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.

Adding a new policyThese instructions describe how to add a new backup policy for a database. To configure a backup policy for databases 1 2 3 4 Log on to the master server as administrator (Windows) or root (UNIX). Start the NetBackup Administration console. If your site has more than one master server, choose the one on which you want to add the policy. From the Windows interface: In the left pane, right-click Policies and choose New Policy. From the Java interface: In the left pane, click Policies. In the All Policies pane, right-click the master server, and click New Policy. In the Add a New Policy dialog box, in the Policy name field, type a unique name for the new policy. Click OK.

5 6

42 Configuration Configuring a backup policy for a database

7

In the Add a New Policy or Change Policy dialog box, in the Policy type list, select the SAP policy type. The database agent policy type does not appear in the drop-down list unless your master server has a license key for the database agent. Complete the entries on the Attributes tab. For more information, see Description of attributes, which follows this procedure. Add other policy information.

8

9

To add schedules, see Adding schedules on page 43. To add clients, see Adding clients on page 47. To add scripts to the backup selections list, see Adding backup selections on page 48.

10 When you have added all the schedules, clients, and backup selections you need, click OK.

Description of attributesWith a few exceptions, NetBackup manages a database backup like a file system backup. Table 3-1 shows the policy attributes that are different for SAP backups. This information is used when you add a new policy. Other policy attributes vary according to your specific backup strategy and system configuration.

Configuration Configuring a backup policy for a database

43

For more information on policy attributes, see the NetBackup Administrators Guide, Volume I. Table 3-1 AttributePolicy type

Policy attribute descriptions DescriptionDetermines the types of clients that can be in the policy. In some cases the policy type determines the types of backups that NetBackup can perform on those clients. To use the database agent, you must define at least one policy of type that is SAP. This option is available for SAP policies on UNIX. Select this attribute to back up files from NFS mounted file systems. If this option is not selected, NetBackup cannot perform a backup of NFS mounted files. Note: This option is not available for snapshot backups. For more details on this option, refer to Backing up files mounted with LOFS on page 50. Also see the NetBackup Administrator's Guide for UNIX.

Follow NFS

Keyword phrase

For NetBackup for SAP, the Keyword phrase entry is ignored.

Adding schedulesEach 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.

Tips for configuring schedules

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.

Configuring an Application Backup scheduleA database backup requires an Application Backup schedule. You cannot perform backups if this type of schedule is not included in the policy. The database agent automatically creates this schedule, named Default-Application-Backup, when you configure a new database policy.

44 Configuration Configuring a backup policy for a database

To configure an Application Backup schedule 1 In the Policy dialog box, click the Schedules tab. To access the Policy dialog box, double-click the policy name in the Policies list in the NetBackup administration console. Double-click the schedule that is named Default-Application-Backup. Specify the other properties for the schedule. See Schedule properties. The backup window for an Application Backup schedule must encompass the time period during which all scheduled jobs and unscheduled jobs can occur. This window is necessary because the Application Backup schedule starts the processes that are required for all database backups, including those started automatically. For example, assume the following:

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 3-2 on page 44 shows this example schedule.

Table 3-2 Type of backupApplication Backup

Example settings for an Application Backup schedule Schedule settingsRetention

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

Note: Specify the Application Backup schedule name in the initSID.utl file on the client.

Configuring Automatic Backup schedulesYou also need one or more automatic backup schedules if you plan to have NetBackup perform automatic backups, or if you use Snapshot Client features.

Configuration Configuring a backup policy for a database

45

To configure an Automatic Backup schedule 1 2 3 4 5 On the Policy dialog box, click the Schedules tab. Click New. Specify a unique name for the schedule. Select the Type of backup. See Types of backup schedules. Specify the other properties for the schedule. See Schedule properties, which follows this procedure. Table 3-3 shows example settings for an automatic backup schedule.

Table 3-3 Type of backupAutomatic Backup

Example settings for an Automatic Backup schedule Schedule settingsRetention

DescriptionThe 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.

Settings2 weeks

Frequency

every week

Backup Window

Sunday, 18:00:00 22:00:00

6

If this schedule is the last schedule, click OK. To add other schedules, repeat step 1 through step 6.

Types of backup schedulesTable 3-4 shows the backup schedules you can specify. Table 3-4 Backup typeApplication Backup

SAP backup types DescriptionThe Application Backup schedule enables user-controlled NetBackup operations from the client. These operations include those initiated from the client and those initiated by an automatic schedule on the master server. NetBackup uses the Application Backup schedule when the user starts a backup manually. Configure at least one Application Backup schedule for each database policy. The Default-Application-Backup schedule is configured automatically as an Application Backup schedule.

46 Configuration Configuring a backup policy for a database

Table 3-4 Backup type

SAP backup types (continued) DescriptionAn Automatic Full Backup schedule specifies the dates and times for NetBackup to automatically start backups. NetBackup runs the SAP scripts in the order that they appear in the file list. If there is more than one client in the SAP policy, the SAP scripts are run on each client. An Automatic Incremental Backup is a backup of only those blocks that have changed since the last Automatic Full (baseline) Backup. This kind of backup takes less time and space than a full backup because the Automatic Incremental Backup contains only the changed data. NetBackup for SAP supports this type of backup in MaxDB environments and in Oracle environments with RMAN.

Automatic Full Backup

Automatic Incremental Backup

Schedule propertiesSome of the schedule properties have a different meaning for database backups than for a regular file system backup. Table 3-5 explains the schedule properties. Table 3-5 PropertyType of backup

Description of schedule properties DescriptionSpecifies the type of backup that this schedule controls. The selection list shows only the backup types that apply to the policy you want to configure. For more information, see Types of backup schedules.

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

Configuration Configuring a backup policy for a database

47

Table 3-5 PropertyRetention

Description of schedule properties (continued) DescriptionThe retention period for an Application Backup schedule refers to the length of time that NetBackup keeps backup images. The retention period for an Automatic Backup schedule controls how long NetBackup keeps records of when scheduled backups have occurred. Frequency-based scheduling Set a retention period that is longer than the frequency setting for the schedule. For example, if the frequency setting is set to one week, set the retention period to be more than one week. The NetBackup scheduler compares the latest record of the Automatic Backup schedule to the frequency of that Automatic Backup schedule to determine whether a backup is due. This means that if you set the retention period to expire the record too early, the scheduled backup frequency is unpredictable. However, if you set the retention period to be longer than necessary, the NetBackup catalog accumulates unnecessary records. Calendar-based scheduling The retention period setting is not significant for calendar-based scheduling.

Multiple copies

If you want to specify multiple copies of a backup for the policy, configure Multiple copies on the Application Backup schedule.

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.

Adding clientsThe client list is the list of clients on which your SAP scripts are run during an automatic backup. A NetBackup client must be in at least one policy but can be in more than one. For a database policy, clients you want to add must have the following software installed:

SAP NetBackup client or server NetBackup for SAP The backup or restore script(s)

48 Configuration Configuring a backup policy for a database

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 SAP is installed in a NetBackup cluster, specify the virtual SAP 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.

Adding backup selectionsThe backup selections list in a database policy has a different meaning than for non-database policies. For example, in a Standard or Windows-NT policy, the list contains files and directories to be backed up. In a database policy, you specify scripts to be run.

Rules for scriptsObserve the following when using scripts:

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. 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.

Configuration Configuring a backup policy for a database

49

If you use NetBackup for SAP in a NetBackup server cluster, make sure that the scripts reside in a location that is available after a failover.

Add scripts to the backup selections list only if you want to set up a policy for automatic backups. These scripts are run for manual backups and for Automatic Backup schedules as specified under the Schedules tab. NetBackup runs the scripts in the order that the scripts appear in the backup selections list. For more information on backup scripts, see Creating scripts on page 50.

Adding scripts to the backup selections listThe following procedures describe how to add scripts to the backup selections list using the Java interface and using the Windows interface. Caution: Be sure to specify the correct script names in the backup selections list to prevent an error or possibly a wrong operation. Make sure that the script resides on the client before you try to add it to the backup selections list. For more information on backup scripts, see Creating scripts on page 50. To add 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 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: Click Add to add the script to the list. Repeat step a and step b to add any other scripts.

2 3 4

/usr/openv/netbackup/ext/db_ext/sap/scripts/sap_oracle/sap_offline_backup

b c 5

Click OK.

For more information on backup scripts, see Creating scripts on page 50. To add 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.

50 Configuration Creating scripts

2 3

Click New. 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: Click the Remote Folder button. Navigate to and select the script file. Click OK.

/usr/openv/netbackup/ext/db_ext/sap/scripts/sap_oracle/sap_offline_backup

4

Click OK.

Backing up files mounted with LOFSThe NetBackup for SAP Agent supports backups of files from a loopback virtual file system (LOFS). An LOFS file system allows you to create a virtual file system that provides access to existing files through the use of alternate pathnames. Consider a loopback mount of the /oracle file system onto the /database file system. This loopback mount allows the /oracle file system to also appear under the /database file system. All files in /oracle are then accessible either from a pathname relative to /oracle or relative to /database. For example, /database/sapdata1/system/system.dbf. If you have a local file system mounted as an LOFS, you do not need to select Follow NFS. Select the Follow NFS option for backups of an LOFS if the actual file system (for example, /oracle) is either of the following

an NFS mount a global zone file system and mounted with LOFS in a Solaris Zone

Creating scriptsIf you configured a policy for automatic scheduling in Adding backup selections on page 48, you also need to specify backup scripts to be run automatically. You can either create your own scripts or you can modify one or more of the scripts included in the following locations: /usr/openv/netbackup/ext/db_ext/sap/scripts/sap_oracle /usr/openv/netbackup/ext/db_ext/sap/scripts/sap_maxdb

Configuration Creating scripts

51

NetBackup for SAP scripts on page 51 shows the scripts in the sap_oracle and sap_maxdb directories. Table 3-6 NetBackup for SAP scripts Used by (underlying database)Oracle without RMAN

Script namesap_offline_backup

CommentsIssues a brbackup command and performs a full offline database backup. Use the export command to make $SAP_SERVER and $SAP_POLICY, which are created by bphdb in root, available to the NetBackup for SAP backint interface process. Issues the brbackup and brarchive commands and performs a full online database backup. Issues the brarchive command and backs up the offline redo log files. Issues the brbackup command with the RMAN option. Issues a dbmcli command and uses the specified backup medium.

sap_online_backup

Oracle without RMAN

sap_redo_log_backup

Oracle without RMAN

sap_rman_backup

Oracle with RMAN

sap_maxdb_backup

MaxDB

If you decide to use these scripts, customize them for your environment. Caution: Always specify the correct script when configuring automatic backups or when starting operations through NetBackup. NetBackup for SAP does not generate an error if a restore script is used for a backup operation or a backup script is used for a restore operation.

Modifying the backup scriptsTo modify the backup scripts 1 Copy the example script(s) from /usr/openv/netbackup/ext/db_ext/sap/scripts/sap_oracle or /usr/openv/netbackup/ext/db_ext/sap/scripts/sap_maxdb to a different location on your client. The SAP scripts can reside anywhere on the client. Do not store your scripts in the sample directory because your modifications are lost if you upgrade

52 Configuration Creating scripts

or reinstall. Always relocate your scripts to a safe location. In a NetBackup server cluster, this location must be available after a failover. 2 Enable proper permissions on the script files so NetBackup can run the scripts. Set the access permissions of these scripts to 775. chmod 775 script_name Open the script file with a text editor. For example, you can use the following command if you are modifying the sap_offline_backup script: vi sap_offline_backup Modify the script according to the instructions in the file. In particular, remember to edit lines that starts with su. If you do not include su - user (where user is the SAP administrator account) in your script, the script does not run with the proper account and environment variables. This situation can lead to problems with database backups and restores. For example, the sap_offline_backup script contains the following lines:

3

4

#!/bin/sh # #NOTE:IF your SAP user (in this script orasap) runs in C shell, environmental #variables can not be exported. In that case, you should modify this script to #work in your environment. For example: # SAP_SERVER=$SAP_SERVER; export SAP_SERVER; (Correct for Bourne and Korn shells) # can change into # setenv SAP_SERVER $SAP_SERVER; (Correct for C shell) # # #This environment variable are created by Netbackup (bphdb) # echo echo echo echo "SAP_SCHEDULED = $SAP_SCHEDULED" "SAP_USER_INITIATED = $SAP_USER_INITIATED" "SAP_SERVER = $SAP_SERVER" "SAP_POLICY = $SAP_POLICY"

RETURN_STATUS=0 SAP_ENV="" # # If SAP_SERVER exists then export it to make it available to backint # if [ -n "$SAP_SERVER" ] then SAP_ENV="$SAP_ENV SAP_SERVER=$SAP_SERVER; export SAP_SERVER;"

Configuration Creating scripts

53

#if Oracle DBA account( orasap user) uses C Shell, comment the above line and #uncomment next line # SAP_ENV="$SAP_ENV setenv SAP_SERVER $SAP_SERVER;" fi # # If SAP_POLICY exists then export it to make it available to backint # if [ -n "$SAP_POLICY" ] then SAP_ENV="$SAP_ENV SAP_POLICY=$SAP_POLICY;export SAP_POLICY;" #if Oracle DBA account( orasap user) uses C Shell, comment the above line and #uncomment next line # SAP_ENV="$SAP_ENV setenv SAP_POLICY $SAP_POLICY;" fi # # Full offline backup # CMD_LINE="$SAP_ENV brbackup -c -d util_file -t offline -m all" # # The username on the "su" command needs to be replaced with the correct # user name. # echo "Execute $CMD_LINE" su - orasap -c "$CMD_LINE" RETURN_STATUS=$? exit $RETURN_STATUS

5

Test the scripts you just created. For information on testing, see Testing configuration settings on page 61.

Script parametersThe SAP scripts that enable the SAP utilities to perform backups and restores use parameters defined in the following sources:

Environment variables Configuration files. For example, initSID.utl, where SID is the instance. See Modifying the configuration files on page 54. NetBackup configuration file (bp.conf)

You can use the different parameter sources to create SAP scripts to perform different database backup and restore tasks. For example, you can define $SAP_POLICY in an SAP script to perform different types of backups.

54 Configuration Modifying the configuration files

When NetBackups automatic scheduler runs an SAP script, it creates the following environment variables locally. Environment variable$SAP_POLICY $SAP_SCHEDULED

PurposeNames the NetBackup for SAP policy. Set to 1 if this is an automatic backup (scheduled SAP). Names the NetBackup server. Set to 1 if this is a user-initiated backup. That is, if the SAP backup is started from the master server.

$SAP_SERVER $SAP_USER_INITIATED

When an SAP script starts from the Java interface, it creates all of the preceding variables except for the $SAP_POLICY variable.

Modifying the configuration filesThe following sections show how to modify the NetBackup for SAP configuration files. The NetBackup for SAP software distribution includes several example configuration files.

Files to configureTable 3-7 on page 54 shows the files you need to modify depending upon whether your underlying database is an Oracle database or a MaxDB database. Table 3-7 FileinitSID.utl

Database configuration files Underlying databaseOracle and MaxDB

CommentsSAP parameter file. This file specifies policy, schedule, client, and other information to the backint interface. SAP profile file. This file contains information that the SAP tools use to interact with the backint interface. MaxDB configuration file. This file contains information that the SAP tools use to interact with the backint interface.

initSID.sap

Oracle

bsi.env

MaxDB

Relationships between filesThe SAP tools and NetBackup for SAP pass information in these configuration files to the backint interface. When backint runs, the following occurs:

Configuration Modifying the configuration files

55

In NetBackup for SAP on Oracle databases, you specify the actual initSID.utl file name as the argument to the util_par_file parameter in the initSID.sap file. In NetBackup for SAP on MaxDB databases, you specify the actual initSID.utl file name as the argument to the PARAMETERFILE parameter in the bsi.env file. The initSID.utl file name becomes the argumen