Automatically back up SAP HANA databases using Systems Manager and EventBridge
Created by Ambarish Satarkar (AWS) and Gaurav Rath (AWS)
Code repository: HDB_Backup_SSM_Document | Environment: Production | Technologies: Databases; Storage & backup |
Workload: SAP | AWS services: Amazon EC2; Amazon EventBridge; Amazon S3; AWS Systems Manager |
Summary
This pattern describes how to automate SAP HANA database backups using AWS Systems Manager, Amazon EventBridge, Amazon Simple Storage Service (Amazon S3), and AWS Backint Agent for SAP HANA.
This pattern provides a shell script-based approach using the BACKUP DATA
command and removes the need to maintain scripts and job configurations for each operating system (OS) instance across numerous systems.
Note: As of April 2023, AWS Backup announced support for SAP HANA databases on Amazon Elastic Compute Cloud (Amazon EC2). For more information, see SAP HANA databases on Amazon EC2 instances backup. Based on your organization’s needs, you can use the AWS Backup service to automatically back up your SAP HANA databases or you can use this pattern. |
Prerequisites and limitations
Prerequisites
An existing SAP HANA instance with a supported release in running state on a managed Amazon Elastic Compute Cloud (Amazon EC2) instance that is configured for Systems Manager
Systems Manager Agent (SSM Agent) 2.3.274.0 or later installed
An S3 bucket that doesn’t have public access enabled
An
hdbuserstore
key namedSYSTEM
An AWS Identity and Access Management (IAM) role for the Automation runbook to run on schedule
AmazonSSMManagedInstanceCore
andssm:StartAutomationExecution
policies are attached to Systems Manager Automation service role.
Limitations
AWS Backint Agent for SAP HANA doesn't support deduplication.
AWS Backint Agent for SAP HANA doesn't support data compression.
Product versions
AWS Backint Agent is supported on the following operating systems:
SUSE Linux Enterprise Server
SUSE Linux Enterprise Server for SAP
Red Hat Enterprise Linux for SAP
AWS Backint Agent supports the following databases:
SAP HANA 1.0 SP12 (single node and multiple nodes)
SAP HANA 2.0 and later (single node and multiple nodes)
Architecture
Target technology stack
AWS Backint Agent
Amazon S3
AWS Systems Manager
Amazon EventBridge
SAP HANA
Target architecture
The following diagram shows the installation scripts that install AWS Backint Agent, the S3 bucket, and Systems Manager and EventBridge, which use a Command document to schedule regular backups.
Automation and scale
Multiple AWS Backint Agents can be installed by using a Systems Manager Automation runbook.
Each run of the Systems Manager runbook can scale to n number of SAP HANA instances, based on target selection.
EventBridge can automate SAP HANA backups.
Tools
AWS Backint Agent for SAP HANA is a standalone application that integrates with your existing workflows to back up your SAP HANA database to an S3 bucket that you specify in the configuration file. AWS Backint Agent supports full, incremental, and differential backups of SAP HANA databases. It runs on an SAP HANA database server, where backups and catalogs are transferred from the SAP HANA database to the AWS Backint Agent.
Amazon EventBridge is a serverless event bus service that you can use to connect your applications with data from a variety of sources. EventBridge delivers a stream of real-time data from your applications, software as a service (SaaS) applications, and AWS services to targets such as AWS Lambda functions, HTTP invocation endpoints using API destinations, or event buses in other accounts.
Amazon Simple Storage Service (Amazon S3) is an object storage service. You can use Amazon S3 to store and retrieve any amount of data at any time, from anywhere on the web.
AWS Systems Manager helps you to view and control your infrastructure on AWS. Using the Systems Manager console, you can view operational data from multiple AWS services and automate operational tasks across your AWS resources.
Code
The code for this pattern is available in the aws-backint-automated-backup
Epics
Task | Description | Skills required |
---|---|---|
Create an hdbuserstore key. |
| AWS administrator, SAP HANA Administrator |
Task | Description | Skills required |
---|---|---|
Install AWS Backint Agent. | Follow the instructions in Install and configure AWS Backint Agent for SAP HANA in the AWS Backint Agent documentation. | AWS administrator, SAP HANA administrator |
Task | Description | Skills required |
---|---|---|
Create the Systems Manager Command document. |
| AWS administrator, SAP HANA administrator |
Task | Description | Skills required |
---|---|---|
Schedule regular backups using Amazon EventBridge. |
You can verify backup success from the S3 bucket path.
You can also verify backups from the SAP HANA backup catalog. | AWS administrator, SAP HANA administrator |