Imports the full backup file of a self-managed MySQL database into an ApsaraDB RDS for MySQL instance.
Operation Description
Before you call this operation, make sure that the following requirements are met:
- The self-managed MySQL database runs MySQL 5.7 and is backed up by using XtraBackup. The name of the backup file ends with
_qp.xb
. For more information, see Migrate the data of a self-managed MySQL 5.7 instance to the cloud. - The full backup file of the self-managed MySQL database is uploaded to an Object Storage Service (OSS) bucket in the region of the ApsaraDB RDS for MySQL instance. For more information, see Migrate the data of a self-managed MySQL 5.7 instance to the cloud.
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
rds:ImportUserBackupFile | Read |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list. Note
| cn-hangzhou |
EngineVersion | string | Yes | The version of the database engine that is run on the self-managed MySQL database and ApsaraDB RDS for MySQL instance. Set the value to 5.7. | 5.7 |
BucketRegion | string | Yes | The region ID of the OSS bucket where the full backup file of the self-managed MySQL database is located. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
BackupFile | string | Yes | A JSON array that consists of the information about the full backup file stored as an object in an OSS bucket. Example: The JSON array contains the following fields:
| {"Bucket":"test", "Object":"test/test_db_employees.xb","Location":"ap-southeast-1"} |
Comment | string | No | The description of the full backup file. | BackupTest |
RestoreSize | integer | No | The amount of storage that is required to restore the data of the full backup file. Unit: GB. Note
| 20 |
Retention | integer | No | The retention period of the full backup file. Unit: days. Valid values: any non-zero positive integer. | 30 |
ZoneId | string | No | The ID of the zone. You can call the DescribeRegions operation to query the ID of the zone. Note
| cn-hangzhou-b |
Response parameters
Examples
Sample success responses
JSON
format
{
"Status": true,
"RequestId": "A140DD14-DCC9-4548-9C72-52A49A58A310",
"BackupId": "b-n8tpg24c6i0v********"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidOssBackupFile.InvalidFile | The specified OSS backup file is invalid. | The operation failed. The backup file cannot be found in the OSS bucket. |
400 | OperationDenied.Product | The product code is not supported. | The product code is not supported. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||
---|---|---|---|---|---|---|---|---|
2022-06-23 | API Description Update,The error codes of the API operation change. | |||||||
|