doc-exports/docs/rds/api-ref/en-us_topic_0037147508.html
Wang , Deng Ke 5208dcae7b RDS API 20221104 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Wang , Deng Ke <wangdengke2@huawei.com>
Co-committed-by: Wang , Deng Ke <wangdengke2@huawei.com>
2022-11-10 09:55:48 +00:00

16 KiB

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.

    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.

    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.