You need to enable JavaScript to run this app.
RDS for MySQL

RDS for MySQL

Copy page
Download PDF
Backup and recovery
RestoreToExistedInstance
Copy page
Download PDF
RestoreToExistedInstance

Call the RestoreToExistedInstance API to restore data to an existing database instance.

Request type

Asynchronous request.

Request parameters

Name
Type
Required
Example
Description
SourceDBInstanceId
String
Yes
mysql-e7fda57b****
The ID of the source instance to which the backup data belongs.
BackupId
String
No
effc1de81b8a4c8e886fef2c3e06****

Backup file ID. You can query the BackupID by calling DescribeBackups.

tip

  • Either this parameter or the RestoreTime parameter must be specified.
  • Only physical backups are supported for restoring to the original instance.
RestoreTime
String
No
2022-01-01T10:10:10Z

Any point-in-time within the backup retention period of the source instance, in the format of yyyy-MM-ddTHH:mm:ssZ (UTC time). You can query whether this point-in-time supports restoration by calling DescribeRecoverableTime.

tip

Either this parameter or the BackupId parameter must be specified.

RestoreType
String
No
TABLE_LEVEL

Indicates the type of recovery. Currently, only the value of TABLE_LEVEL is supported, that is, library and table-level recovery.

tip

This field will be deprecated soon.

TableMeta
Object[]
No
[ { "DBName" : "db", "NewDBName" : "db_new", "Table": [ { "TableName" : "table", "NewTableName" : "table_new" } ] } ]
Specifies the database and table information to be restored during database/table-level recovery.
This parameter is required when RestoreType is TABLE_LEVEL.
DBName
String
Yes
testdb1
Specify the recovered DB.
NewDBName
String
No
testdb2

New DB Name. The naming rules are as follows:

  • The name is unique.
  • The length is 2 to 64 characters.
  • It starts with a letter and ends with a letter or a number.
  • It consists of letters, numbers, underscores (_), or hyphens (-).
  • Certain reserved words cannot be used, including root, admin, etc. For the list of disabled reserved words, please refer to List of Disabled Words.

tip

If only restoring the table, its value can be the same as DBName.

Table
Object[]
No
[ { "TableName" : "table1", "NewTableName" : "table2" } ]
Specify the tables in the restored DB. When Table is empty, the entire database is restored.
TableName
String
Yes
table1
Specify the table to be restored.
NewTableName
String
No
table2

The new name of the table. The naming rules are as follows:

  • The name is unique.
  • The length is 2 to 64 characters.
  • It starts with a letter and ends with a letter or a number.
  • It consists of letters, numbers, underscores (_), or hyphens (-).
  • Certain reserved words cannot be used, including root, admin, etc. For the list of disabled reserved words, please refer to the list of disabled words.
FastMode
Boolean
No
true

Whether to enable fast recovery mode. Valid values:

  • true: Yes.
  • false: No. Default value.

Response parameters

null

Sample request

POST /?Action=RestoreToExistedInstance&Version=2022-01-01 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: rds-mysql.cn-beijing.volcengineapi.com
X-Date: 20211202T101010Z
Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_mysql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458****
{
    "SourceDBInstanceId": "mysql-c8cfcccd****",
    "BackupId": "effc1de81b8a4c8e886fef2c3e06****",
    "RestoreType": "TABLE_LEVEL",
    "TableMeta": [
        {
            "DBName": "db",
            "NewDBName": "db_new",
            "Table": []
        }
    ]
}

Sample response

{
    "ResponseMetadata": {
        "RequestId": "2023120412152879A7CDBA12D1A212B90D",
        "Action": "RestoreToExistedInstance",
        "Version": "2022-01-01",
        "Service": "rds_mysql",
        "Region": "cn-beijing"
    },
    "Result": null
}

Error codes

For more details, refer to Error codes.

Last updated: 2025.07.07 15:52:02