Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Databases»How to Backup SAP HANA Database using Command Line

    How to Backup SAP HANA Database using Command Line

    By RahulJanuary 7, 20142 Mins Read

    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 [email protected]: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. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Installing MySQL 8.0 on Amazon Linux 2

    How To Install MySQL 8 on Amazon Linux 2

    (Resolved) Unknown collation: utf8mb4_unicode_520_ci

    How To Install phpMyAdmin on Ubuntu 22.04

    How To Install phpMyAdmin on Ubuntu 22.04

    View 3 Comments

    3 Comments

    1. Manish Badbe on February 11, 2015 7:45 am

      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.

      Reply
      • Olives on February 17, 2019 10:52 am

        Dear Manish,

        Please check your backup directory has the correct permissions.
        The folder should belong to the hdb user

        Reply
    2. prem on January 24, 2014 10:03 am

      Thanks a lot Rahul..

      Reply

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • How to Split Large Archives in Linux using the Command Line
    • System.out.println() Method in Java: A Beginner’s Guide
    • Split Command in Linux With Examples (Split Large Files)
    • Test Your Internet Speed from the Linux Terminal
    • 11 Practical Example of cat Command in Linux
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.