SAP HANA is an in-memory data platform that is deployable as an on-premise appliance, or in the cloud. It is a revolutionary platform that’s best suited for performing real-time analytics, and developing and deploying real-time applications. Click here to know more about SAP HANA.

Advertisement

Use following steps to backup SAP HANA database using command line. Use sql command line backup are recommended in batch mode only

Step 1. Login to SAP HANA Server

First we need to connect to SAP HANA server using Linux clients (eg: putty) with root user.

Step 2. Switch to SAPHANA Admin User

Now we need to switch to SAP HANA admin user using following command.

# su - hdbadm

Step 3. Start HDB SQL Prompt

Use following command to open HDB sql prompt .

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

Step 4. Connect to Database instance

Now connect to SAP HANA database instance using following command. For below command you required sap hana server name and database instanace number and password for SYSTEM account.

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

[Use Command Like Below]

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

Step 5. Execute Following Command to Backup

After successfully connecting to SAP HANA database instance, start backup using below command.

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

On successful backup you will get results like below.

Output: 0 rows affected (overall time 672.508245 sec; server time 672.505331 sec)

All backup files will be created in /backup/HDB/data/BACKUP_FULL_2014/ directory.

Reference: http://help.sap.com/hana/SAP_HANA_Administration_Guide_en.pdf

Share.

3 Comments

  1. Thanks Rahul…
    I am facing one problem while taking backup of HANA system from HANA Studio I am getting error “Could not back up system NDB”. Please suggest if you have any solution for this.

Leave A Reply

Exit mobile version