Help Center/ Relational Database Service/ API Reference/ API v3.1 (Recommended)/ Restoring Tables to a Specified Point in Time (RDS for MySQL)
Updated on 2025-12-09 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 a selected time point to a temporary DB instance, exports the tables to be restored, and then restores the tables to the original DB instance.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
  • If you are using role/policy-based authorization, see Permissions and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

rds:instance:tableRestore

write

-

-

-

-

Constraints

  • This API is available to RDS for MySQL only.
  • This operation will generate restored tables on the original DB instance. Ensure that the original DB instance has sufficient storage capacity.

URI

  • URI format

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

  • Parameter description
    Table 1 Parameters

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Definition

    Project ID of a tenant in a region.

    To obtain the value, see Obtaining a Project ID.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    instance_id

    Yes

    Definition

    Instance ID.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

Request

Table 2 Parameters

Parameter

Mandatory

Type

Description

restore_time

Yes

Long

Definition

Restoration timestamp, in milliseconds.

Constraints

N/A

Range

N/A

Default Value

N/A

restore_tables

Yes

Array of objects

Definition

Table information. For details, see Table 3.

Constraints

N/A

is_fast_restore

No

Boolean

Definition

Whether to use fast restoration.

Constraints

Range

  • true: Fast restoration is used.
  • false: Fast restoration is not used.

Default Value

N/A

Table 3 Data structure of the restore_tables field

Parameter

Mandatory

Type

Description

database

Yes

String

Definition

Database name.

Constraints

N/A

Range

N/A

Default Value

N/A

tables

Yes

Array of objects

Definition

Table information. For details, see Table 4.

Constraints

N/A

Table 4 Data structure of the tables field

Parameter

Mandatory

Type

Description

old_name

Yes

String

Definition

Original table name before the restoration.

Constraints

N/A

Range

N/A

Default Value

N/A

new_name

Yes

String

Definition

Table name after the restoration.

Constraints

N/A

Range

N/A

Default Value

N/A

Example Request

Restore table data to a specific point in time.
POST https://{endpoint}/v3.1/054e292c9880d4992f02c0196d3ea468/instances/d8e6ca5a624745bcb546a227aa3ae1cfin01/restore/tables 

{ 
   "restore_time" : 1689859468000, 
   "restore_tables" : [ { 
     "database" : "database", 
     "tables" : [ { 
       "old_name" : "oldTable", 
       "new_name" : "newTable" 
     } ] 
   } ] 
 }

Response

  • Normal response
    Table 5 Response body parameters

    Parameter

    Type

    Description

    job_id

    String

    Definition

    Task ID.

    Range

    N/A

  • Example normal response
    { 
      "job_id" : "04efe8e2-9255-44ae-a98b-d87cae411890" 
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.