Before you 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 scale-out.
All the configured services—see SAP Note 1697613 and SAP Note 1649519— such as
nameserver
andindexserver
. 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 an 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 HANA data to be protected by Backup and DR Service must have been onboarded to Backup and DR Service.
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 database 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.HANA Archive log backup recommendation:
- Make sure to set the HANA Archive log backup path as the
basepath_logbackup
andbasepath_catalogbackup
in global.ini. - Don't use HANA Archive log mount to store files other than HANA Archive log backup.
- By default, archive purge runs with every database backup. To achieve best recovery RTO, keep the default setting.
- Make sure to set the HANA Archive log backup path as the
Configure the HANA userstore key
Use the following instructions to configure the HANA userstore key:
Create the database backup user from HANA Studio.
Get the instance and SQL port numbers.
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
.
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
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 system databases.
HANA 1.0
The following instructions describe how to get the instance and SQL port numbers from a HANA 1.0 single container system:
Go to System.
Click the Landscape tab.
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:
Go to System.
Click the Landscape tab.
Click the Services tab.
Under the Service column, navigate to the
nameserver
.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 database backup users
Backup and DR Service recommends this naming convention for the userstore key name:
For SYSTEMDB, set the key name to Database backup username
.
For example: Database backup username (Actbackup
)
Set SYSTEMDB—key_name— (ACTBACKUP
)
Procedure for single node HANA system
Connect to the HANA database system using SSH and login to (sid)adm:
su - (sid)adm
Change directory:
cd exe
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)
Check the keystore:
./hdbuserstore list
Set up the log mode and log backup in HANA Studio
Use the HANA Studio set the HANA log mode and log backup location for Backup and DR to take backups of HANA DB transaction logs:
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.
Database log_mode must be set to normal.
Check under Database configuration: DATABASE (SYSTEMDB FOR HANA 2.0) > Configuration page. In the filter, type basepath.
Verify that
basepath_logbackup
is set correctly:Set the
basepath_catalogbackup
to the same asbasepath_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.
Run the re-config for the values to take effect.
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.
Download the agent installer file as detailed in Obtain the right Backup and DR agent for your host
Log on to the Linux server as root.
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
Backup and DR Service documentation for SAP HANA scale-out
This page is one in a series of pages specific to protecting and recovering SAP HANA scale-out instances with Backup and DR Service. You can find additional information in the following pages:
- Backup and DR for SAP HANA scale-out
- Prepare SAP HANA scale-out instances for backup
- Add an SAP HANA scale-out host, and discover and protect its databases
- Configure staging disk format and backup method for SAP HANA scale-out
- Set application details and settings for SAP HANA scale-out instances
- Back up HANA 1+n and HANA scale-out databases
- Restore and recover SAP HANA scale-out instances
- Mount an SAP HANA scale-out backup as a standard mount
- Mount an SAP HANA scale-out backup as a virtual database
- Mount and migrate an SAP HANA scale-out backup for instant recovery to any target