Help Center> Relational Database Service> API Reference> API v3.1 (Recommended)> Restoring Tables to a Specified Point in Time (RDS for MySQL)
Updated on 2024-06-07 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 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 available to RDS for MySQL only.

URI

  • URI format

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

  • Parameter description
    Table 1 Parameters

    Parameter

    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

    Instance ID.

Request

Table 2 Parameters

Parameter

Mandatory

Type

Description

restore_time

Yes

Long

Restoration timestamp.

restore_tables

Yes

Array of objects

Table 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 restore_tables field data structure description

Parameter

Mandatory

Type

Description

database

Yes

String

Database name.

tables

Yes

Array of objects

Table information. For details, see Table 4.

Table 4 tables field data structure description

Parameter

Mandatory

Type

Description

old_name

Yes

String

Original table name before the restoration.

new_name

Yes

String

Table name after the restoration.

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

    Task ID.

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