Você está na página 1de 11

Configuring Veritas NetBackup for

Taking Backup of MaxDB Database

Applies to:
SAP MaxDB database Backup.
For more information, visit the Data Management and Integration homepage.

Summary
This How-To Guide talks about Configuring Veritas NetBackup to be used with MaxDB database.
Author: Raj Naik
Company: Tata Consultancy Services
Created on: 29 May 2008

Author Bio
The Author is working with TATA Consultancy Services Ltd and has experience of around 3 Years in SAP
system administration.

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


© 2008 SAP AG 1
Configuring Veritas NetBackup for Taking Backup of MaxDB Database

Table of Contents
Software components for NetBackup for SAP on MaxDB Databases ...............................................................3
Sequence of Operation.......................................................................................................................................4
Configuring NetBackup for SAP .........................................................................................................................5
Disclaimer and Liability Notice..........................................................................................................................11

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


© 2008 SAP AG 2
Configuring Veritas NetBackup for Taking Backup of MaxDB Database

Software components for NetBackup for SAP on MaxDB Databases


Following Software components are used when taking backup of MaxDB database in VERITAS NetBackup.

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


© 2008 SAP AG 3
Configuring Veritas NetBackup for Taking Backup of MaxDB Database

Sequence of Operation
NetBackup for SAP users or schedulers start the backup and restore using a script file. A NetBackup
process bphdb starts the SAP script on the client. The scripts communicate with the MaxDB server and run a
command to start the database backup.

NetBackup Server

Scheduler /Manual Backup

Script File DBMCLI Backup Medium (Pipe)

Bsi.env file

Backint.exe initSAP.utl

NetBackup Client/ MaxDB Server

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


© 2008 SAP AG 4
Configuring Veritas NetBackup for Taking Backup of MaxDB Database

Configuring NetBackup for SAP


1) First Install VERITAS NetBackup Client on database server.
2) On Linux system you need to install NetBackup for SAP separately. Install NetBackup for SAP using
NetBackup UNIX option installer.
3) Check whether executable backint is present in installation directory of NetBackup.(
usr/openv/netbackup/bin)
4) Create a file bsi.env in run directory of the database instance. Example for database with dbsid I40
run directory can be (/sapdb/data/wrk/I40).
5) The following is an example of file bsi.env with minimum configuration specified.
BACKINT /usr/openv/netbackup/bin/backint

INPUT /backint/backint.in

OUTPUT /backint/backint.out

ERROROUTPUT /backint/backint.err

PARAMETERFILE /backint/initSAP.utl

6) The following list shows the parameters you can include in the bsi.env file.
i) BACKINT absolute_path/file_name: specifies absolute path and filename of the backint
program.
ii) INPUT absolute_path/file_name: This parameter specifies the absolute path and file name for
standard input file.
iii) OUTPUT absolute_path/file_name: This parameter specifies the absolute path and file name
for standard output file.
iv) ERROROUTPUT absolute path/file_name: This path specifies the absolute path and file name
fir standard error output file.
v) PARAMETERFILE absolute path/file_name : This parameter specifies the default path and
filename for configuration file for the program backint for MaxDB

7) Create configuration file for program backint for MaxDB as per the path specified in bsi.env file.
8) The sample initSAp.utl file is attached to the article.

Initsap.utl

9) Modify initSAP.utl file as mentioned in the sample file.


10) Test this configuration by running backup from DBMCLI or DBMGUI. The backup operation status
can be checked in dbm.ebl file inside run directory of the database. Also this backup should be
shown in Activity Monitor of NetBackup Server.

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


© 2008 SAP AG 5
Configuring Veritas NetBackup for Taking Backup of MaxDB Database

11) For running backup from NetBackup master server you need to create a script file.
if [ "$SAP_FULL" == "1" ]; then

/opt/sdb/programs/bin/dbmcli -u dbm,dbm -d MAXDB1 -uUTL dbm,dbm backup_start


BACKData

elif [ "$SAP_CINC" == "1" ]; then

/opt/sdb/programs/bin/dbmcli -u dbm,dbm -d MAXDB1 -uUTL dbm,dbm backup_start


BACKPage

fi

12) For running backup you need to define backup mediums for full and incremental backup. In above
script BACKData and BACKPage are the backup mediums used for Full and Incremental backup
respectively. These backup mediums can be defined using DBMGUI or DBMCLI. Following image
shows definition of backup medium. Backup type can be defined as Complete or incremental. Device
type has to be selected as Pipe. BACK is backup tool for VERITAS NetBackup. Specify the path
and file name of non existing file in Device/File text box.

13) Restoring Database backup on the same server and database is done using DBMGUI or DBMCLI

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


© 2008 SAP AG 6
Configuring Veritas NetBackup for Taking Backup of MaxDB Database

14) Click Recovery with initialization in Recovery tab of DBMGUI. A recovery wizard opens up.

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


© 2008 SAP AG 7
Configuring Veritas NetBackup for Taking Backup of MaxDB Database

15) Click On the next button. The database has to be in Admin Mode for restore to start.

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


© 2008 SAP AG 8
Configuring Veritas NetBackup for Taking Backup of MaxDB Database

16) Start the restore and restart the database when restore is completed.

17) For restoring the database to a new database or to new database server following procedure needs
to be followed.
• Configure NetBackup security for alternate client restores.(No.Restrictions or peername)
• Create instance for recovery
• Create backup medium that matches original backup medium
• Start instance in ADMIN state
• Copy over dbm.ebf, dbm.knl, dbm.mdf files from source db to new instance
• Start recovery wizard
• Select initialize instance
• Select backup set to restore
• Start restore
• When successful, start instance
• Recovery successful.
• To allow one client to restore databases from another client, either the use of the
“No.Restrictions” file, or the use of peername file is required.
18) Use of the No.Restrictions file allows any client to perform an alternate client restore of any clients’
data. To allow this, create an empty file called “No.Restrictions” in the directory path
<install_path>\NetBackup\db\altnames\ on the master server (in the
/usr/openv/netbackup/db/altnames directory on a UNIX master server).
19) Allowing a single client to perform redirected restores is enabled by the creation of an empty file
peername in the <install_path>\NetBackup\db\altnames\ directory of the master server, where
peername is the name of the client which can access files backed up by a different server.

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


© 2008 SAP AG 9
Configuring Veritas NetBackup for Taking Backup of MaxDB Database

20) For example, if the administrator wanted the client Freddie to restore files which were backed up by
another client Oscar, then it would be necessary to create the following file on the master server:
<install_path>\NetBackup\db\altnames\freddie
21) Create an instance for the recovery of database.
22) You need to restore external backup history files dbm.ebf using VERITAS NetBackup client software.
23) Remaining procedure is same as of step 13.

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


© 2008 SAP AG 10
Configuring Veritas NetBackup for Taking Backup of MaxDB Database

Disclaimer and Liability Notice


This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not
supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document,
and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or
code sample, including any liability resulting from incompatibility between the content within this document and the materials and
services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this
document.

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


© 2008 SAP AG 11