Help Center/ Relational Database Service/ API Reference/ Historical APIs/ API v3/ Restoring Tables to a Specified Point in Time (RDS for MySQL)
Updated on 2024-11-19 GMT+08:00

Restoring Tables to a Specified Point in Time (RDS for MySQL)

Function

To ensure data integrity and reduce impact on the original instance performance, the system restores the full and incremental data at the selected time point to a temporary DB instance, automatically exports the tables to be restored, and then restores the tables to the original DB instance.

This API will be unavailable on September 14, 2025. You are advised to switch workloads to the new API (Restoring Tables to a Specified Point in Time (RDS for MySQL)) before then.

This operation will generate restored tables on the original DB instance. Ensure that the original DB instance has sufficient storage capacity.

  • Before calling an API, you need to understand the API in Authentication.

Constraints

  • This API is supported for RDS for MySQL only.
  • This API is not supported for RDS for MySQL 8.0 DB instances.

URI

  • URI format

    POST /v3/{project_id}/instances/{instance_id}/restore/tables

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    project_id

    Yes

    Project ID of a tenant in a region.

    For details about how to obtain the project ID, see Obtaining a Project ID.

    instance_id

    Yes

    Specifies the DB instance ID.

Request

Table 2 Parameter description

Name

Mandatory

Type

Description

restoreTime

Yes

Long

Backup time point.

restoreTables

Yes

Array of objects

Database information. For details, see Table 3.

is_fast_restore

No

Boolean

Whether to use fast restoration. The value can be true or false.

Table 3 restoreTables field data structure description

Name

Mandatory

Type

Description

database

Yes

String

Specifies the database name.

tables

Yes

Array of objects

Specifies the table information. For details, see Table 4.

Table 4 tables field data structure description

Name

Mandatory

Type

Description

oldName

Yes

String

Specifies the original table name before the restoration.

newName

Yes

String

Specifies the table name after the restoration.

Example Request

Restoring table data to a specific point in time
POST https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in01/restore/tables

{
    "restoreTime": 1583720991838,
    "restoreTables": [
        {
            "database": "restoretest",
            "tables": [
                {
                    "oldName": "test",
                    "newName": "test_1583720991838"
                }
            ]
        }
    ]
}

Response

  • Normal response
    Table 5 Response body parameters

    Name

    Type

    Description

    jobId

    String

    Indicates the task ID.

  • Example normal response
    {
        "jobId":"7b55d6ca-dc8e-4844-a9da-6c53a1506db3"
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.