• Relational Database Service

rds
  1. Help Center
  2. Relational Database Service
  3. API Reference
  4. API v1
  5. Backup and Restoration
  6. Restoring Data to the Original DB Instance

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/{versionId}/{project_id}/instances/{instanceId}/action

    Method: POST

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    versionId

    Yes

    Specifies the API version. It is case-sensitive and the value is v1.

    project_id

    Yes

    Specifies the project ID of a tenant in a region.

    instanceId

    Yes

    Specifies the primary DB instance ID.

  • 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.