Home > Backup and Recovery Blog > How to backup SAP HANA natively? SAP HANA backup with Bacula Enterprise
1 Star2 Stars3 Stars4 Stars5 Stars
(17 votes, average: 5.00 out of 5)

How to backup SAP HANA natively? SAP HANA backup with Bacula Enterprise

  • May 7, 2020 (Last Updated: October 10, 2021), Rob Morrison

Introduction to SAP HANA and BACKINT interface

SAP HANA is a complete relational database and suite of accompanying management tools to store, recover, manipulate, and analyze data. Like any good RDBMS it provides advanced tools for analytics and analysis, and also functions to allow data to be backed up into a standardized format and recovered easily and accurately into a new database when necessary.

This article details the process of SAP HANA backup and recovery with the help of Bacula Enterprise’s multifunctional SAP HANA backup plugin leveraging the ‘backint’ interface. But first we’ll look at how SAP HANA backup and recovery process can be done using nothing but its own, built-in backup and recovery tools.

Native SAP HANA backup and recovery process

First of all, it’s important to mention that a person performing a SAP HANA backup would have to have either a “backup operator” or “backup admin” role assigned to their HANA database user account.

Knowing that your account has sufficient privileges, the first thing you’ll have to do is  of course, to open up HANA studio and connect to the system that you want to make a backup of.

To start up the backup process you’ll have to right-click the system in question and choose the “Back Up System…” option.

back up system option

By default the backup wizard launches with standard parameters for both “Backup destination” and “Backup prefix” fields. You can change the default backup destination path by modifying the “basepath_databackup” line in the global.ini file. The default value of this line is $(DIR_INSTANCE)/backup/data.

Of course, you can modify this specific operation’s backup destination, as well as the backup prefix, in the same first window of backup wizard that we’ve just opened.

backup settings

You can also see that the backup estimate can be seen from the first step of the backup process, close to the header of the wizard window. Clicking “Next” within this same window would lead you to the finalization screen that shows all of your future backup settings.

Clicking “Finish” in that window would start up the backup process. The entire process is also displayed in the separate wizard window, as follows:

backup progress window

As soon as the backup process shows a complete 100% everywhere, the process is complete and the backup files are created. It’s also possible to double-check the creation of the backup files via the command line.

Another way of performing backups with only the most basic SAP HANA capabilities is via the SQL command and through the SQL console. The command itself is as follows:


The ***** part represents the target backup destination and should be entered with single brackets on both sides, for example – (‘/usr/backup/data’).

Recovery part of your SAP HANA backup and recovery process is relatively simple, as well. You’re starting up in the same way as the backup process, but looking for the “Recover System…” option instead.

The first choice that you’ll have in this process is the recovery type. SAP HANA backup and recovery built-in software supports three main recovery types:

  • Most recent state. For this recovery option to work properly you’ll have to have an entire last backup and logs available to be able to restore it.
  • Specific point in time. This option attempts to restore the backup that’s closest to the point in time that you’re choosing.
  • Specific data backup. Gives you a list of currently stored backups, and you can restore any one of the ones that you have.

Choose whichever you want and click “Next” in this window.

SAP HANA recovery type

In some cases you’ll have to confirm the location of the backup catalog, as well. As soon as you’re ready, click “Next”. You’ll receive a notification warning you about the need to stop the database in question to perform a restoration process.

database recovery warning

Clicking “Ok” on this notification would stop the database in question and take you to the next screen. Next you’ll have to confirm both the last backup that’ll be restored and the location of the log backups. The last two screens that you’ll see before the restoration process begins are the “Other settings” window and the “Review Recovery Settings” window. Choosing “Finish” at the end of the “Review Recovery Settings” window would start up the recovery process.

recovery process window

The recovery process itself is split in three phases: data recovery, log recovery and database restart. After all three of the phases are done, you’ll be given the “Recovery Execution Summary” window about either success or a failure of the recovery process. Clicking “Close” on this window finishes up the recovery process for your SAP HANA database.

After seeing how it works with the built-in tools, now we’ll go over Bacula Enterprise’s way of doing it.

Manually creating SAP HANA backup jobs

Although normally the process of both backing up and recovering your SAP HANA database is automated using Bacula Enterprise or your specific SAP HANA infrastructure, we’ll go through the process of doing so manually using Bacula Enterprise’s SAP HANA plugin and the Bacula bconsole command line. The manual backup and restore procedure is chosen here to show all of the steps of this specific process.

SAP HANA backup configuration

To begin, SAP HANA backup plugin must be configured so that the Bacula Enterprise server and the SAP HANA backint process can authenticate and share data. This potentially complex process can be automated by running the included configuration script, which will prompt the user for the necessary SAP HANA information and store it for future backup jobs. Once this configuration script has successfully executed, backup jobs can be scheduled for regular operation or can be run manually.

SAP HANA plugin configuration

Manual SAP HANA backup initiation

Next, let’s go through the process of initiating a backup job manually. The first step is to log in to a SAP HANA interactive console. The backint command is configured to send data directly to the Bacula Enterprise server. When running manually, you can also specify a job name and timestamp.

a specific command to manually begin your backup job

the backint command with a job name specified in the brackets (Thu_22:00)

After running that command you should be able to see your brand new backup jobs, created by the backint command.

BWeb interface with the new jobs on the list

Backup administration using SAP HANA studio

There’s also a graphical way of managing backups that you’ve created, and it’s done with the help of a SAP HANA admin console, also called “SAP HANA studio”. This graphical interface allows you to initiate backups and also makes it easy to schedule runs of backint to initiate Bacula SAP HANA plugin backups. This leaves control of backup scheduling with the DBA, which is often preferable.

SAP HANA studio interface

Regardless of how the job is initiated, you have a very detailed log of every job available via BWeb by clicking on the status icon in the same line as your backup job is (if the job is done correctly, it should be a white checkmark with a green background). For example, here is the backup job that was created in the previous steps, the first line is showing that there is a connection between the SAP HANA database and the server, and the rest of it is a detailed steps of the whole process, including the total size of your backup, how many files are in it, what’s the compression rate and so on. And the very last line should, of course, be the confirmation that everything went right – an OK status.

backup job log in the BWeb

Manually creating SAP HANA recovery jobs

Now let’s move on to the SAP HANA recovery process. There are many ways to recover a database, including restoring a backup from previously mentioned SAP HANA studio or directly restoring a backup through the same backint command, but for the sake of simplicity in this example we’ve used the Bacula Enterprise user-friendly recovery script. All you need to do is specify a restoration point-in-time and the recovery script handles the rest.

Bacula Enterprise recovery script in command line

After executing the script , recoverSys leads the process to check the database in question, to stop it if it’s running, connect to the Bacula Enterprise servers and to restore the data you need. Once the restore finishes you’ll see the console outputs showing that the process was a success.

successful restoration of data using Bacula Enterprise’s restore script

You can also check BWeb to see your restore job logs and see in detail how the process went and that it was a success (confirming what was shown via the command line restore script).

restore job log


As you can see, Bacula Enterprise’s SAP HANA backup and recovery plugin is capable of both backing up and recovering your critical data within SAP HANA databases and provides a number of options to script and automate the process or to leave it in the hands of the SAP HANA DBA. The Bacula Enterprise SAP HANA plugin is SAP certified to protect your data.

About the author

Rob Morrison Rob on LinkedIn

Rob Morrison is the marketing director at Bacula Systems. He started his IT marketing career with Silicon Graphics in Switzerland, performing strongly in various marketing management roles for almost 10 years. In the next 10 years Rob also held various marketing management positions in JBoss, Red Hat and Pentaho ensuring market share growth for these well-known companies. He is a graduate of Plymouth University and holds an Honours Digital Media and Communications degree, and completed an Overseas Studies Program.

  1. Nevaeh

    Creating SAP HANA backups turned out to be easier than I thought it was. Thank you for this article, it was an interesting reading material.

  2. Eileen

    The versatility of Bacula’s BWeb interface never ceases to amaze me. And the fact that it also works with SAP HANA backup and recovery jobs is even more surprising.

  3. Frederic

    Automatization for some of the steps of creating a SAP HANA backup seems like a good way to save both time and money. This was highly interesting.

  4. Thomas

    How does Bacula support the procedure for database and log backup cleanup?
    Can I define a retention period for database full backup, database incremental/differential backup and log backup individually?

    1. bs_admin

      Hello Thomas,

      The retention of catalog backup, Full and Incremental/Differential backup are all set and handle through the SAP HANA mechanism, which then impact the Bacula retention accordingly. Bacula Enterprise Edition SAP HANA plugin is fully integrated with backint. It means the end user should follow carefully SAP HANA documentation on this topic and our best practice written in the Bacula plugin SAP HANA documentation.

Leave a comment

Your email address will not be published. Required fields are marked *