Steps to backup SAP HANA database using command line.
SQL command line backup are recommended in batch mode only
Login to SAP HANA Server First we need to connect to SAP HANA server using Linux clients (eg: putty) with root user. Switch to SAPHANA Admin User Now we need to switch to SAP HANA admin user using following command. # su - hdbadm Start HDB SQL Prompt Use following command to open HDB sql prompt . $ hanadb1:/usr/sap/HDB/HDB00> hdbsql 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 SYSTEMaccount. 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 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.