How to Backup SAP HANA Database using Command Line

How to Backup SAP HANA Database using Command Line

Updated on January 7, 2014 by Rahul K.

Databases

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.

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

转载于:https://my.oschina.net/rootliu/blog/2218517

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值