lassedesignen - Fotolia

The ABCs of backup and recovery for SAP Business Suite on HANA

This backup and recovery tutorial, excerpted from the book 'Implementing SAP Business Suite on SAP HANA' by Michael Pytel, walks you through backup and recovery scenarios.

As with any ERP migration, preparing to implement SAP Business Suite on HANA requires creating a backup and recovery strategy. In this detailed starter guide, excerpted from the SAP Press book Implementing SAP Business Suite on SAP HANA, author Michael Pytel walks you through backup and recovery. SAP HANA is an in-memory database that also uses persistent storage so you can back up and recover the database with graphical, command-line and third-party backup tools. Both data and log backups are completed online and have little impact on the users. The scenarios here are specific to a scale-up scenario or a single node. Business Suite on HANA isn't yet supported on a scale-out scenario, so backup and recovery options for a multinode environment will not be covered.

For the more complete guide to backup and recovery for Business Suite on HANA, including numerous visuals to guide you, download the entire chapter on infrastructure planning or consult Pytel's book, which also details establishing scope, infrastructure planning, security planning, and migration and go-live strategies.

Backup on for Business Suite: An introduction

Your organization's backup strategy will be a combination of SAP recommendations, industry best practices, and lessons learned from operating an SAP ERP system in your environment. SAP supports data backups, storage snapshots and log backups. These backups can be used to recover the system in the event of failure to the most recent point in time or a specific point in time, or they can be used as the source for a system copy. The backup and recovery function will be performed and set up by your NetWeaver (Basis) administrators in coordination with the infrastructure team that supports the backup devices and storage solutions. SAP recommends a backup strategy that leverages all types of backups available, specifically, a daily storage snapshot, automatic log backups, and a complete data backup once a week. In the event of a failure during the week, you can restore from either the nightly storage snapshot or the complete data backup, and then read the logs from the automatic log backup. If you have a failure in your storage solution, the storage snapshot won't be available, but the complete data backup will be because you would have saved it to a location other than the local SAP HANA system. Leveraging all backup types mitigates risk and dependencies on a single component of the backup solution.

Implementing SAP Business Suite on SAP HANA

As you dig into the administration, backup and recovery of HANA, you'll see references to the savepoint. As we mentioned, HANA persists data on disk. During normal operations, changed data is automatically saved from memory to disk at regular savepoints. The time period for the savepoint is set by default to every five minutes, but this value can be changed. So, every five minutes, the savepoint is defined, and data is written to disk. If you think about a system restart, the savepoint reduces the time to restart because it doesn't have to read all redo log files. Only those redo logs that occurred after the most recent savepoint need to be read after a system restart. It's important to know that savepoints are written asynchronously by each service within HANA. A global savepoint is a consistent collection of savepoints for all services in the system. For example, a global savepoint is written when you start a complete data backup. The point here isn't to make you an expert at HANA database backup and recovery but, instead, to talk about critical components of the backup mechanisms. If during your SAP Business Suite on HANA Migration you begin to see errors related to the savepoint, you now know this is related to the ability to recover or restore your system.

Chapter download

This excerpt from Implementing SAP Business Suite on SAP HANA is reprinted here with the publisher's permission. Learn more about this book by downloading a PDF of the chapter "Infrastructure Planning."

Learn more by going to the SAP HANA Administration Guide.

Now, let's walk through a system backup using SAP HANA Studio:

  1. Be sure to download and install SAP HANA Studio from the SAP Software Download Center. Then choose Support Packages & Patches _ A-Z Products _ H _ SAP HANA PLATFORM EDITION _ SAP HANA PLATFORM EDIT. 1.0 _ Entry by Component _ HANA Studio.
  2. Launch the SAP HANA Studio, select File _ New _ Folder, and give the folder a name. The folder is a logical grouping of systems. You can have one folder for the entire landscape or one folder per Software Development Lifecycle phase -- development, quality assurance (QA), production. The folder only exists locally.
  3. Right-click the folder you created and click Add System. Enter the server name, instance number and a description. Click Next.
  4. Choose Authentication by Database User, and enter the credentials given to you by your SAP HANA installer. Click Finish after you've entered the user ID and password.
  5. Right-click the system you added, and select Logon.
  6. Right-click the Backup folder and select Open Backup Console.
  7. The initial screen displays backups in progress, if any, and the most recent successful backup. Click the Backup Catalog tab to see the backup history detail.
  8. If you want to run a backup now, then right-click the Backup folder and select Back Up System.
  9. Review the parameters on the Specify Backup Settings screen. Adjust the Backup Destination or Backup Prefix, if required. Click Next.
  10. On the next screen, confirm the settings, and then click Finish.
  11. You get a message that the backup is running. Wait for the status to update and then click Close.
  12. Confirm the results, and click Close.

What we've shown covers a system backup. The automatic log backup functionality will facilitate the log backups to the specified directories in the Global.ini.

We've only covered the very basic backup scenario you would use during the initial phases of your project. Your backup strategy will need to be automated, which is supported by SAP HANA out of the box. All backups and restores can be run from the command line in addition to HANA Studio, the Database Administration Cockpit, or the SAP Database Control Center. Thankfully, SAP has provided an excellent backup script and documentation on how to use that script with Cron in Linux. Attached to SAP Note 1651055 -- Scheduling SAP HANA Database Backups in Linux, you'll find two files. One file is a compressed file with the script and configuration file. The second is a PDF document describing the usage of the backup script. The script can perform multiple functions related to backup paths, naming conventions, retention periods, backup catalog maintenance and listing backups available. Figure 3.39 is an example from our lab environment. In this example, we keep two days of backups on a shared storage. For good measure, we move one backup to a cloud location daily. This ensures that we can restore in the event of an appliance or storage failure.

Example of SAP Business Suite on HANA retention parameter during steps to backup
Figure 3.39. Retaining Backups for Two Days Using the Retention Parameter.

Introduction to recovery processes for SAP Business Suite on HANA

The recovery tools in HANA include features you expect from a modern database.

You can recover to the latest point in time or a specific point in time, and you can use the recovery tools to restore to a new system to create a copy of the database. Unlike backups that can be run while the database is operational, the recovery process must be done while the database is shut down. Here are some other restrictions that apply when attempting to recover a database:

  • At the start of the recovery, all data and log backup files must be accessible in the system or via the third-party backup tool.
  • To recover the database, you need at least one full database backup.
  • The recovery must be executed on a system that is the same release or higher than the source system.
  • You can't pause and resume a restore. After the restore starts, you can cancel; however, the database will be left in an inconsistent state.
  • There are no restrictions on restores from multinode systems to single-node systems or the reverse.
  • The permanent license is restored if the system ID and landscape ID haven't changed. If either has changed, a temporary license will be installed that is valid for 90 days.

In Figure 3.40, you can see three options to recover your HANA database.

During the Business Suite on HANA project, you may want to restore the database in multiple scenarios.

Three examples to recover your SAP HANA database
Figure 3.40. Three examples to recover your SAP HANA database.

In one example, you might want to run your cutover procedures multiple times to develop the shortest execution strategy. In this scenario, you complete an SAP Business Suite on HANA migration, take a full backup, and then let your team execute the cutover plan. After they finish, you can validate the system. If the timing was too long or something wasn't correct, you'll need to restore the database and try again. Without the backup and restore scenario, you would have to run the entire migration again.

Another scenario includes a QA refresh after the production go-live. In this scenario, you execute your go-live cutover procedures and system validation, and right before you release the system to the end users, you take a backup. You then restore that backup to the QA system as a system copy to provide a working copy of production to support defect resolution.

Your SAP NetWeaver administrators will become very familiar with your backup and restore process. Now, let's walk through an example database restore using SAP HANA Studio. There are command-line options to perform the restore as well.

  1. Log on to the HANA database using SAP HANA Studio, which you downloaded and installed in the previous section.
  2. Right-click the system and select Backup and Recovery _ Recover System.
  3. Enter the <SID>ADM user ID and password if prompted.
  4. Confirm that the database can be shut down.
  5. Specify the recovery type by selecting Recover the database to the following point in time to simulate the restore you might run during the project.
  6. Click Next and choose the Locations of the backups. You can add multiple locations here, for example, the "cold" storage location.
  7. An overview of the data backups is displayed. You can manually input an Alternative Location and then click Check Availability.
  8. Select the data backup and choose Next.
  9. The wizard now lets you choose some additional options. You can select Use Delta Backups to potentially shorten the restore time if they are available.
  10. Click Next after you've confirmed your options.
  11. Review the summary screen, and click Finish to begin the restore. You should see a progress screen.
  12. If successful, you'll see the message System <SID> recovered. Click the Close button, and confirm that HANA services have been started.

The excerpt from Implementing SAP Business Suite on SAP HANA is reprinted here with the publisher's permission.

© 2016 by Rheinwerk Publishing, Inc. Implementing SAP Business Suite on SAP HANA / Michael Pytel. ISBN 978-1-4932-1257-6.

About the author
Michael Pytel is currently the chief innovation officer and co-founder of NIMBL, an SAP implementations consulting firm. He has more than 14 years of hands-on technical experience with SAP products, including SAP HANA.

Next Steps

What can HANA cloud do?

SAP HANA tackles analytics

More S/4HANA in 2016?

Dig Deeper on SAP HANA