backup sap hana database

How to Backup SAP HANA Database

SAP HANA is a popular in-memory database that can be deployed on-premise as well as in the cloud. Since it is an in-memory database, it is fast and useful for real-time applications and data analytics. In this article, we will learn how to backup SAP HANA database. This is common requirement for system administrators while working with SAP HANA.


How to Backup SAP HANA Database

Here are the steps to backup SAP HANA database.


1. Log into SAP HANA database

Connect to SAP HANA database server using Linux or Windows client.


2. Switch to SAP HANA admin user

Only the admin user can backup SAP HANA database. So switch to SAP HANA admin user with the following command.

# su - hdbadm


3. Start HDB SQL Prompt

Run the following command to start HDB SQL Prompt.

$ hanadb1:/usr/sap/HDB/HDB00> hdbsql


4. Connect to SAP HANA database instance

Connect to SAP HANA database instance with the following command. Replace <server name>, <instance number> and <password> with the server name, instance number and password of SYSTEM account.

hdbsql=> connect -n <server name>  -i <instance number>  -u <user>  -p <password>

Here is an example.

hdbsql=> connect -n hanadb1 -i 00 -u SYSTEM -p PASSWORDHERE //
Connected to HDB@hanadb1:30015


5. Backup SAP HANA database

Run the following command to backup SAP HANA database. Replace /backup/HDB/data/BACKUP_FULL_2021/SAPHANA with the file path of backup file.

hdbsql HDB=> BACKUP DATA USING FILE ('/backup/HDB/data/BACKUP_FULL_2021/SAPHANA')

On successful command execution you will see the following output.

Output: 0 rows affected (overall time 572.508445 sec; server time 652.505431 sec)

In this article, we have learnt how to backup SAP HANA database.

Also read:

How to Add Multiple Hosts in PHPMyAdmin
Git Compare Difference Between Branches
How to Uninstall Ubuntu from Dual Boot
How to Install PHP Composer in Ubuntu
How to List Devices Connected to Network in Linux

Leave a Reply

Your email address will not be published.