All Products
Search
Document Center

Cloud Backup:Restore databases to an SAP HANA instance

Last Updated:Sep 21, 2023

After you use Cloud Backup to back up SAP HANA databases to a backup vault, you can restore the databases to the source SAP HANA instance, another SAP HANA instance that uses the same backup vault, or an SAP HANA instance that resides in another region.

Prerequisites

Precautions

If an SAP HANA database is being restored, Cloud Backup automatically stops the database. When the database is being restored, you cannot access the database.

Restore a database to the source SAP HANA instance

To restore a database to the source SAP HANA instance, perform the following steps:

  1. Log on to the Cloud Backup console.

  2. In the left-side navigation pane, choose Backup > SAP HANA Backup.

  3. In the top navigation bar, select the region where the SAP HANA instance to which you want to restore a database resides.

  4. Click the SAP HANA Instances tab.

  5. On the SAP HANA Instances tab, click Restore next to the SAP HANA instance.

  6. In the Create Restore Job panel, select the source SAP HANA instance as the instance to which you want to restore a database and click Next.

    Backup
  7. Confirm the source and destination SAP HANA instances, select the source database, and then click Next.

    Note

    If the source SAP HANA instance is accidentally deleted and cannot be found, create an SAP HANA instance with the same name as the deleted one, and then restore the database.

    DB
  8. Configure the parameters, including the Restore To parameter, and click Next.

    Restore Rule

    The following table describes the valid values of the Restore To parameter.

    Value of the Restore To parameter

    Description

    Configuration

    Latest Restore Point

    Restores the database to the latest recovery point.

    • Use Differential Backup: If you want to use a differential backup or an incremental backup to restore the database, turn on this switch. If you turn off Use Differential Backup, Cloud Backup uses a log backup to restore the database.

    • Initialize Log Area: If you want to delete all log entries from the log area after the log entries are restored, turn on this switch.

    • Validate Differential and Log Backups: If you turn on this switch, Cloud Backup checks whether the required differential backup and log backup are available before the restore job starts. If the differential backup or log backup is unavailable, Cloud Backup does not start the restore job.

    Specified Time Point

    Restores the database to the recovery point that is closest to a specified point in time.

    • Use Differential Backup: If you want to use a differential backup or an incremental backup to restore the database, turn on this switch. If you turn off Use Differential Backup, Cloud Backup uses a log backup to restore the database.

    • Initialize Log Area: If you want to delete all log entries from the log area after the log entries are restored, turn on this switch.

    • Validate Differential and Log Backups: If you turn on this switch, Cloud Backup checks whether the required differential backup and log backup are available before the restore job starts. If the differential backup or log backup is unavailable, Cloud Backup does not start the restore job.

    • Time Point: Select a point in time to which you want to restore the database. Cloud Backup restores the database to the recovery point that is closest to a specified point in time.

    Specified Backup

    Restores the database to a specified backup.

    Use Catalog: If you want to use a catalog backup to restore the database, turn on this switch.

    Note

    If you turn off Use Catalog, you must specify the prefix of a backup file. Then, Cloud Backup finds the backup file based on the specified prefix and restores the backup file.

    Specified Log Entry

    Restores the database to the point in time when a specified log entry is generated.

    • Use Differential Backup: If you want to use a differential backup or an incremental backup to restore the database, turn on this switch. If you turn off Use Differential Backup, Cloud Backup uses a log backup to restore the database.

    • Initialize Log Area: If you want to delete all log entries from the log area after the log entries are restored, turn on this switch.

    • Validate Differential and Log Backups: If you turn on this switch, Cloud Backup checks whether the required differential backup and log backup are available before the restore job starts. If the differential backup or log backup is unavailable, Cloud Backup does not start the restore job.

    • Log Entry: Specify a log entry. Cloud Backup restores the database to the point in time when the log entry is generated.

    • Volume ID: Specify the ID of the volume that you want to restore.

  9. Select a backup version that you want to restore and click Create.

Restore a database to another SAP HANA instance in the same region

If you want to restore an SAP HANA database to a SAP HANA instance that resides in the same region and uses the same backup vault, you can perform the preceding steps. The only difference is that you must select a different SAP HANA instance from the source SAP HANA instance. In addition, you must turn on Use Backint for Catalog Backup for the database of the destination SAP HANA instance. For information about how to turn on Use Backint for Catalog Backup, see Set backup parameters. Restore 2

After you confirm the source and destination SAP HANA instances, you must configure the Source Database Name parameter. The Source Database Name parameter specifies the name of the source database that you want to restore. You must set the parameter in the <Source database name>@<SID> format. systemname

Note

For more information about how to restore an SAP HANA database to another SAP HANA instance, see Restore a database to the source SAP HANA instance.

Restore a database to an SAP HANA instance in another region

A backup vault is a repository that Cloud Backup uses to store backup data in the cloud. To implement disaster recovery, you can use a mirror vault to restore an SAP HANA database across regions.

Before you can restore an SAP HANA database to an SAP HANA instance in another region, you must create a mirror vault for the backup vault of the SAP HANA database. For information about how to create a mirror vault, see Back up data across regions.

To restore an SAP HANA database to an SAP HANA instance in another region, perform the following steps:

  1. Log on to the Cloud Backup console.

  2. In the left-side navigation pane, choose Backup > SAP HANA Backup.

  3. Select the region where the mirror vault resides.

  4. On the SAP HANA Instances tab, install an Cloud Backup client on each node of the SAP HANA instance.

    Note

    You must select an existing mirror vault. Mirror vault names contain [COPY]. For more information about how to configure other parameters when you install an Cloud Backup client, see Register an SAP HANA instance.

  5. On the SAP HANA Instances tab, find the source SAP HANA instance, and click Restore in the Actions column.

Restore a database to another database in the source SAP HANA instance

You must use SAP HANA Studio to restore a database to another database in the source SAP HANA instance.

  1. Open SAP HANA Studio and connect to the SAP HANA instance.

  2. Right-click the database instance to be restored and choose Backup and Recovery > Recover Tenant Database.

    Tenant
  3. Select a tenant database.

    choose
  4. In the Specify Recovery Type window, click Recover the database to a specific data backup.

  5. In the Specify Backup Location window, configure the following parameters.

    • Click Recover using the backup catalog.

    • Click Search for the backup catalog in Backint only.

    • Select Backint System Copy.

    • Enter DBNAME@SID in the Source System field.

      DBNAME is the name of the backup database to be restored. SID is the ID of the current database instance.

  6. Follow the wizard instructions to stop the database and select the backup to which you want to restore the database.

    Important

    If you cannot find the required backup in the Backups list, Use Backint for Catalog Backup is not turned on. For information about how to turn on Use Backint for Catalog Backup, see Set backup parameters.

    backups
  7. Confirm the recovery settings and click Finish.

Restore a database to an SAP HANA instance by specifying a prefix

In the following scenarios, you can restore a database to an SAP HANA instance by specifying a prefix.

  • After an SAP HANA instance is stopped, Cloud Backup cannot obtain historical backups from the catalog. As a result, a database of the SAP HANA instance fails to be restored.

  • After you restore a database to another SAP HANA instance in the same region, Cloud Backup cannot restore previous backups of the database because the catalog is overwritten.

  1. Obtain the prefix of historical backups from the catalog.

    1. Log on to the SAP HANA instance in SSH mode.

    2. Run the following command to obtain the prefix of historical backups:

      Replace SID, InstanceNumber, hostname, and DBNAME with the configuration items of your SAP HANA instance.

      cat /usr/sap/{SID}/HDB{InstanceNumber}/{hostname}/trace/DB_{DBNAME}/backup.log  | grep COMPLETE_DATA_BACKUP

      For example, you can run the cat /usr/sap/HXE/HDB90/yzs-hana-daily/trace/DB_HXE/backup.log | grep COMPLETE_DATA_BACKUP command to obtain the prefix.

      2022-06-02T20:38:51+08:00  P0007269      181246cfc22 INFO    BACKUP   command: BACKUP DATA FOR HXE USING BACKINT ('/usr/sap/HXE/SYS/global/hdb/backint/DB_HXE/COMPLETE_DATA_BACKUP_2022_06_02_20_38') ASYNCHRONOUS
      2022-06-02T20:38:51+08:00  P0007269      181246cfc22 INFO    BACKUP   to  backint: /usr/sap/HXE/SYS/global/hdb/backint/DB_HXE/COMPLETE_DATA_BACKUP_2022_06_02_20_38_databackup_0_1
      2022-06-02T20:38:51+08:00  P0007269      181246cfc22 INFO    BACKUP   to  backint: /usr/sap/HXE/SYS/global/hdb/backint/DB_HXE/COMPLETE_DATA_BACKUP_2022_06_02_20_38_databackup_2_1
      2022-06-02T21:38:51+08:00  P0007269      18124a3ea82 INFO    BACKUP   command: BACKUP DATA FOR HXE USING BACKINT ('/usr/sap/HXE/SYS/global/hdb/backint/DB_HXE/COMPLETE_DATA_BACKUP_2022_06_02_21_38') ASYNCHRONOUS
      2022-06-02T21:38:51+08:00  P0007269      18124a3ea82 INFO    BACKUP   to  backint: /usr/sap/HXE/SYS/global/hdb/backint/DB_HXE/COMPLETE_DATA_BACKUP_2022_06_02_21_38_databackup_0_1
      2022-06-02T21:38:51+08:00  P0007269      18124a3ea82 INFO    BACKUP   to  backint: /usr/sap/HXE/SYS/global/hdb/backint/DB_HXE/COMPLETE_DATA_BACKUP_2022_06_02_21_38_databackup_2_1

      COMPLETE_DATA_BACKUP_2022_06_02_20_38 is the prefix.

  2. Create a restore job in the Cloud Backup console and specify the prefix.

    1. Log on to the Cloud Backup console.

    2. In the left-side navigation pane, choose Backup > SAP HANA Backup.

    3. In the top navigation bar, select the region where the SAP HANA instance to which you want to restore a database resides.

    4. On the SAP HANA Instances tab, click Restore next to the SAP HANA instance.

    5. In the Create Restore Job panel, select the source SAP HANA instance as the instance to which you want to restore a database and click Next.

      Backup
    6. Confirm the source and destination SAP HANA instances, select the source database, and then click Next.

      Select a database
    7. In the Restore Rule step, configure the following parameters and click Next.

      Value of the Restore To parameter

      Description

      Configuration

      Restore To

      The recovery mode.

      Select Specified Backup.

      Use Catalog

      Specifies whether to use a catalog backup to restore the database.

      Turn off the Use Catalog switch.

      Backup Prefix

      The prefix of a backup file. Cloud Backup finds the backup file based on the specified prefix and restores the backup file.

      Set the value to the prefix obtained in Step 1. Example: COMPLETE_DATA_BACKUP_2022_06_02_20_38.

  3. Select a backup version that you want to restore and click Create.

What to do next

You can view the status of restore jobs or cancel running restore jobs. Perform the following steps:

  1. In the left-side navigation pane, choose Backup > SAP HANA Backup.

  2. On the SAP HANA Backup page, click Restore Job.

  3. View the status of each restore job in the Status column.

  4. To cancel a running restore job, find the job and click Cancel in the Actions column.