Restore an SAP HANA database

更新时间:
复制 MD 格式

Restore a backed-up SAP HANA database to the source instance, another instance in the same vault, or an instance in a different region.

Prerequisites

Precautions

Cloud Backup automatically stops the SAP HANA database during a restore, making it inaccessible.

Restore to source instance in the same region

To restore a database to the source SAP HANA instance in the same region:

  1. Log on to the Cloud Backup console.

  2. In the left-side Backup > SAP HANA Backup.

  3. In the upper-left corner of the top navigation bar, select the region of the instance.

  4. On the SAP HANA Backup page, click the SAP HANA Instances tab. Find the target instance and click Restore in the Actions column.

  5. In the Create Restore Job panel, select the same SAP HANA instance as both source and destination, and then click Next.

    image

  6. Verify the source and destination instance information, select the database to restore, and then click Next.

    Important

    During a cross-instance restore or when Enhanced Recovery Mode is used, Cloud Backup automatically stops the running destination database to ensure data consistency.

    Note
    • If the source database was deleted and is not found, create a new database with the same name in SAP HANA before starting the restore.

    • If Use Backint for Catalog Backup is enabled for the destination instance, you can use Enhanced Recovery Mode. This mode reads the backup catalog through Backint to restore even when the local instance is unavailable.

    image

  7. Select a Restore To, configure the parameters, and then click Next.

    Recovery rules

    Parameters:

    Recovery method

    Description

    Parameters

    Latest Recovery Point

    Restores the database to the most recent available state.

    • Use Differential Backup: Uses a differential or incremental backup instead of a log backup for recovery.

    • Initialize Log Area: Excludes log entries from the log area. After the restore, these entries are deleted.

    • Validate Differential and Log Backups: Pre-checks that all required differential and log backups exist before starting recovery. Aborts if any backup is missing.

    Specified Time Point

    Restores the database to a specific point in time.

    • Use Differential Backup: Uses a differential or incremental backup instead of a log backup for recovery.

    • Initialize Log Area: Excludes log entries from the log area. After the restore, these entries are deleted.

    • Validate Differential and Log Backups: Pre-checks that all required differential and log backups exist before starting recovery. Aborts if any backup is missing.

    • Time Point: The point in time to which the database is restored.

    Specified Backup

    Restores the database to a specific database backup.

    Use Catalog: Specifies whether to search for backups in the backup catalog.

    Note

    If you do not use the backup catalog, specify a backup prefix. Cloud Backup restores based on the specified prefix.

    Log Position

    Restores the database to a specific log position.

    • Use Differential Backup: Uses a differential or incremental backup instead of a log backup for recovery.

    • Initialize Log Area: Excludes log entries from the log area. After the restore, these entries are deleted.

    • Validate Differential and Log Backups: Pre-checks that all required differential and log backups exist before starting recovery. Aborts if any backup is missing.

    • Log Position: The log position to which you want to recover.

    • Volume ID: The volume that you want to restore.

  8. Select a backup version to restore and click Create.

Cross-instance restore in the same region

The steps are similar to restoring to the same instance. The key difference: you must select a different target instance, and the target must have Use Backint for Catalog Backup enabled. To enable the Use Backint for Catalog Backup switch, see Configure backup parameters.

Important

A cross-instance restore overwrites the backup catalog of the destination instance, preventing restores from its previous backups. Perform a full backup immediately after the restore completes to protect the database.

image

In addition, when you perform a cross-instance restore, you must specify the Source Database Name after verifying the source and destination instance information. This parameter specifies the name of the source database to restore. Use the format DBNAME@SID.image

Note

For the remaining steps, see Restore to the source instance in the same region.

Cross-vault restore in the same region

In this scenario, SAP HANA instance e1 is backed up to vault v1, and instance e2 is backed up to vault v2 in the same region. The following steps restore data from instance e1 to instance e2.

image

  1. Log on to the Cloud Backup console.

  2. In the left-side Backup > SAP HANA Backup.

  3. In the upper-left corner of the top navigation bar, select the region of the instances.

  4. Delete the node from instance e2.

    Click the instance ID of e2 to go to the SAP HANA Instance page. On the SAP HANA Nodes tab, delete the node.

    Important

    Deleting a node interrupts its backup jobs. Existing backup data is retained, but new data will no longer be backed up, which creates a risk of data loss. Before deleting, confirm that the data on the node in instance e2 is no longer needed or has been backed up.

    image

    image

    After the node is deleted, the status of SAP HANA instance e2 changes to Initialization Failed.

    image

  5. Register a temporary SAP HANA instance, named e3.

    1. On the SAP HANA Instances tab, click Register SAP HANA Instance.

      image

    2. In the Register SAP HANA Instance panel, select vault v1, enter the parameters for instance e3, and complete the registration. Then, configure its backup parameters. For parameter details, see Register an SAP HANA instance.

      image

  6. Restore data from instance e1 to instance e3. See Cross-instance restore in the same region.

  7. Delete the node from instance e3.

    Click the instance ID of e3 to go to the SAP HANA Instance page. On the SAP HANA Nodes tab, delete the node.

    image

  8. Add the node from instance e3 to instance e2.

    Click the instance ID of e2 to go to the SAP HANA Instance page. Click Add Node and select the node deleted from instance e3. Cloud Backup automatically deploys a backup client on the node, completing the restore from instance e1 to instance e2.

    image

Cross-region restore

A backup vault stores backup data in the cloud. For disaster recovery, use a replication destination backup vault to restore an SAP HANA database across regions.

To restore an SAP HANA database across regions, you must first create a replication destination backup vault and configure cross-region backup.

To restore a database to an SAP HANA instance in a different region:

  1. Log on to the Cloud Backup console.

  2. In the left-side Backup > SAP HANA Backup

  3. Select the region where the replication destination backup vault is located.

  4. On the SAP HANA Instances tab, install a backup client on the specified SAP HANA instance.

    Note

    For the vault parameter, select the replication destination backup vault you created. Its name contains [COPY]. For client installation parameters, see Register an SAP HANA instance.

  5. Find the target SAP HANA instance and click Restore in the Actions column.

    The remaining steps are similar to cross-instance restore in the same region.

Cross-database restore within the same instance

To restore a database to a different database within the same SAP HANA instance, use SAP HANA Studio.

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

  2. Right-click the database instance to which you want to restore, and then choose Backup and Recovery > Recover Tenant Database.

    Tenant

  3. Select the 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.

    • Select Recover using the backup catalog.

    • Select Search for the backup catalog in Backint only.

    • Select Backint System Copy.

    • In the Source System field, enter DBNAME@SID.

      DBNAME is the source database name, and SID is the ID of the destination database instance.

  6. Follow the on-screen instructions to stop the database and select the backup that you want to restore.

    Important

    If no backup records appear in the Backups list, the Use Backint for Catalog Backup option is not enabled. To enable Use Backint for Catalog Backup, see Configure backup parameters.

    backups

  7. Confirm the restore settings and click Finish.

Restore using a prefix

You can restore an SAP HANA instance by using a prefix in the following scenarios:

  • The SAP HANA database instance has stopped, preventing Cloud Backup from retrieving backups from the backup catalog.

  • After performing a cross-instance restore, the catalog is overwritten, and Cloud Backup cannot restore the database from older backups.

  1. Obtain the prefix of a historical backup from the backup catalog.

    1. Log on to the SAP HANA instance over SSH.

    2. Run the following command to obtain the prefix of a historical backup.

      Replace {SID}, {InstanceNumber}, {hostname}, and {DBNAME} with the parameters 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

      The prefix is the COMPLETE_DATA_BACKUP_2022_06_02_20_38 part of the output.

  2. In the Cloud Backup console, create a restore job by using the prefix.

    1. Log on to the Cloud Backup console.

    2. In the left-side Backup > SAP HANA Backup

    3. In the upper-left corner of the top menu bar, select the region.

    4. On the SAP HANA Backup page, find the target instance and click Restore in the Actions column.

    5. In the Create Restore Job panel, select the same SAP HANA instance as the source for the restore, and then click Next.

      Backup

    6. Verify the source and destination instance information, select the database to restore, and then click Next.

      Select database

    7. On the restore rule tab, configure the following parameters and click Next.

      Specify backup

      Parameter

      Description

      Configuration

      Restore To

      The recovery method.

      Select Specified Backup.

      Use Catalog

      Specifies whether to search for the backup in the backup catalog.

      Turn off the Use Catalog switch.

      Backup Prefix

      The backup prefix from the backup log. Cloud Backup uses this prefix to locate the backup version.

      Set this parameter to the prefix that you obtained in Step 1. Example: COMPLETE_DATA_BACKUP_2022_06_02_20_38.

  3. Select a backup version to restore and click Create.

View or cancel restore jobs

To view restore job status or cancel a job in progress:

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

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

  3. View the status of each restore job in the list.

  4. To cancel a job in progress, find it and click Cancel in the Actions column.