• SAP HANA

saphana
  1. Help Center
  2. SAP HANA
  3. User Guide (API)
  4. Backing Up and Restoring Data
  5. Inter-AZ Data Backup and Restoration

Inter-AZ Data Backup and Restoration

Scenarios

You can use VBS APIs to back up and restore EVS disk data.

Procedure

Backing up data

NOTE:

Create a VBS backup based on an EVS disk snapshot by specifying the snapshot ID. For instructions about how to create a snapshot for an EVS disk, see section Intra-AZ Data Backup and Restoration.

  1. Create a VBS backup for an SAP HANA data or log volume.

    POST /v2/{tenant_id}/cloudbackups

    Example request:

    POST /v2/2a99c1bade9d48f89bd0332e323d126e/cloudbackups
    {
       "backup": {
        "volume_id": "2de9eea9-a53d-471c-ac08-6c8ffc5f4578",
        "snapshot_id": "6c24b447-b197-46e1-abdb-271d353381b0",
        "name": "vbsdemo11",
        "description": "VBS DEMO 11"
        }
    }

    Example response:

    {
       "job_id": "2c9eb2c65c002220015c1a85959c34f5"  
    }
  1. View the task status.

    GET /v1/{tenant_id}/jobs/{job_id}

    Example request:

    GET /v1/2a99c1bade9d48f89bd0332e323d126e/jobs/2c9eb2c65c002220015c1a85959c34f5

    Example response:

    {
       "status": "SUCCESS",
       "entities": {
       "backup_id": "1dd12a30-6de5-4329-a1f7-bd8f36749f8f"
       },
       "job_id": "2c9eb2c65c002220015c1a85959c34f5",
       "job_type": "bksCreateBackup",
        "begin_time": "2017-05-18T07:46:21.211Z",
        "end_time": "2017-05-18T07:51:50.183Z",
        "error_code": null,
        "fail_reason": null
       }

Restoring data

  1. (Optional) Create an EVS disk in another AZ.
    Perform this operation only when you need to use the backup to restore data to the newly created EVS disk.
    1. Create an EVS disk in another AZ.

      POST /v2/{tenant_id}/volumes

      Example request:

      POST /v2/2a99c1bade9d48f89bd0332e323d126e/volumes 
      { 
         "volume": { 
             "name": "datavol_site2", 
             "availability_zone": "aaa", //For example, AZ is aaa.
             "description": "hana data volume at site 2", 
             "volume_type": "uh-l1", 
           "multiattach":true,
             "size":64,
             "metadata":{"hw:passthrough":"true"}
                   } 
      }
    2. Obtain the EVS disk ID.

      GET /v2/{tenant_id}/cloudvolumes

      Example request:
      GET /v2/2a99c1bade9d48f89bd0332e323d126e/cloudvolumes

    Example response:

    {
      "volumes": [
        {
          "id": "2de9eea9-a53d-471c-ac08-6c8ffc5f4578",
          "links": [
            {
              "href": "https://xxx/v2/2a99c1bade9d48f89bd0332e323d126e/volumes/2de9eea9-a53d-471c-ac08-6c8ffc5f4578",
              "rel": "self"
            },
            {
              "href": "https://xxx/2a99c1bade9d48f89bd0332e323d126e/volumes/2de9eea9-a53d-471c-ac08-6c8ffc5f4578",
              "rel": "bookmark"
            }
          ],
          "name": "volume-no-snap"
        },
        {
          "id": "02fcdc68-a68d-431a-9d65-1329a9344cd6",
          "links": [
            {
              "href": "https://xxx/v2/2a99c1bade9d48f89bd0332e323d126e/volumes/02fcdc68-a68d-431a-9d65-1329a9344cd6",
              "rel": "self"
            },
            {
              "href": "https://xxx/2a99c1bade9d48f89bd0332e323d126e/volumes/02fcdc68-a68d-431a-9d65-1329a9344cd6",
              "rel": "bookmark"
            }
          ],
          "name": "datavol_site2"
        }
      ]
    }
  2. Use the VBS backup to restore data to the newly created EVS disk.
    NOTE:

    The data of a newly created EVS disk can be directly restored. Before restoring the data of an existing EVS disk, stop the target ECS and detach the disk from the ECS.

    POST /v2/{tenant_id}/backups/{backup_id}/restore

    Example request:

    POST v2/2a99c1bade9d48f89bd0332e323d126e/backups/1dd12a30-6de5-4329-a1f7-bd8f36749f8f/restore
    {
       "restore":{
        "volume_id":"02fcdc68-a68d-431a-9d65-1329a9344cd6"
       }   
    }

Example response:

     {
      "job_id": "2c9eb2c65c002220015c1af73f1152e9" 
     }
  1. View the task status.

    GET /v1/{tenant_id}/jobs/{job_id}

    Example request:

    GET /v1/2a99c1bade9d48f89bd0332e323d126e/jobs/2c9eb2c65c002220015c1af73f1152e9

    Example response:

    {
        "status": "SUCCESS",
        "entities": {
         "backup_id": "1dd12a30-6de5-4329-a1f7-bd8f36749f8f",
          "volume_id": "02fcdc68-a68d-431a-9d65-1329a9344cd6"
          },
         "job_id": "2c9eb2c65c002220015c1af73f1152e9",
         "job_type": "bksRestoreBackup",
        "begin_time": "2017-05-18T09:50:30.160Z",
        "end_time": "2017-05-18T09:51:35.934Z",
        "error_code": null,
         "fail_reason": null
     }

Related Operations

Table 1 lists related operations. For more information about APIs, see the Volume Backup Service API Reference.

Table 1 Inter-AZ backup and restoration operations

Task

Description

View VBS backups.

Perform this operation when you need to view VBS backups.

View details about VBS backups.

Perform this operation when you need to view details about VBS backups.

View details about a VBS backup.

Perform this operation when you need to view details about a specified VBS backup.

Delete a VBS backup.

Perform this operation when you need to delete a specified VBS backup.