Prepare SAP HANA databases for Backup and DR Service
Stay organized with collections
Save and categorize content based on your preferences.
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.
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 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.
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
and basepath_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.
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 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.
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.
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:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[[["\u003cp\u003eBefore backing up SAP HANA scale-out database instances, the database server must be added as a host to Backup and DR Service, and the relevant services like \u003ccode\u003enameserver\u003c/code\u003e and \u003ccode\u003eindexserver\u003c/code\u003e must be running.\u003c/p\u003e\n"],["\u003cp\u003eThe Backup and DR agent requires an SAP HANA \u003ccode\u003ehdbuserstore\u003c/code\u003e key for host-side operations instead of a username and password, and the database \u003ccode\u003elog_mode\u003c/code\u003e must be set to \u003cstrong\u003enormal\u003c/strong\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAll SAP HANA servers with data to be protected must be onboarded to Backup and DR Service and have the Backup and DR agent installed.\u003c/p\u003e\n"],["\u003cp\u003eFor SAP HANA Archive log backups, the \u003ccode\u003ebasepath_logbackup\u003c/code\u003e and \u003ccode\u003ebasepath_catalogbackup\u003c/code\u003e paths in global.ini should be set correctly, and only HANA Archive log backups should be stored in this path.\u003c/p\u003e\n"],["\u003cp\u003eTo ensure proper backup functionality, a database backup user needs to be created in HANA Studio, the instance and SQL port numbers must be retrieved, and an SAP HANA \u003ccode\u003ehdbuserstore\u003c/code\u003e key needs to be created for system database backup users.\u003c/p\u003e\n"]]],[],null,["# Prepare SAP HANA databases for Backup and DR Service\n\nBefore you back up HANA database instances and data, you must add the database\nserver as a host to Backup and DR Service. Before you begin, be sure to follow these\npreparation steps.\n| **Note:** This information is for SAP HANA scale-out instances. For Scale-Up and HA 1+1 configurations, see [Backup and DR Service for SAP HANA](/backup-disaster-recovery/docs/concepts/backupdr-for-sap-hana).\n\nPrerequisites\n-------------\n\nBefore you begin, it's a good idea to review [Backup and DR for SAP HANA scale-out](/backup-disaster-recovery/docs/concepts/backupdr-for-sap-hana-scaleout).\n\n- All the configured services---see SAP Note 1697613 and SAP Note 1649519---\n such as `nameserver` and `indexserver`. must be running. You can check\n this in the Overview of SAP HANA studio \\\u003e Operational State \\\u003e\n Confirm all services are started.\n\n- To allow the Backup and DR agent to perform host-side operations, use an SAP\n HANA `hdbuserstore` key instead of a username and password to communicate with\n HANA database using the SAP HANA secure userstore. See [Configure the HANA userstore key](/backup-disaster-recovery/docs/configuration/prepare-hana#configuring_the_hana_userstore_key).\n\n- Database `log_mode` must be set to **normal** under the HANA Studio\n configuration tab. See [Set up the log mode and log backup in HANA Studio](#set-up-hana-log-mode).\n\n- All SAP HANA servers that have HANA data to be protected by Backup and DR Service\n must have been onboarded to Backup and DR Service.\n\n- All SAP HANA servers that have data to be protected by Backup and DR Service must\n [have the Backup and DR agent installed](#install-agent).\n\n- If the underlying data volumes for SAP HANA are protected as SAP HANA database\n backups using LVM snapshot with CBT or file-based backup integrated with\n `backint`, and if you are also protecting file systems on the same host, in\n the file system app, you should set `/hana/log` \\& `/hana/data` in an exclude\n path. See [Linux file system](/backup-disaster-recovery/docs/configuration/add-linux-hosts).\n\n- HANA Archive log backup recommendation:\n\n - Make sure to set the HANA Archive log backup path as the `basepath_logbackup` and `basepath_catalogbackup` in global.ini.\n - Don't use HANA Archive log mount to store files other than HANA Archive log backup.\n - By default, archive purge runs with every database backup. To achieve best recovery RTO, keep the default setting.\n\n| **Note:** If production log retention is set, then purge runs based on the **Retention of production db logs in hour** setting under Application Details \\& Settings. Size the HANA archive log backup disk to store archives based on the production log retention setting.\n\nConfigure the HANA userstore key\n--------------------------------\n\n| **Note:** This procedure requires the hostname.\n\nUse the following instructions to configure the HANA userstore key:\n\n1. Create the database backup user from HANA Studio.\n\n2. Get the instance and SQL port numbers.\n\n3. Create the SAP HANA `hdbuserstore` key for system DB backup users.\n\n### Step 1: Create the database backup user from HANA Studio\n\nChoose a database username based on the company's standard. Make sure to create\nthis user account under `SYSTEMDB`.\n\n1. Create the user under `SYSTEMDB`\n\n - From SAP HANA Studio SYSTEMDB, go to **System** \\\u003e **Security**\n \\\u003e **Users** \\\u003e **New User**.\n\n - Assign a username and a password.\n\n - Set **Force password change on next logon** to **No**.\n\n - Click the **System privilege tab** and assign privileges by\n selecting the following:\n\n ### HANA 1.0\n\n - **Backup admin**\n - **Catalog read**\n - **Database admin**\n\n ### HANA 2.0 (SPS01-SPS04)\n\n - **Backup admin**\n - **Catalog read**\n - **Database admin**\n - **Database start**\n - **Database stop**\n\n ### HANA 2.0 (SPS05)\n\n - **Backup admin**\n - **Catalog read**\n - **Database backup operator**\n - **Database recovery operator**\n - **Database admin**\n - **Database start**\n - **Database stop**\n2. Deploy the newly created system user by clicking the **green arrow**.\n\n### Step 2: Get the instance and SQL port numbers\n\nYou need the HANA instance and SQL port numbers for system databases. \n\n### HANA 1.0\n\nThe following instructions describe how to get the instance and SQL port\nnumbers from a HANA 1.0 single container system:\n\n1. Go to **System**.\n\n2. Click the **Landscape** tab.\n\n3. Get the value of SQL port for `indexserver`.\n\n### HANA 2.0\n\nThe following instructions describe how to get the instance and SQL port\nnumbers from HANA 2.0:\n\n1. Go to **System**.\n\n2. Click the **Landscape** tab.\n\n3. Click the **Services** tab.\n\n4. Under the **Service** column, navigate to the `nameserver`.\n\n5. Get the value of SQL port. The instance number are the second and\n third digits of the SQL port number.\n\n### Step 3: Create the SAP HANA hdbuserstore key for system database backup users\n\nBackup and DR Service recommends this naming convention for the userstore key name:\nFor SYSTEMDB, set the key name to `Database backup username`.\nFor example: Database backup username (`Actbackup`)\nSet SYSTEMDB---key_name--- (`ACTBACKUP`)\n\n**Procedure for single node HANA system**\n\n1. Connect to the HANA database system using SSH and login to (sid)adm: `su - (sid)adm`\n\n2. Change directory: `cd exe`\n\n3. Create entries in hdbuserstore using command `hdbuserstore`:\n\n ./hdbuserstore SET (key_name) (SAP HANA database hostname):(port) (DB_user_name) (DB_user_password)\n\n In this example: \n\n ./hdbuserstore SET ACTBACKUP s4hana:30013 ACTBACKUP (DB_user_password)\n\n4. Check the keystore: `./hdbuserstore list`\n\n| **Note:** If the hostname is not included, you will get the error: `ERRORMSG: USERSTORE KEY - Does not have valid hostname configured!`\n\nSet up the log mode and log backup in HANA Studio\n-------------------------------------------------\n\nUse the HANA Studio set the HANA log mode and log backup location for\nBackup and DR to take backups of HANA DB transaction logs:\n\n1. In SAP HANA HDB studio, make sure log backup is set correctly under\n **DATABASE (SYSTEMDB FOR HANA 2.0)** \\\u003e **Backup** \\\u003e\n **Configuration** page:\n\n - Destination type is **File**.\n\n - Destination is set to a local file system mount path.\n\n - Backup interval is set to **required RPO**.\n\n - Automatic log backup is enabled.\n\n - Database log_mode must be set to **normal**.\n\n2. Check under Database configuration: DATABASE (SYSTEMDB FOR HANA 2.0) \\\u003e\n Configuration page. In the filter, type **basepath**.\n\n3. Verify that `basepath_logbackup` is set correctly:\n\n - Set the `basepath_catalogbackup` to the same as `basepath_logbackup`.\n\n - Open the `basepath_catalogbackup` edit page.\n\n - Set the **New value** to the same as `basepath_logbackup` and click **Save**.\n This ensures the backup of the catalog with log backup for point in\n time recovery.\n\n4. Run the re-config for the values to take effect.\n\nInstall the Backup and DR agent (connector) on SAP HANA Servers\n---------------------------------------------------------------\n\nThe Backup and DR agent, a small-footprint, lightweight service on the SAP HANA\nserver, is used to capture an application-consistent copy of SAP HANA\ndatabases. It uses changed block tracking to identify changes to database data\nfor Backup and DR's incremental forever capture strategy. All SAP HANA servers\nthat have data to be protected by Backup and DR must have the Backup and DR agent\ninstalled.\n\n1. Download the agent installer file as detailed in [Obtain the right Backup and DR agent for your host](/backup-disaster-recovery/docs/concepts/about-connector#right-connector)\n\n2. Log on to the Linux server as root.\n\n3. Install the agent as detailed in [Install the Backup and DR agent on a Linux host](/backup-disaster-recovery/docs/configuration/linux-agent)\n\nWhat's next\n-----------\n\n[Add an SAP HANA database host, and discover and protect its databases](/backup-disaster-recovery/docs/configuration/discover-sap-hana)\n\nBackup and DR Service documentation for SAP HANA scale-out\n----------------------------------------------------------\n\nThis page is one in a series of pages specific to protecting and recovering\nSAP HANA scale-out instances with Backup and DR Service.\nYou can find additional information in the following pages:\n\n- [Backup and DR for SAP HANA scale-out](/backup-disaster-recovery/docs/concepts/backupdr-for-sap-hana-scaleout)\n- [Prepare SAP HANA scale-out instances for backup](/backup-disaster-recovery/docs/configuration/prepare-sap-hana)\n- [Add an SAP HANA scale-out host, and discover and protect its databases](/backup-disaster-recovery/docs/configuration/discover-sap-hana-scaleout)\n- [Configure staging disk format and backup method for SAP HANA scale-out](/backup-disaster-recovery/docs/backup/backup-method-staging-disk-sap-hana-scaleout)\n- [Set application details and settings for SAP HANA scale-out instances](/backup-disaster-recovery/docs/backup/app-details-settings-sap-hana-scaleout)\n- [Back up HANA 1+n and HANA scale-out databases](/backup-disaster-recovery/docs/backup/back-up-sap-hana-scaleout)\n- [Restore and recover SAP HANA scale-out instances](/backup-disaster-recovery/docs/restore-data/restore-sap-hana-scaleout)\n- [Mount an SAP HANA scale-out backup as a standard mount](/backup-disaster-recovery/docs/access-data/mount-sap-hana)\n- [Mount an SAP HANA scale-out backup as a virtual database](/backup-disaster-recovery/docs/access-data/mount-sap-hana-virtualdb)\n- [Mount and migrate an SAP HANA scale-out backup for instant recovery to any target](/backup-disaster-recovery/docs/access-data/mount-and-migrate-sap-hana)"]]