Prepare SAP HANA databases for Backup and DR Service

Before you can back up HANA database instances and data, you must add the database server as a host to Backup and DR Service. Before you begin, be sure to follow these preparation steps.

Prerequisites

Before you begin, it's a good idea to review Backup and DR for SAP HANA.

  • All the configured services—see SAP Note 1697613 and SAP Note 1649519— such as nameserver and indexserver. must be running. You can check this in the Overview of SAP HANA studio > Operational State > Confirm all services are started.

  • To allow the Backup and DR agent to perform host-side operations, use a SAP HANA hdbuserstore key instead of a username and password to communicate with HANA database using the SAP HANA secure userstore. See Configure the HANA userstore key.

  • Database log_mode must be set to normal under the HANA Studio configuration tab. See Set up the log mode and log backup in HANA Studio.

  • All SAP HANA servers that have data to be protected by Backup and DR Service must have the Backup and DR agent installed.

  • If the underlying data volumes for SAP HANA are protected as SAP HANA DB backups using LVM snapshot with CBT or file-based backup integrated with backint, and if you are also protecting file systems on the same host, in the file system app, you should set /hana/log & /hana/data in an exclude path. See Linux file system.

Configure the HANA userstore key

Use the following instructions to configure the HANA userstore key:

  1. Create the database backup user from HANA Studio.

  2. Get the instance and SQL port numbers.

  3. Create the SAP HANA hdbuserstore key for system DB backup users.

Step 1: Create the database backup user from HANA Studio

Choose a database username based on the company's standard. Make sure to create this user account under SYSTEMDB.

  1. Create the user under SYSTEMDB

    • From SAP HANA Studio SYSTEMDB, go to System > Security > Users > New User.

    • Assign a username and a password.

    • Set Force password change on next logon to No.

    • Click the System privilege tab and assign privileges by selecting the following:

    HANA 1.0

    • Backup admin
    • Catalog read
    • Database admin

    HANA 2.0 (SPS01-SPS04)

    • Backup admin
    • Catalog read
    • Database admin
    • Database start
    • Database stop

    HANA 2.0 (SPS05)

    • Backup admin
    • Catalog read
    • Database backup operator
    • Database recovery operator
    • Database admin
    • Database start
    • Database stop
  2. Deploy the newly created system user by clicking the green arrow.

Step 2: Get the instance and SQL port numbers

You need the HANA instance and SQL Port numbers for both system DBs.

HANA 1.0

The following instructions describe how to get the instance and SQL port numbers from a HANA 1.0 single container system:

  1. Go to System.

  2. Click the Landscape tab.

  3. Get the value of SQL port for indexserver.

HANA 2.0

The following instructions describe how to get the instance and SQL port numbers from HANA 2.0:

  1. Go to System.

  2. Click the Landscape tab.

  3. Click the Services tab.

  4. Under the Service column, navigate to the nameserver.

  5. Get the value of SQL port. The instance number are the second and third digits of the SQL port number.

Step 3: Create the SAP HANA hdbuserstore key for system DB backup users

Backup and DR Service recommends this naming convention for the userstore key name: For SYSTEMDB, set the key name (Database backup username) For example: Database backup username (Actbackup) Set SYSTEMDB—key_name— (ACTBACKUP)

Procedure for single node HANA system

  1. Connect to the HANA database system using SSH and login to (sid)adm: su - (sid)adm

  2. Change directory: cd exe

  3. Create entries in hdbuserstore using command hdbuserstore:

    ./hdbuserstore SET (key_name) (SAP HANA database hostname):(port) (DB_user_name) (DB_user_password)
    

    In this example:

    ./hdbuserstore SET ACTBACKUP s4hana:30013 ACTBACKUP (DB_user_password)
    
  4. Check the keystore: ./hdbuserstore list

Set up the log mode and log backup in HANA Studio

Using the HANA Studio set the HANA log mode and log backup location for Backup and DR to take backups of HANA DB transaction logs:

  1. In SAP HANA HDB studio, make sure log backup is set correctly under DATABASE (SYSTEMDB FOR HANA 2.0) > Backup > Configuration page:

    • Destination type is File.

    • Destination is set to a local file system mount path.

    • Backup interval is set to required RPO.

    • Automatic log backup is enabled.

  2. Check under Database configuration: DATABASE (SYSTEMDB FOR HANA 2.0) > Configuration page. In the filter, type basepath.

  3. Verify that basepath_logbackup is set correctly:

    • Set the basepath_catalogbackup to the same as basepath_logbackup.

    • Open the basepath_catalogbackup edit page.

    • Set the New value to the same as basepath_logbackup and click Save. This ensures the backup of the catalog with log backup for point in time recovery.

Install the Backup and DR agent (connector) on SAP HANA Servers

The Backup and DR agent, a small-footprint, lightweight service on the SAP HANA server, is used to capture an application-consistent copy of SAP HANA databases. It uses changed block tracking to identify changes to database data for Backup and DR's incremental forever capture strategy. All SAP HANA servers that have data to be protected by Backup and DR must have the Backup and DR agent installed.

  1. Download the agent installer file as detailed in Obtain the right Backup and DR agent for your host

  2. Log on to the Linux server as root.

  3. Install the agent as detailed in Install the Backup and DR agent on a Linux host

What's next

Add an SAP HANA database host, and discover and protect its databases

The Backup and DR Service SAP HANA DBA guide

This page is one in a series of pages specific to protecting and recovering SAP HANA databases with Backup and DR Service. You can find additional information in the following pages: