Restores PolarDB databases and tables.

Note Only PolarDB for MySQL 5.6 clusters support the database and table restoration feature. For more information, see Restore databases and tables.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String No RestoreTable

The operation that you want to perform. Set the value to RestoreTable.

DBClusterId String Yes pc-bp***************

The ID of the cluster.

Note You can call the DescribeDBClusters operation to query the details of all clusters under your account.
TableMeta String Yes [ { "tables":[ { "name":"testtb", "type":"table", "newname":"testtb_restore" } ], "name":"testdb", "type":"db", "newname":"testdb_restore" } ]

The JSON string that contains the information about the database and the table that you want to restore. All values of the database and table information are of the string type.

Example: [ { "tables":[ { "name":"testtb", "type":"table", "newname":"testtb_restore" } ], "name":"testdb", "type":"db", "newname":"testdb_restore" } ].

Note You can call the DescribeMetaList operation to query the names and details of databases and tables that can be restored and enter their information into the corresponding locations in the preceding example.
BackupId String No 111111

The ID of the backup set.

Note You must specify this parameter if you need to restore a database or a table by using a backup set. You can call the DescribeBackups operation to query the ID of the backup set.
RestoreTime String No 2020-10-04T01:40:00Z

The point in time for the restoration. Specify the time in the YYYY-MM-DDThh:mmZ format. The time must be in UTC.

Note
  • You must specify this parameter if you need to restore the database or the table to a point in time.
  • You can restore the database or the table to a point in time within only the last seven days.

Response parameters

Parameter Type Example Description
RequestId String 0C47508C-9DC8-455B-985E-2F2FA8******

The ID of the request.

Examples

Sample requests

http(s)://polardb.aliyuncs.com/? Action=RestoreTable
&DBClusterId=pc-bp***************
&<Common request parameters>

Sample success responses

XML format

<RestoreTableResponse>  
	    <RequestId>0C47508C-9DC8-455B-985E-2F2FA8******</RequestId>
</RestoreTableResponse>

JSON format

{
        "RequestId": "0C47508C-9DC8-455B-985E-2F2FA8******"
}

Error codes

For a list of error codes, visit the API Error Center.