Note

You can download this article as a PDF

Backing up SAP

Overview

This document presents various techniques and strategies to backup SAP with Bacula Enterprise version 6.4 and later, which are not applicable to prior versions.

The sysadmin installing the Bacula Enterprise SAP plugin is assumed to have a good general knowledge of Bacula and in particular configuration of Bacula plugins. In addition, throughout this document, we assume that the sysadmin has a very good understanding of SAP and how it works.

The goal of document is to demonstrate how to configure Bacula backups of SAP databases, HANA and Oracle in particular.

Conventions Used In This Document

  • <SAPSID> Anything between < and > should be adapted by the user, for example, <SAPSID> should be replaced by your current SAP SID. If your SAP SID is TEST a file written as init<SAPSID>.ora will become initTEST.ora.

  • SAP1 is a valid <SAPSID> example used in this document.

  • % means that the command should be run with a normal unix user such as SAP1.

  • # means that the command should be run with the unix root account.

  • <RMAN> means that the command should be run inside a rman session.

  • <SQL> means that the command should be run inside a sqlplus session.

Presentation

The Bacula Enterprise SAP Plugin implements the official SAP Backint interface to simplify the backup and restore procedure using traditional SAP database tools.

The current Bacula Enterprise SAP Plugin implements the Backup and Restore Interface for:

  • BC-BRI BACKINT Interface for Oracle databases

  • SAP DB Systems (SAPDB/MAXDB) 7.x

  • SAP HANA BACKINT 1.04

Bacula Systems has done thorough testing on the BACKINT interface for Oracle and HANA databases. The SAP DB Systems have not yet had significant testing.

The Bacula Enterprise SAP plugin can be combined with the Bacula Enterprise Oracle SBT Plugin to allow direct data transfer between Oracle RMAN and Bacula Enterprise (backup_dev_type = rman_util). This configuration permits incremental backups to be run.

This plugin is available on RedHat Linux 7-8, 64 bit and SUSE Linux Enterprise Server 12 and 15, 64 bit platforms. If you need this plugin on other platforms please contact Bacula Support. This plugin is available on Linux platforms 32/64bit supported by SAP.

Architecture

The figure below will help explain how the various pieces fit together. At the top with the light purple background, it shows the Oracle database with its various files and logs. In the middle with light green background, you see how the SAP BRTools interface with Oracle and the database, and connect to the BACKINT program furnished by Bacula Systems shown with a light gray background. The BACKINT program in turn interfaces to the Bacula SAP plugin (sap-fd).

Interaction Between SAP with Oracle, Backint and Bacula

Interaction Between SAP with Oracle, Backint and Bacula

For everything to work, each of the pieces must be installed in the proper directories and, in general, each component has a configuration file (or parameter file).

Installing the SAP Plugin

SAP HANA

bacula-enterprise-sap-hana-plugin-8.10.0-1.el6.x86_64.rpm

The first step is to install the Bacula SAP HANA plugin package, which also contains the hdbbackint program. This package, shown above, must be installed on the Client machine where your SAP HANA database resides. In addition, please be aware that you ensure that the Bacula Enterprise bconsole program is also installed on the Client machine where the SAP database and Bacula Enterprise SAP HANA plugin are installed.

The Bacula Enterprise SAP package contains the following files:

/opt/bacula/scripts/install-sap.sh
/opt/bacula/bin/hdbbackint
/opt/bacula/plugins/sap-fd.so
/opt/backint/bacula-enterprise/hdbbackint

SAP Oracle/MaxDB

bacula-enterprise-sap-8.10.0-1.el6.x86_64.rpm

The first step is to install the Bacula SAP plugin package, which also contains the BACKINT program. This package, shown above, must be installed on the Client machine where your SAP database resides. In addition, please be aware that you ensure that the Bacula Enterprise bconsole program is also installed on the Client machine where the SAP database and Bacula Enterprise SAP plugin are installed.

The Bacula Enterprise SAP package contains the following files:

/opt/bacula/scripts/install-sap.sh
/opt/bacula/bin/backint
/opt/bacula/plugins/sap-fd.so

Upgrade

To upgrade an existing installation of the SAP plugin to Bacula Enterprise 8.10, the following commands must be added to the restricted Console ACLs used by the backint process. The Director configuration must be reloaded.

  • .bvfs_delete_fileid

  • .bvfs_version

  • list

Configuring the SAP Plugin

As with all Bacula plugins, you must define the Plugin Directory directive in the FileDaemon resource of the bacula-fd.conf file.

FileDaemon {
  Name = test-fd
  ...
  Plugin Directory = /opt/bacula/plugins
}

In order to send commands to the SAP database, the Bacula Enterprise SAP Plugin must share files on disk with SAP. After installing packages provided by Bacula Systems, the shared files are located on /opt/bacula/sap where the directory permissions should be:

% ls -ld /opt/bacula/sap
drwxrwx--- 13 root sdba 4096 Mar 28 14:04 /opt/bacula/sap

As seen above, sbda is the main group of the unix user running SAP. This permission is automatically set when installing packages, however, if your SAP unix group is not sbda, you may need to manually set permissions and ownership on this directory yourself and make sure that your changes are still in effect after each upgrade of the Bacula Enterprise SAP Plugin package. You also might want to relocate these control files. If so, please see section Restoring to a Different Tenant

The FileSet that you normally would use to backup SAP is as follows:

# cat SAPFileSet.cfg
FileSet {
  Name = SAPFileSet
  Include {
    Options { Signature = MD5 }
    Plugin = "sap"
  }

Configuring HDBBackint/Backint

In this section, we describe how to install and configure the Bacula Enterprise Backint interface with SAP.

When running a backup or restore from BRTools, Backint will need to contact the Bacula Enterprise Director to get information about files and volumes, or run backup and restore jobs. This communication involves shared FIFO command files, and the bconsole program.

By default, the Bacula Director will not be able to start a backup from bconsole or from a Schedule. Only SAP Tools will be able to initiate the session and start a Backup. If you would prefer to use Bacula’s scheduling feature to initiate backups, you can do so by using a Bacula RunScript to execute BRTools, which will in turn initiate a backup. For more details, please see section Using a Bacula Schedule.

Bacula Configuration

When using the Backint interface, Bacula’s console program bconsole must be installed, and the console must be able to connect to your Director and have access to the local Client, the backup Job and other Pool specifications. This is normally done by using an Admin bconsole, which does not have access restrictions. If you want to use a restricted console, please see the Using Restricted Consoles section.

Interaction Between HDBBackint/Backint and Bacula

Interaction Between HDBBackint/Backint and Bacula

For a given <SAPID> SAP1, a backup of the SAP database files can be done using the following Job and FileSet:

# The SAP-Backup job will be run each time backint and brtools
# are exectuted. This Job should never be run by backup administrators.
Job {
  Name    = SAP-BRTOOLs
  FileSet = SAP-FileSet
  Client  = sap-fd
  Maximum Concurrent Jobs = 10
}

FileSet {
  Name = SAP-FileSet
  Include {
    Options {
       Signature = MD5
    }
    Plugin = "sap"
  }
}

Then, the following regular backup job “SAP-Env-Backup” may be used to backup non essential SAP files. This regular backup job should not backup the SAP files that are handled by the SAP-BRTOOLs job show above. If such a scenario can’t be avoided, it is advised to create a second Client that points to the same physical SAP File Daemon and run jobs with it.

Job {
  Name    = SAP-Env-Backup
  FileSet = SAP-Env-FileSet
  Client  = sap-fd              # or a 2nd client that points to sap-fd
  Maximum Concurrent Jobs = 10
}

FileSet {
  Name = SAP-Env-FileSet
  Include {
    Options {
       Signature = MD5
    }
    File=/usr/sap/SAP1/SYS
    File=/opt/oracle/11/       # /<ORACLE_HOME>/<ORACLE_VERSION>
  }
  Exclude {
    File=/u01                  # files handled by SAP Plugin
  }
}

The unix user SAP1 should be able to execute bconsole and read the associated configuration file bconsole.conf.

# cp /opt/bacula/etc/bconsole.conf /usr/sap/SAP1/SYS
# chown SAP1 /usr/sap/SAP1/SYS/bconsole.conf
# chmod go-rxw /usr/sap/SAP1/SYS/bconsole.conf

Backint Installation and Configuration

After the Bacula SAP plugin package is installed as shown above, the backint or the hdbbackint program will be present in /opt/bacula/bin directory. You must then ensure that it is either copied or linked into the directory where the SAP Tools programs reside and that it is properly configured:

# ls /opt/bacula/bin/backint
-r-xr-xr-x 1 root root 95654 2013-03-02 01:00 backint

# ls /opt/bacula/bin/hdbbackint
-r-xr-xr-x 1 root root 95654 2013-03-02 01:00 hdbbackint

The backint/hdbbackint program must be installed in the same directory where the SAP tools are installed. This is because SAP uses the backint program as an interface between its tools and Bacula. The SAP directory in question contains all the SAP BRTools (brachive, brbackup, brtools, …) is usually:

  /usr/sap/<SAPSID>/SYS/exe/run
or
  /usr/sap/<SAPSID>/SYS/global/hdb/opt

The final installation stage of the backint or hdbbackint program can be done automatically, in most cases, using the install-sap.sh script available under /opt/bacula/scripts

# /opt/bacula/scripts/install-sap.sh install

The script will create a backint configuration file (also called the Backint parameter file) and will install the backint binary inside the SAP instance file tree. A template of the configuration which needs to be added to the Director’s bacula-dir.conf file will also be generated.

Configuring the Backint Parameter File

Backint can be configured with the /opt/bacula/sap/backint.conf file, which is referred to as the Backint Parameter File in SAP. It may also be configured using the -p option of the BRTools command. With an Oracle database, the default parameter file may be symlinked to its default location by using the following command:

# ln -s /opt/bacula/sap/backint.conf ${ORACLE_HOME}/dbs/init${ORACLE_SID}.utl

The keywords presented here are accepted in the backint.conf file.

Parameter

Example

Description

Required

client

client=sap-fd

Bacula Client name.

Yes

restoreclient

restoreclient=sap-test-fd

Bacula Client name used to restore data.

No

ClientCluster

clientcluster=sap-fd,sap2-fd,sap3-fd

List of the Bacula Clients included in the SAP cluster.

No

job

job=SAP-BRTOOLs

Bacula Backup Job name.

Yes

bconsole

bconsole="/opt/bacula/bin/bconsole -n -c /opt/bacula/sap/bconsole.conf"

Bconsole command with all arguments.

Yes

RestoreJob

restorejob=RestoreFiles

Bacula Restore Job name. If multiple restore jobs are defined

in your configuration and this option is not used,

backint will automatically choose the first restore Job defined.

No

WaitJobCompletion

waitjobcompletion=yes

Indicates to wait for Job completion at the end of the backint session.

The default is to finish the backint session as soon as possible.

No

JobOpt

jobopt="spooldata=no"

Allows you to specify additional Job options.

No

MaximumConcurrentJobs

MaximumConcurrentJobs=10

Specifies the number of concurrent job sessions allowed.

All Bacula resources must be configured properly to

allow jobs to run in parallel.

No

CtrlFile

ctrlfile=/opt/bacula/sap/backint

Specifies the base path of control files used to connect with the bacula-fd plugin.

You must use the same location on the Plugin command line in the Fileset,

and in the backint.conf configuration file.

No

wait_retry

wait_retry=30

Specifies the number of times that backint will

try to reach the Bacula Enterprise SAP plugin (10s between each

try). Starting with 8.6.4, it is also possible to use the keyword retry.

No

catalog

catalog="MyCatalog 2"

Specifies a Bacula Catalog name if your director is using multiple catalogs.

No

trace

trace=/tmp/log.txt

Points to an optional trace file.

No

debug

debug=50

Debug level.

No

RawFileOffset

rawfileoffset=4096

On some systems, raw devices use an offset. You can use

the $ORACLE_HOME/bin/offset utility to determine the offset value.

No

A minimal parameter file will require the client, job and bconsole options to be set. Note that if the configuration option contains spaces (such as bconsole), you must use double quotes to enclose it. The keyword is case insensitive.

# cat ${ORACLE_HOME}/dbs/init<ORACLE_SID>.utl
client=sap-fd
job=SAP-BRTOOLs
bconsole="/opt/bacula/bin/bconsole -n -c /usr/sap/SAP1/SYS/exe/run/bconsole.conf"
ctrlfile="/usr/sap/SAP1/bacula/base"
maximumconcurrentjobs=5

If the ctrlfile option is set in the backint.conf file, the same ctrlfile option should be specified in the FileSet Plugin command line.

For a SAP HANA cluster:

# cat /opt/bacula/sap/backint.conf
client=sap-fd
clientcluster=sap-fd,sap2-fd,sap3-fd
job=SAP-BRTOOLs
bconsole="/opt/bacula/bin/bconsole -n -c /opt/bacula/sap/bconsole.conf"
maximumconcurrentjobs=5
waitjobcompletion=yes

TOOLOPTION SAP Configuration

Available since Bacula Enterprise 12.2.4

The TOOLOPTION parameter can be used to customize some backint parameter at the runtime. The following options can be modified:

  • job

  • pool

  • level

hdbsql -i 00 -u SYSTEM -p X -d SYSTEMDB "BACKUP DATA INCREMENTAL USING BACKINT ('Inc2') TOOLOPTION 'level=full'"

Running Parallel Jobs

In order to run Backup or Restore using multiple channels, you need to ensure that all required resources in Bacula are properly configured using appropriate Maximum Concurrent Jobs directive settings to allow concurrent jobs (see table below). By default, if Maximum Concurrent Jobs is not explicitly set, the default value is 1, so you must ensure that all resources are properly configured.

Setting Maximum Concurrent Jobs

Component

Resource

Possible Value

Director

Director

MaximumConcurrentJobs=100

Client

MaximumConcurrentJobs=10

Job

MaximumConcurrentJobs=10

Storage

MaximumConcurrentJobs=20

Storage

Storage

MaximumConcurrentJobs=20

Device

MaximumConcurrentJobs=10

File Daemon

FileDaemon

MaximumConcurrentJobs=10

Backint (on Client)

MaximumConcurrentJobs=10

To allow concurrent Backup and Restore jobs using the same Director Storage resource, the configuration must use a Virtual Autochanger disk device. See the Disk Backup white paper about this specific configuration.

Getting Debug and Trace Outputs

To enable debug traces with the Bacula Enterprise SAP Backint Plugin, it is necessary to combine both File Daemon Plugin traces and Backint traces at level 50.

# bconsole
* setdebug level=50 trace=1 client=<clientname> options=t

Traces are stored in the Client’s working directory

/opt/bacula/working/<host-fd>.trace

Do not forget to disable debug traces on the client

# bconsole
* setdebug level=0 trace=0 client=<clientname>

To enable traces for Backint, you must modify the parameter file and use debug and trace options.

# cat $ORACLE HOME/dbs/init<ORACLE_SID>.utl
trace=/tmp/backint.log
debug=50

Testing backint.conf/init<SID>.utl Configuration

To test the Bacula Enterprise SAP Backint Plugin configuration, the following command can be run as the root user:

# /opt/bacula/scripts/install-sap.sh test
Enter the unix SAP account name: sapuser
1000 OK: sap-dir Version: 6.4.6 (18 Aug 2013)
INFO: Connection to the Director OK
INFO: Connection from the Director to the Client OK
INFO: Plugin installed correctly
INFO: Job found on the Director
INFO: FileSet configured on the Director

If a connection error is detected, a message will be displayed. It is useless to run any SAP backup until the connection is properly configured.

SAP Configuration

To use the Bacula Enterprise Backint SAP Plugin, the following entries have to be added in the SAP parameter file init<ORACLE_SID>.sap. For example, in the case of ORACLE:

backup_dev_type=util_file             #  Backup Device Type
util_par_file=$ORACLE_HOME/dbs/init<ORACLE_SID>.utl$

The util_par_file should point to the Backint parameter file.

For installations with Oracle 11g (or higher) RAC, the parameter file is located in the directory <SAPDATA.HOME>/sapprof. For more information see the SAP Database Guide for Oracle documentation on the util_par_file parameter.

SAP Backup Retention

When using SAP plugin of the Bacula Enterprise, the backup retention defined in SAP should match the Bacula Volume or Job retention. When the SAP backup retention expires and SAP sends commands to delete backup files, Bacula will delete selected files but will not purge associated jobs. So in order to have the Bacula catalog entries for these files deleted, they must also have the same Bacula Volume or Job retention settings in the bacula-dir.conf file.

Backup Scenarios

Using SAP Oracle Tools

You can start a backup through the SAPDBA utility’s menus or through the brbackup command line.

# brbackup -t online -m full -c force
BR0051I BRBACKUP 7.00 (40)
BR0055I Start of database backup: belxgvax.fnf 2013-08-20 10.46.03
BR0484I BRBACKUP log file: /u01/db_1/sapbackup/belxgvax.fnf
BR0477I Oracle pfile /u01/db_1/dbs/initEAR.ora created from spfile /u01/db_1/dbs/spfileEAR.ora

BR0280I BRBACKUP time stamp: 2013-08-20 10.46.04
BR0057I Backup of database: EAR
BR0058I BRBACKUP action ID: belxgvax
BR0059I BRBACKUP function ID: fnf
BR0110I Backup mode: FULL
BR0077I Database file for backup: /u01/db_1/sapbackup/cntrlEAR.dbf
BR0061I 6 files found for backup, total size 861.773 MB
BR0143I Backup type: online
BR0130I Backup device type: util_file
BR0109I Files will be saved by backup utility
BR0134I Unattended mode with 'force' active - no operator confirmation allowed

BR0280I BRBACKUP time stamp: 2013-08-20 10.46.04
BR0315I 'Alter database begin backup' successful

BR0280I BRBACKUP time stamp: 2013-08-20 10.46.04
BR0229I Calling backup utility with function 'backup'...
BR0278I Command output of 'backint -u EAR -f backup -i /u01/db_1/sapbackup/.belxgvax.lst
                             -t file -p /opt/bacula/sap/backint.conf -c':
Profile: /opt/bacula/sap/backint.conf
Input File: /u01/db_1/sapbackup/.belxgvax.lst
Output File: *None*
Client node: sap-fd

...

BR0280I BRBACKUP time stamp: 2013-08-20 10.46.18
#FILE..... /u01/oradata/EAR/undotbs01.dbf
#SAVED.... EAR-51

BR0280I BRBACKUP time stamp: 2013-08-20 10.46.18
#FILE..... /u01/oradata/EAR/users01.dbf
#SAVED.... EAR-51

BR0280I BRBACKUP time stamp: 2013-08-20 10.46.18
BR0232I 5 of 5 files saved by backup utility
BR0230I Backup utility called successfully

BR0280I BRBACKUP time stamp: 2013-08-20 10.46.20
BR0530I Cataloging backups of all database files...

BR0522I 5 of 5 files/save sets processed by RMAN

BR0280I BRBACKUP time stamp: 2013-08-20 10.46.24
BR0531I Backups of all database files cataloged successfully

BR0280I BRBACKUP time stamp: 2013-08-20 10.46.24
BR0317I 'Alter database end backup' successful

BR0280I BRBACKUP time stamp: 2013-08-20 10.46.24
BR0340I Switching to next online redo log file for database instance EAR ...
BR0321I Switch to next online redo log file for database instance EAR successful

BR0280I BRBACKUP time stamp: 2013-08-20 10.46.24
BR0319I Control file copy created: /u01/db_1/sapbackup/cntrlEAR.dbf 7061504

BR0280I BRBACKUP time stamp: 2013-08-20 10.46.24
BR0229I Calling backup utility with function 'backup'...
BR0278I Command output of 'backint -u EAR -f backup -i /u01/db_1/sapbackup/.belxgvax.lst
                             -t file -p /opt/bacula/sap/backint.conf -c':
Profile: /opt/bacula/sap/backint.conf
Input File: /u01/db_1/sapbackup/.belxgvax.lst
Output File: *None*
Client node: sap-fd

BR0280I BRBACKUP time stamp: 2013-08-20 10.46.27
#FILE..... /u01/db_1/sapbackup/cntrlEAR.dbf
#SAVED.... EAR-52

BR0280I BRBACKUP time stamp: 2013-08-20 10.46.27
BR0232I 1 of 1 file saved by backup utility
BR0230I Backup utility called successfully

BR0280I BRBACKUP time stamp: 2013-08-20 10.46.27
BR0229I Calling backup utility with function 'backup'...
BR0278I Command output of 'backint -u EAR -f backup -i /u01/db_1/sapbackup/.belxgvax.lst
                             -t file -p /opt/bacula/sap/backint.conf -c':
Profile: /opt/bacula/sap/backint.conf
Input File: /u01/db_1/sapbackup/.belxgvax.lst
Output File: *None*
Client node: sap-fd

BR0280I BRBACKUP time stamp: 2013-08-20 10.46.28
#PFLOG.... /u01/db_1/dbs/initEAR.ora
#SAVED.... EAR-53

BR0280I BRBACKUP time stamp: 2013-08-20 10.46.28
#PFLOG.... /u01/db_1/dbs/spfileEAR.ora
#SAVED.... EAR-53

BR0280I BRBACKUP time stamp: 2013-08-20 10.46.28
#PFLOG.... /u01/db_1/dbs/initEAR.sap
#SAVED.... EAR-53

...

BR0280I BRBACKUP time stamp: 2013-08-20 10.46.28
BR0232I 8 of 8 files saved by backup utility
BR0230I Backup utility called successfully

BR0056I End of database backup: belxgvax.fnf 2013-08-20 10.46.28
BR0280I BRBACKUP time stamp: 2013-08-20 10.46.28
BR0052I BRBACKUP completed successfully

To use the interactive command line, use brtools.

% brtools
...
Backup and database copy

 1 = Database backup
 2 - Archivelog backup
 3 - Database copy
 4 - Non-database backup
 5 - Backup of database disk backup
 6 - Verification of database backup
 7 - Verification of archivelog backup
 8 - Additional functions
 9 - Reset program status

...

BR0280I BRARCHIVE time stamp: 2013-08-20 11.29.36
BR0229I Calling backup utility with function 'backup'...
BR0278I Command output of 'backint -u EAR -f backup
     -i /u01/db_1/saparch/.aelxgyxc.lst
     -t file -p /opt/bacula/sap/backint.conf':

Profile: /opt/bacula/sap/backint.conf
Input File: /u01/db_1/saparch/.aelxgyxc.lst
Output File: *None*
Client node: sap-fd


...

BR0232I 8 of 8 files saved by backup utility
BR0230I Backup utility called successfully

Using a Bacula Schedule

In order to control the database backup from the Director side and use Bacula’s scheduler, a Job using a RunScript can be used as presented in the following example.

Job {
 Name = job.sap-fd.base
 Description = "Basic job for SAP server"
 ClientRunBeforeJob = "/opt/bacula/scripts/job.sap-fd.EAR %l"
 Schedule = sched.sap-fd.base
 FileSet = fs.sap-fd.base
 ...
}
FileSet {
  Name = fs.sap-fd.base
  Include {
    Options { Signature = MD5 }
    File=/usr/sap/EAR/SYS
    File=/opt/oracle/11/       # /<ORACLE_HOME>/<ORACLE_VERSION>
...
    File = /etc
  }
}
Schedule {
  Name = sched.sap-fd.base
  ....
}

Job {
 Name = job.sap-fd.EAR
 Description = "Backint SAP Job for DB EAR"
 FileSet = fs.sap-fd.EAR
 # No Schedule for this job, will be triggered by job.sap-fd.base
 # No RunScript for this job
...
}

FileSet {
 Name = job.sap-fd.EAR
 Include {
   Options { Signature = MD5 }
   Plugin = sap
 }
}

The main goal here is to perform the backup of some essential files and spawn a SAP Backint backup session using a RunScript. The RunScript will start a new Job. The custom script might be something like:

% cat /opt/bacula/scripts/job.sap-fd.EAR
#!/bin/sh

level=incr

if [ "$1" = f ]; then
  level=full

elif [ "$1" = d ]; then
  level=diff
fi

su - sapuser -c "brbackup -t online -m $level -c force"
exit $?

Note

The “brbackup” command should be adapted to your environment using brtools or sapdba tools.

To use this scripting technique, the configuration should allow running multiple concurrent Jobs on the SAP Client (See the MaximumConcurrentJobs directive in Table tab:maximumconcurrentjobs).

The backint parameter file will probably be something like:

client=sap-fd
job=job.sap-fd.EAR
bconsole="/opt/bacula/bin/bconsole -n -c /opt/bacula/sap/bconsole.conf"

Restore Scenarios

Using BRRESTORE SAP Tools

# brrestore -m 0
BR0401I BRRESTORE 7.00 (40)
BR0405I Start of file restore: remllqsn.rsb 2013-11-03 10.29.45
BR0484I BRRESTORE log file: /oracle/product/10.2.0/db_1/sapbackup/remllqsn.rsb

BR0428W File /oracle/product/10.2.0/oradata/EAR/control01.ctl will be overwritten
BR0428W File /oracle/product/10.2.0/oradata/EAR/control02.ctl will be overwritten
BR0428W File /oracle/product/10.2.0/oradata/EAR/control03.ctl will be overwritten

BR0280I BRRESTORE time stamp: 2013-11-03 10.29.45
BR0256I Enter 'c[ont]' to continue, 's[top]' to cancel BRRESTORE:
c
BR0280I BRRESTORE time stamp: 2013-11-03 10.29.46
BR0257I Your reply: 'c'
BR0259I Program execution will be continued...

BR0280I BRRESTORE time stamp: 2013-11-03 10.29.46
BR0407I Restore of database: EAR
BR0408I BRRESTORE action ID: remllqsn
BR0409I BRRESTORE function ID: rsb
BR0449I Restore mode: partial
BR0411I Database files for restore:
/oracle/product/10.2.0/oradata/EAR/control01.ctl
/oracle/product/10.2.0/oradata/EAR/control02.ctl
/oracle/product/10.2.0/oradata/EAR/control03.ctl
BR0419I Files will be restored from backup: bemllqeh.anf 2013-11-03 10.23.35
BR0416I 1 file found to restore, size 6.797 MB
BR0421I Restore device type: util_file

BR0280I BRRESTORE time stamp: 2013-11-03 10.29.46
BR0256I Enter 'c[ont]' to continue, 's[top]' to cancel BRRESTORE:
c
BR0280I BRRESTORE time stamp: 2013-11-03 10.29.47
BR0257I Your reply: 'c'
BR0259I Program execution will be continued...

BR0280I BRRESTORE time stamp: 2013-11-03 10.29.47
BR0229I Calling backup utility with function 'restore'...
BR0278I Command output of 'backint -u EAR -f restore -i /oracle/product/10.2.0/db_1/sapbackup/.remllqsn.lst -t file -p /opt/bacula/sap/backint.conf':
Profile: /opt/bacula/sap/backint.conf
Input File: /oracle/product/10.2.0/db_1/sapbackup/.remllqsn.lst
Output File: *None*
Client node: sap-fd

BR0280I BRRESTORE time stamp: 2013-11-03 10.29.52
#FILE..... /oracle/product/10.2.0/db_1/sapbackup/cntrlEAR.dbf
#RESTORED. EAR-5

BR0280I BRRESTORE time stamp: 2013-11-03 10.29.52
BR0374I 1 of 1 file restored by backup utility
BR0230I Backup utility called successfully

BR0351I Restoring /oracle/product/10.2.0/oradata/EAR/control01.ctl
BR0355I from /oracle/product/10.2.0/db_1/sapbackup/cntrlEAR.dbf ...

BR0351I Restoring /oracle/product/10.2.0/oradata/EAR/control02.ctl
BR0355I from /oracle/product/10.2.0/db_1/sapbackup/cntrlEAR.dbf ...

BR0351I Restoring /oracle/product/10.2.0/oradata/EAR/control03.ctl
BR0355I from /oracle/product/10.2.0/db_1/sapbackup/cntrlEAR.dbf ...

BR0406I End of file restore: remllqsn.rsb 2013-11-03 10.29.52
BR0280I BRRESTORE time stamp: 2013-11-03 10.29.52
BR0403I BRRESTORE completed successfully with warnings
# brrestore  -p initEAR.sap -b bemllsxd.anf -d util_file -r /opt/bacula/sap/backint.conf -m all -l E -i 30

BR0401I BRRESTORE 7.00 (40)
BR0405I Start of file restore: remlltnz.rsb 2013-11-03 11.01.35
BR0484I BRRESTORE log file: /oracle/product/10.2.0/db_1/sapbackup/remlltnz.rsb

BR0428W File /oracle/product/10.2.0/oradata/EAR/example01.dbf will be overwritten
BR0428W File /oracle/product/10.2.0/oradata/EAR/sysaux01.dbf will be overwritten
BR0428W File /oracle/product/10.2.0/oradata/EAR/system01.dbf will be overwritten
BR0428W File /oracle/product/10.2.0/oradata/EAR/undotbs01.dbf will be overwritten
BR0428W File /oracle/product/10.2.0/oradata/EAR/users01.dbf will be overwritten

BR0280I BRRESTORE time stamp: 2013-11-03 11.01.35
BR0256I Enter 'c[ont]' to continue, 's[top]' to cancel BRRESTORE:
c
BR0280I BRRESTORE time stamp: 2013-11-03 11.01.38
BR0257I Your reply: 'c'
BR0259I Program execution will be continued...

BR0456I Probably the database must be recovered due to restore from online backup

BR0280I BRRESTORE time stamp: 2013-11-03 11.01.38
BR0407I Restore of database: EAR
BR0408I BRRESTORE action ID: remlltnz
BR0409I BRRESTORE function ID: rsb
BR0449I Restore mode: ALL
BR0419I Files will be restored from backup: bemllsxd.anf 2013-11-03 10.54.17
BR0416I 5 files found to restore, total size 855.039 MB
BR0421I Restore device type: util_file

BR0280I BRRESTORE time stamp: 2013-11-03 11.01.38
BR0256I Enter 'c[ont]' to continue, 's[top]' to cancel BRRESTORE:
c
BR0280I BRRESTORE time stamp: 2013-11-03 11.01.42
BR0257I Your reply: 'c'
BR0259I Program execution will be continued...

BR0280I BRRESTORE time stamp: 2013-11-03 11.01.42
BR0229I Calling backup utility with function 'restore'...
BR0278I Command output of 'backint -u EAR -f restore -i /oracle/product/10.2.0/db_1/sapbackup/.remlltnz.lst -t file -p /opt/bacula/sap/backint.conf':
Profile: /opt/bacula/sap/backint.conf
Input File: /oracle/product/10.2.0/db_1/sapbackup/.remlltnz.lst
Output File: *None*
Client node: sap-fd

BR0280I BRRESTORE time stamp: 2013-11-03 11.02.04
#FILE..... /oracle/product/10.2.0/oradata/EAR/example01.dbf
#RESTORED. EAR-13

BR0280I BRRESTORE time stamp: 2013-11-03 11.02.04
#FILE..... /oracle/product/10.2.0/oradata/EAR/sysaux01.dbf
#RESTORED. EAR-13

BR0280I BRRESTORE time stamp: 2013-11-03 11.02.04
#FILE..... /oracle/product/10.2.0/oradata/EAR/system01.dbf
#RESTORED. EAR-13

BR0280I BRRESTORE time stamp: 2013-11-03 11.02.04
#FILE..... /oracle/product/10.2.0/oradata/EAR/undotbs01.dbf
#RESTORED. EAR-13

BR0280I BRRESTORE time stamp: 2013-11-03 11.02.04
#FILE..... /oracle/product/10.2.0/oradata/EAR/users01.dbf
#RESTORED. EAR-13

BR0280I BRRESTORE time stamp: 2013-11-03 11.02.04
BR0374I 5 of 5 files restored by backup utility
BR0230I Backup utility called successfully

BR0406I End of file restore: remlltnz.rsb 2013-11-03 11.02.05
BR0280I BRRESTORE time stamp: 2013-11-03 11.02.05
BR0403I BRRESTORE completed successfully with warnings

Verifying Backup Using Brtools

BR0280I BRTOOLS time stamp: 2013-11-03 10.37.22
BR0656I Choice menu 9 - please make a selection
---------------------------------------------------------------------------
Backup and database copy

 1 = Database backup
 2 - Archivelog backup
 3 - Database copy
 4 - Non-database backup
 5 - Backup of database disk backup
 6 + Verification of database backup
 7 - Verification of archivelog backup
 8 - Additional functions
 9 - Reset program status

Standard keys: c - cont, b - back, s - stop, r - refr, h - help
---------------------------------------------------------------------------
BR0662I Enter your choice:
6
BR0280I BRTOOLS time stamp: 2013-11-03 10.37.26
BR0663I Your choice: '6'

BR0699I Reading log file /oracle/product/10.2.0/db_1/sapbackup/backEAR.log ...

BR0280I BRTOOLS time stamp: 2013-11-03 10.37.26
BR0658I List menu 20 - please select one entry
---------------------------------------------------------------------------
BRBACKUP database backups for verification

Pos.  Log           Start                Type        Files  Device     Rc

  1 = bemllqeh.anf  2013-11-03 10.23.35  onl_cons      5/6  util_file   0
  2 - bemllqad.anf  2013-11-03 10.21.47  onl_cons      0/6  util_file   5
  3 - bemllpwy.anf  2013-11-03 10.20.24  onl_cons      0/6  util_file   5

Standard keys: c - cont, b - back, s - stop, r - refr, h - help
---------------------------------------------------------------------------
BR0662I Enter your selection:
1
BR0280I BRTOOLS time stamp: 2013-11-03 10.37.27
BR0663I Your selection: '1'

BR0280I BRTOOLS time stamp: 2013-11-03 10.37.27
BR0657I Input menu 21 - please enter/check input values
---------------------------------------------------------------------------
BRRESTORE main options for verification of database backup

 1 - BRRESTORE profile (profile) ....... [initEAR.sap]
 2 - BRBACKUP backup run (backup) ...... [bemllqeh.anf]
 3 - Verification device type (device) . [util_file]
 4 ~ BACKINT/Mount profile (parfile) ... [/opt/bacula/sap/backint.conf]
 5 # Database user/password (user) ..... [/]
 6 - Recovery interval (interval) ...... [30]
 7 - Verification mode (verify) ........ [yes]
 8 ~ Files for verification (mode) ..... [full]

Standard keys: c - cont, b - back, s - stop, r - refr, h - help
---------------------------------------------------------------------------
BR0662I Enter your choice:
c
BR0280I BRTOOLS time stamp: 2013-11-03 10.37.34
BR0663I Your choice: 'c'
BR0259I Program execution will be continued...

BR0280I BRTOOLS time stamp: 2013-11-03 10.37.34
BR0657I Input menu 22 - please enter/check input values
---------------------------------------------------------------------------
Additional BRRESTORE options for verification of database backup

 1 - Confirmation mode (confirm) ...... [yes]
 2 - Query mode (query) ............... [no]
 3 # Compression mode (compress) ...... [no]
 4 # Parallel execution (execute) ..... [0]
 5 - Additional output (output) ....... [no]
 6 - Message language (language) ...... [E]
 7 - BRRESTORE command line (command) . [-p initEAR.sap -b bemllqeh.anf -d util_file -r /opt/bacula/sap/backint.conf -i 30 -w -m full -k no -l E]

Standard keys: c - cont, b - back, s - stop, r - refr, h - help
---------------------------------------------------------------------------
BR0662I Enter your choice:
c
BR0280I BRTOOLS time stamp: 2013-11-03 10.37.36
BR0663I Your choice: 'c'
BR0259I Program execution will be continued...

BR0291I BRRESTORE will be started with options '-p initEAR.sap -b bemllqeh.anf -d util_file -r /opt/bacula/sap/backint.conf -i 30 -w -m full -k no -l E'

BR0280I BRTOOLS time stamp: 2013-11-03 10.37.36
BR0670I Enter 'c[ont]' to continue, 'b[ack]' to go back, 's[top]' to abort:
c
BR0280I BRTOOLS time stamp: 2013-11-03 10.37.37
BR0257I Your reply: 'c'
BR0259I Program execution will be continued...

##########################################################################

BR0401I BRRESTORE 7.00 (40)
BR0405I Start of file restore: remllrkr.rsb 2013-11-03 10.37.37
BR0484I BRRESTORE log file: /oracle/product/10.2.0/db_1/sapbackup/remllrkr.rsb

BR0280I BRRESTORE time stamp: 2013-11-03 10.37.37
BR0407I Restore of database: EAR
BR0408I BRRESTORE action ID: remllrkr
BR0409I BRRESTORE function ID: rsb
BR0449I Restore mode: FULL
BR0411I Database file for restore: /oracle/product/10.2.0/db_1/sapbackup/cntrlEAR.dbf
BR0414I Offline redo log file for restore of database instance EAR: 28
BR0419I Files will be restored from backup: bemllqeh.anf 2013-11-03 10.23.35
BR0416I 7 files found to restore, total size 863.722 MB
BR0421I Restore device type: util_file
BR0147I Verify option set - verification of backup only, no restore

BR0280I BRRESTORE time stamp: 2013-11-03 10.37.37
BR0256I Enter 'c[ont]' to continue, 's[top]' to cancel BRRESTORE:
c
BR0280I BRRESTORE time stamp: 2013-11-03 10.37.39
BR0257I Your reply: 'c'
BR0259I Program execution will be continued...

BR0280I BRRESTORE time stamp: 2013-11-03 10.37.39
BR0229I Calling backup utility with function 'restore'...
BR0278I Command output of 'backint -u EAR -f restore -i /oracle/product/10.2.0/db_1/sapbackup/.remllrkr.lst -t file -p /opt/bacula/sap/backint.conf':
Profile: /opt/bacula/sap/backint.conf
Input File: /oracle/product/10.2.0/db_1/sapbackup/.remllrkr.lst
Output File: *None*
Client node: sap-fd

BR0280I BRRESTORE time stamp: 2013-11-03 10.38.13
#RESTORED. /oracle/product/10.2.0/oradata/EAR/example01.dbf /oracle/product/10.2.0/db_1/sapreorg/example01.dbf EAR-5

BR0280I BRRESTORE time stamp: 2013-11-03 10.38.13
#RESTORED. /oracle/product/10.2.0/oradata/EAR/sysaux01.dbf /oracle/product/10.2.0/db_1/sapreorg/sysaux01.dbf EAR-5

...

BR0280I BRRESTORE time stamp: 2013-11-03 10.38.14
BR0374I 7 of 7 files restored by backup utility
BR0230I Backup utility called successfully

BR0353I Verifying backup of /oracle/product/10.2.0/oradata/EAR/example01.dbf
BR0355I from /oracle/product/10.2.0/db_1/sapreorg/example01.dbf ...

BR0362I Verification of backup of /oracle/product/10.2.0/oradata/EAR/example01.dbf successful

BR0280I BRRESTORE time stamp: 2013-11-03 10.38.23
BR0063I 1 of 7 files processed - 100.008 MB of 863.722 MB done
BR0204I Percentage done: 11.58%, estimated end time: 10:39
BR0001I ******____________________________________________

...

BR0280I BRRESTORE time stamp: 2013-11-03 10.38.24
BR0063I 7 of 7 files processed - 863.722 MB of 863.722 MB done
BR0204I Percentage done: 100.00%, estimated end time: 10:38
BR0001I **************************************************

BR0406I End of file restore: remllrkr.rsb 2013-11-03 10.38.24
BR0280I BRRESTORE time stamp: 2013-11-03 10.38.24
BR0402I BRRESTORE completed successfully

##########################################################################

BR0292I Execution of BRRESTORE finished with return code 0

Restoring to a Different Client or Without SAP

To restore data to a specific directory without calling BRTools, you can use the bconsole where= parameter during the restore session. To restore to / without calling SAP tools, the Plugin option restore_to_disk can be used from the restore menu.

* restore where=/tmp
...

JobId 66: Start Restore Job RestoreFiles.2013-08-20_12.21.44_19
JobId 66: Using Device "FileStorage" to read.
JobId 66: Ready to read from volume "TestVolume001" on file device ...
JobId 66: Forward spacing Volume "TestVolume001" to file:block 0:38525.
JobId 66: Restoring SAP data to /tmp without backint.
JobId 66: Elapsed time=00:00:01, Transfer rate=806  Bytes/second
JobId 66: Bacula 127.0.0.1-dir 6.4.6 (16Aug13):
  Build OS:               x86_64-unknown-linux-gnu archlinux
  JobId:                  66
  Job:                    RestoreFiles.2013-08-20_12.21.44_19
  Restore Client:         sap-fd
  Start time:             20-Aug-2013 12:21:46
  End time:               20-Aug-2013 12:21:47
  Files Expected:         2
  Files Restored:         2
  Bytes Restored:         916
  Rate:                   0.9 KB/s
  FD Errors:              0
  FD termination status:  OK
  SD termination status:  OK
  Termination:            Restore OK

If you try to restore files without the SAP Plugin installed, a warning message will be printed for each file, and files will be restored properly.

In some cases you might want to use a custom directory for the communication between the backint process and the Bacula FD Plugin. For example, if multiple instances of SAP are running on the same host using different unix users. Using the ctrlfile parameter on the FileSet Plugin command and in the backint parameter file will allow you to specify a custom location where unix rights are properly set and will not change over time.

Restoring to a Different Tenant

In order to restore SAP HANA DB through backint to a different client and a different database SID or another tenant, please install and configure the File Daemon and the SAP HANA plugin on the target tenant and restore the database from this newly installed File Daemon. You will specify the restoreclient option in backint.conf in order to specify the client name of this restore target tenant.

The configuration file backint.conf on the restore target server would look like this:

# cat /opt/bacula/sap/backint.conf
client=sap-fd
job=SAP-BRTOOLs
bconsole="/opt/bacula/bin/bconsole -n -c /opt/bacula/sap/bconsole.conf"
maximumconcurrentjobs=5
waitjobcompletion=yes
restoreclient=sap-restoretarget-fd

Relocating the Control Files

The control files can be relocated to a non-standard or unique directory, and if this is done, the Bacula SAP plugin must know the location of those files, which is done by specifying the ctrlfile parameter on the plugin line as follows:

# cat SAPFileSet.cfg
FileSet {
  Name = SAPFileSet
  Include {
    Options { Signature = MD5 }
    Plugin = "sap: ctrlfile=/usr/sap/<SAPSID>/bacula/base"
  }

# cat backint.conf
ctrlfile=/usr/sap/<SAPSID>/bacula/base
...

In this example, the backint process and the Bacula SAP Plugin will create a set of communication links using the ctrlfile as base name. For example:

-rw------- 1 <SAPID> sdba  0 Jul  2 12:29 /usr/sap/<SAPID>/bacula/base.50
-rw------- 1 <SAPID> sdba  0 Jul  2 12:29 /usr/sap/<SAPID>/bacula/base.50.1
-rw------- 1 <SAPID> sdba  0 Jul  2 12:29 /usr/sap/<SAPID>/bacula/base.50.0

The unix owner of the SAP database (in this example <SAPID>) must have a read / write access to the specified directory.

Using Restricted Consoles

If you want more granular control on the permissions that the SAP administrator will have when interfacing with Bacula, you might want to use a restricted console. To do so, you may use the following Console definition:

Client {
  Name = sap-fd
  Maximum Concurrent Jobs = 10
  ...
}
Console {
  Name = sap-fd
  Password = "pass"

  CommandACL = .bvfs_lsfiles, .bvfs_get_volumes, use, .bvfs_get_jobids, wait
  CommandACL = .bvfs_restore, .bvfs_cleanup, restore, run, gui, .jobs, quit
  CommandACL = .bvfs_version, .bvfs_delete_fileid, list

  # These commands are used only by the install-sap.sh test
  # procedure and can be commented out after the installation
  CommandACL = show, status

  ClientACL  = sap-fd

  JobACL     = SAP-Backup, RestoreJob

  DirectoryAcl = *all*          # Available with 8.8
  UserIdAcl  = *all*            # Available with 8.8

  CatalogACL = *all*
  StorageACL = *all*
  FileSetACL = *all*
  PoolACL    = *all*
  WhereACL   = *all*
}

If you are upgrading from a previous version of the SAP plugin, you must check the CommandACL definition with what is defined above.

SAP HANA Cluster Installation Procedure

Before starting this procedure, you must collect the following information for each member of the cluster:

  • Director IP address or DNS name (ex: 192.168.0.1, director.lan)

  • Client IP address or DNS name (ex: 192.168.0.10, sap1.lan)

  • Bacula Client name for each member of the cluster (ex: sap1-fd, sap1.lan)

Package Installation

The following packages are required on each member of the cluster:

  • bacula-enterprise-libs

  • bacula-enterprise-client

  • bacula-enterprise-sap-hana-plugin

Packages may be installed via yum, zypper or rpm, depending on your Linux distribution.

By default, the directory /opt/bacula/sap should be accessible to the SAP programs that will communicate with Bacula via the hdbbackint. Usually, the unix account has the form <SID>adm. ex: if the instance name is HXE, the unix acount will be hxeadm.

hxehost:/tmp # id hxeadm
uid=1001(hxeadm) gid=79(sapsys) groups=79(sapsys),1000(hxeshm)

hxehost:/tmp # chown hxeadm:sapsys /opt/bacula/sap

Cluster Member Setup

The script /opt/bacula/scripts/intall-sap.sh helps to configure each member of the cluster and generates Bacula Director templates.

Program Installation

Specifying the install option of the install-sap.sh script will copy binaries inside the SAP file structure.

hxehost:/tmp # /opt/bacula/scripts/install-sap.sh install

Enter the unix SAP account name:
hxeadm

Enter the SAP instance name [HXE]:


Enter the SAP binary location [/usr/sap/HXE/SYS/global/hdb/opt]:

INFO: Link from /opt/bacula/bin/backint to /usr/sap/HXE/SYS/global/hdb/opt/hdbbackint OK

Backint and Bacula Configuration

Specifying the configure option of the install-sap.sh script will configure the backint/hdbbackint parameter file, configure the Bacula Client configuration file and will generate a template for the Bacula Director.

hxehost:/tmp # /opt/bacula/scripts/install-sap.sh configure

Enter the unix sap account name [sap]:
hxeadm

Enter the Bacula Director Name [hxehost-dir]:
bacula-dir
INFO: Changing Director name from hxehost-dir to bacula-dir in bacula-fd.conf

Do you want to restart the bacula-fd service now? [y/N]:
y

Enter the Bacula Director Address [bacula-dir]:
192.168.0.46
Enter the Bacula Director Port [9101]:

Enter the Bacula FileDaemon name [hxehost-fd]:

Enter the Backup Job name [job.hxehost-fd.sap]:

Enter the FileSet name [fs.hxehost-fd.sap]:


INFO: Creating configuration template for the Director
      /opt/bacula/sap/bacula-dir.conf.sample will help you to setup
      a Job with the Bacula Enterprise SAP Backint Plugin.

      The template can be included in your Director configuration and
      you need to review all items marked as "might need to be adjusted"

After this step, the Bacula Client configuration file should be properly configured to accept jobs from the Director. For example, if the Director is named “bacula-dir”:

hxehost:/tmp # cat /opt/bacula/etc/bacula-fd.conf
[...]
#
# List Directors who are permitted to contact this File daemon
#
Director {
  Name = bacula-dir
  Password = "zLyGZXcJLcKNKt7jvKCmHlUi08mhg/96prCBh0kavvyI"
}
[...]

The access to the Director via bconsole, a restricted console should be properly configured on the Client:

hxehost:/tmp # cat /opt/bacula/sap/bconsole.conf

# Bacula User Agent (or Console) Configuration File
#

Director {
  Name = "bacula-dir"
  DirPort = 9101
  Address = 192.168.0.46
  Password = "NotUsed"
}

Console {
  Name = "hxehost-fd"
  Password = "rTW383vwxUmsN8oQCOemwY7j4Yg5UQ/CExFUR5+fuxkH"
}

This restricted console can be shared between all members of the cluster.

The /opt/bacula/sap/backint.conf parameter file for hdbbackint should be configured with the following options:

hxehost:/tmp # cat /opt/bacula/sap/backint.conf

# Bacula SAP Backint configuration file
# This file can be linked to $ORACLE_HOME/dbs/init<ORACLE_SID>.utl
# or /usr/sap/<SID>/SYS/global/hdb/opt/hdbconfig/

job="job.hxehost-fd.sap"
bconsole="/opt/bacula/bin/bconsole -n -c /opt/bacula/sap/bconsole.conf"
client="hxehost-fd"
waitjobcompletion=yes

# In cluster mode, all members of the cluster should be defined in
# the clientcluster variable separated with a comma
# clientcluster=hxehost-fd

You must edit the /opt/bacula/sap/backint.conf file to specify the Bacula Client name of the other cluster members via the clientcluster option:

clientcluster=hxehost-fd,sles12-fd

If one member of the cluster is not in the list, files that were backed up on this host will not be available to the cluster.

Director Configuration

The install-sap.sh configure script has created a Bacula Director template file with the following resources:

  • Client

  • Restricted Console

  • Job

  • FileSet

hxehost:/tmp # more /opt/bacula/sap/bacula-dir.conf.sample
#
# This template should help you to setup the SAP Backint
# plugin for hxehost-fd
#

Client {
  Name = "hxehost-fd"
  Description = "SAP Client"
  Address = "hxehost-fd"      # might need to be adjusted
  Password = "zLyGZXcJLcKNKt7jvKCmHlUi08mhg/96prCBh0kavvyI"

  Maximum Concurrent Jobs = 10

  File Retention = 5 years
  Job Retention  = 5 years
  Catalog = MyCatalog             # might need to be adjusted
}

Console {
  Name = "hxehost-fd"
  Description = "Console for SAP plugin"
  Password = "rTW383vwxUmsN8oQCOemwY7j4Yg5UQ/CExFUR5+fuxkH"

  CommandACL = .bvfs_lsfiles, .bvfs_get_volumes, use, .bvfs_get_jobids, wait
  CommandACL = .bvfs_restore, .bvfs_cleanup, restore, run, gui, .jobs, quit
  CommandACL = .bvfs_version, list, .bvfs_delete_fileid

  CommandACL = status, show         # Can be removed after the installation

  ClientACL  = "hxehost-fd"
# ClientACL  = sap1-fd, sap2-fd     # Contain all members of the cluster

  FileSetACL = "fs.hxehost-fd.sap"

# FileSetACL = "Full Set"           # Should contain the RestoreFiles fileset

  JobACL     = "job.hxehost-fd.sap"
  JobACL     = RestoreFiles         # might need to be adjusted

  DirectoryAcl = *all*
  UserIdAcl  = *all*
  CatalogACL = *all*
  StorageACL = *all*
  PoolACL    = *all*
  WhereACL   = *all*
}

FileSet {
  Name = "fs.hxehost-fd.sap"
  Description = "SAP Backint FileSet"
  Include {
     Options {
        Signature = MD5
     }
     Plugin = "sap"               # might use ctrlfile=
  }
}

Job {
  Name = "job.hxehost-fd.sap"
  Description = "SAP Backint Job"
  Type = Backup
  JobDefs = "DefaultJob"          # might need to be adjusted

  Client = "hxehost-fd"
  FileSet = "fs.hxehost-fd.sap"

# Should be defined in DefaultJob
# Pool = Default                  # might need to be adjusted
# Storage = File
# Messages = Standard

  Maximum Concurrent Jobs = 10
  Level = Incremental
}

The Bacula Director configuration template above must be adapted to your current Bacula setup. The following items must be reviewed to fit your setup:

  • Client / Address

  • Console / FileSetACL

  • Console / ClientACL

  • Job / JobDefs

  • Job / Pool

  • Job / Storage

  • Job / Messages

The restricted Console can be used for all members of the cluster if the file /opt/bacula/sap/bconsole.conf is identical on all your systems.

The Bacula Director configuration must be copied into the bacula-dir.conf file, and the Director configuration must be reloaded.

Testing

As described in section Testing backint.conf/init<SID>.utl Configuration. The install-sap.sh test program must be executed on each cluster node.

Limitations

The Bacula Enterprise SAP Backint plugin version 6.4.6 and newer has the following limitations:

  • no support for volume and volume_online for Backint option -t

  • no support for mount and dismount for Backint option -f

  • No support for database suspend and resume for Disk split

  • No support for copying of snapshot or clone files

  • To support RMAN incremental/differential levels, it is required to install the Bacula Enteprise Oracle SBT plugin.

  • Empty jobs are not purged automatically after a backint delete command. The backint command “pruned” can list the jobs that can be deleted from the catalog.

  • The estimate command is not supported by the SAP Backint Plugin.

  • The restart command has limitations with plugins, as it initiates the Job from scratch rather than continuing it. Bacula determines whether a Job is restarted or continued, but using the restart command will result in a new Job.

Problem Resolution

#NOTFOUND Error with HANA Cluster

If you have spurious #NOTFOUND errors, you must double check the ClientCluster backint configuration and the ClientACL list in the restricted Console. If one member of the cluster is missing, then the files backed up by the system will not be accessible to other member of the cluster.

Appendix

SAP Variable Limits

When configuring and operating Bacula Enterprise with SAP, some restrictions imposed by the SAP product need to be honored. The most relevant ones are collected in table below:

SAP Variable Definition and Limitations

Entry

Description

Max Length Oracle/HANA

file

File, directory, raw device

255/512

dest dir

Directory used for restore

255/512

backupid

Backup ID, not containing any white spaces

16/32

userid

User ID

16/32