SAP HANA databases on Amazon EC2 instances backup - AWS Backup

SAP HANA databases on Amazon EC2 instances backup

Note

See Feature availability by AWS Region for information about where AWS Backup support for SAP HANA on Amazon EC2 instances is available.

AWS Backup supports backups and restores of SAP HANA databases on Amazon EC2 instances.

Overview

In addition to the ability to create backups and to restore databases, AWS Backup integration with Amazon EC2 Systems Manager for SAP allows customers to identify and tag SAP HANA databases.

AWS Backup is integrated with AWS Backint Agent to perform SAP HANA backups and restores. For more information, see AWS Backint.

Prerequisites

Several prerequisites must be completed before backup and restore activities can be performed. Note you will need administrative access to your SAP HANA database and permissions to create new IAM roles and policies in your AWS account to perform these steps.

Complete these prerequisites at Amazon EC2 Systems Manager.

Backup Operations in the AWS Backup console

Once the prerequisites and SSM for SAP setups are complete, you can back up and restore your SAP HANA on EC2 databases.

Opt in to protect SAP HANA resources

To use AWS Backup to protect your SAP HANA databases, SAP HANA must be toggled on as one of the protected resources. To opt in:

  1. Open the AWS Backup console at https://console.aws.amazon.com/backup.

  2. In the left navigation pane, choose Settings.

  3. Under Service opt-in, select Configure resources.

  4. Opt in to SAP HANA on Amazon EC2..

  5. Click Confirm.

Service opt-in for SAP HANA on Amazon EC2 will now be enabled.

Create a scheduled backup

You can edit an existing backup plan and add SAP HANA resources to it, or you can create a new backup plan just for SAP HANA resources.

If you choose to create a new backup plan, you will have three options:

  1. Option 1: Start with a template

    1. Choose a backup plan template.

    2. Specify a backup plan name.

    3. Click Create plan.

  2. Option 2: Build a new plan

    1. Specify a backup plan name.

    2. Optionally specify tags to add to backup plan.

    3. Specify the backup rule configuration.

      1. Specify a backup rule name.

      2. Select an existing vault or create a new backup vault. This is where your backups are stored.

      3. Specify a backup frequency.

      4. Specify a backup window.

        Note transition to cold storage is currently unsupported.

      5. Specify the retention period.

        Copy to destination is currently unsupported

      6. (Optional) Specify tags to add to recovery points.

    4. Click Create plan.

  3. Option 3: Define a plan using JSON

    1. Specify the JSON for your backup plan by either modifying the JSON expression of an existing backup plan or creating a new expression.

    2. Specify a backup plan name.

    3. Click Validate JSON.

    Once the backup plan is created successfully, you can assign resources to the backup plan in the next step.

Whichever plan you use, ensure you assign resources. You can choose which SAP HANA databases to assign, including system and tenant databases. You also have the option to exclude specific resource IDs.

Create an on-demand backup

You can create a full on-demand backup that runs immediately after creation. Note that on-demand backups of SAP HANA databases on Amazon EC2 instances are full backups; incremental backups are not supported.

Your on-demand backup is now created. It will begin backing up your specified resources. The console will transition you to the Backup jobs page where you can view the job progress. Take note of the backup job ID from the blue banner at the top of your screen, as you will need it to easily find the status of your backup job. When the backup is completed, the status will progress to Completed. Backups can take up to several hours.

Refresh the Backup jobs list to see the status change. You can also search for and click on your backup job ID to view detailed job status.

Continuous backups of SAP HANA databases

You can make continuous backups , which can be used with point-in-time restore (PITR) (note that on-demand backups preserve resources in the state in which they are taken; whereas PITR uses continuous backups which record changes over a period of time).

With continuous backups, you can restore your SAP HANA database on an EC2 instance by rewinding it back to a specific time that you choose, within 1 second of precision (going back a maximum of 35 days). Continuous backup works by first creating a full backup of your resource, and then constantly backing up your resource’s transaction logs. PITR restore works by accessing your full backup and replaying the transaction log to the time that you tell AWS Backup to recover.

You can opt in to continuous backups when you create a backup plan in AWS Backup using the AWS Backup console or the API.

To enable continuous backups using the console
  1. Sign in to the AWS Management Console, and open the AWS Backup console at https://console.aws.amazon.com/backup.

  2. In the navigation pane, choose Backup plans, and then choose Create Backup plan.

  3. Under Backup rules, choose Add Backup rule.

  4. In the Backup rule configuration section, select Enable continuous backups for supported resources.

After you disable PITR (point-in-time restore) for SAP HANA database backups, logs will continue to be sent to AWS Backup until the recovery point expires (status equals EXPIRED). You can change to an alternative log backup location in SAP HANA to stop the transmission of logs to AWS Backup.

A continuous recovery point with a status of STOPPED indicates that a continuous recovery point has been interrupted; that is, the logs transmitted from SAP HANA to AWS Backup that show the incremental changes to a database have a gap. The recovery points that occur within this timeframe gap have a status of STOPPED..

For issues you may encounter during restore jobs of continuous backups (recovery points), see the SAP HANA Restore troubleshooting section of this guide.

View your backup jobs and recovery points

View the status of backup and restore jobs:

  1. Open the AWS Backup console at https://console.aws.amazon.com/backup.

  2. In the navigation pane, choose Jobs.

  3. Choose backup jobs, restore jobs or copy jobs to see the list of your jobs.

  4. Search for and click on your job ID to view detailed job statuses.

View all recovery points in a vault:

  1. Open the AWS Backup console at https://console.aws.amazon.com/backup.

  2. In the navigation pane, choose Backup vaults.

  3. Search for and click on a backup vault to view all the recovery points within the vault.

View details of protected resources:

  1. Open the AWS Backup console at https://console.aws.amazon.com/backup.

  2. In the navigation pane, choose Protected resources.

  3. You may also filter by resource type to view all backups of that resource type.

Backup Operations using API and CLI

Each action within the Backup console has a corresponding API call.

To programmatically configure and manage AWS Backup and its resources, use the API call StartBackupJob to backup an SAP HANA database on an EC2 instance.

Use start-backup-job as the CLI command.

Troubleshooting

If any of the following errors occur while attempting a backup operation, see the associated resolution.

  • Error: Encountered an issue with log backups, please check SAP HANA for details.

    Resolution: Check SAP HANA to ensure log backups are being sent to AWS Backup from SAP HANA.

    Error: One or more log backup attempts failed for recovery point.

    Resolution: Check SAP HANA for details. Ensure log backups are being sent to AWS Backup from SAP HANA.

    Error: Unable to determine the status of log backups for recovery point.

    Resolution: Check SAP HANA for details. Ensure log backups are being sent to AWS Backup from SAP HANA.

    Error: Log backups for recovery point %s were interrupted due to a restore operation on the database.

    Resolution: Wait for the restore job to complete. The log backups should resume.

    Error: b’* 447: backup could not be completed: [110507] Backint exited with exit code 1 instead of 0. console output: time=2022-08-12T11:03:18Z level=info msg=Starting execution. time=2022-08-12T11:03:18Z level=info msg=Configuration file not specified in argument, using default location time=2022-08-12T11:03:18Z level=info msg=Loading configuration file /opt/aws-backint-agent/aws-backint-agent-config.yaml time=2022-08-12T11:03:18Z level=error msg=Failed to read config file open /opt/aws-backint-agent/aws-backint-agent-config.yaml: no such file or directory time=2022-08-12T11:03:18Z level=error msg=Error reading config file open /opt/aws-backint-agent/aws-backint-agent-config.yaml: no such file or directory. time=2022-08-12T11:03:18Z level=fatal msg=Error occurred during configuration. open /opt/aws-backint-agent/aws-backint-agent-config.yaml: no such file or directory. , [110203] Not all data could be written: Expected 4096 but transferred 0 SQLSTATE: HY000\n’

    Resolution: Most likely the BackInt installation did not complete successfully. Retry the process to Install AWS Backint Agent and Amazon EC2 Systems Manager Agent on your SAP application server.

  • Error: Database cannot be backed up while it is stopped.

    Resolution: Ensure the database to be backed up is active. Database data and logs can be backed up only while the database is online.

  • Error: Getting backup metadata failed. Check the SSM document execution for more details.

    Resolution: Ensure the database to be backed up is active. Database data and logs can be backed up only while the database is online.

Glossary

Data Backup Types: SAP HANA supports two types of data backups: Full and INC (incremental). AWS Backup optimizes which type is used during each backup operation.

Catalog Backups: SAP HANA maintains its own manifest called a catalog. AWS Backup interacts with this catalog. Each new backup will create an entry in the catalog.

Continuous Log Backup (Transaction Logs): For Point in Time Recovery (PITR) functions, SAP HANA tracks all transactions since the most recent backup.

System Copy: A restore job in which the restore target database is different from the source database from which the recovery point was created.

Destructive Restore: A destructive restore is a type of restore job during which a restored database deletes or overwrites the source or existing database.

FULL: A full backup is a backup of a complete database.

INC: An incremental backup is a backup of all changes to an SAP HANA database since the previous backup.

For additional details, see the AWS glossary.

Release notes

Certain functionalities are not supported at this time:

  • Cross-Region and cross-account copying is not currently supported.

  • Backup Audit Manager and reporting are not currently supported.

  • The following Regions are not supported at this time: Asia Pacific (Jakarta), AWS GovCloud (US-West), AWS GovCloud (US-East), China (Beijing), China (Ningxia), Europe (Spain), Europe (Zurich), Asia Pacific (Hyderabad), and Asia Pacific (Melbourne).