Restoring Data to the Original DB Instance

Function

This API is used to restore data to the original DB instance.

URI

  • URI format

    PATH: /rds/v1/{project_id}/instances/{instanceId}/action

    Method: POST

  • Parameter description

    Table 1 Parameter description

    Name

    Mandatory

    Description

    project_id

    Yes

    Specifies the project ID of a tenant in a region.

    instanceId

    Yes

    Specifies the primary node ID of the DB instance.

    Note

    This field is not the DB instance ID. You are advised to use API v3 and the DB instance ID to perform related operations.

  • Restrictions

    The DB engine Microsoft SQL Server is not supported.

Request

  • Parameter description

    Table 2 Parameter description

    Name

    Mandatory

    Type

    Description

    restore

    Yes

    Dictionary data structure. For details, see Table 3.

    Specifies the restore information, including backupRef and restoreTime. At least one of them must be specified. If both of them are specified, only backupRef takes effect.

    Table 3 restore field data structure description

    Name

    Mandatory

    Type

    Description

    backupRef

    No

    String

    Specifies the full backup file ID.

    Important

    NOTICE: If backupRef is empty, restoreTime is mandatory. Otherwise, an error is reported.

    restoreTime

    No

    Long

    Specifies the time point to which the DB instance is restored.

    Important

    NOTICE: If restoreTime is empty, backupRef is mandatory. Otherwise, an error is reported.

  • Request example

    {
    "restore": {
            "backupRef":"a9832168-7541-4536-b8d9-a8a9b79cf1b4"
        }
    }
    

Normal Response

  • Parameter description

    Table 4 Parameter description

    Name

    Type

    Description

    extendparam

    Dictionary data structure. For details, see Table 5.

    Indicates the returned extendparam key-value pair.

    Table 5 extendparam field data structure description

    Name

    Type

    Description

    jobs

    List data structure. For details, see Table 6.

    Indicates the returned jobs parameter information.

    Table 6 jobs field data structure description

    Name

    Type

    Description

    id

    String

    Indicates the task ID.

  • Response example

    {
        "extendparam": {
            "jobs": [
                {
                    "id": "ff80808156fa51c50156fa7c20210bc9"
                }
            ]
        }
    }
    

Abnormal Response

For details, see Abnormal Request Results.