Creates a migration task to restore backup files from an Object Storage Service (OSS) bucket to an ApsaraDB RDS for SQL Server instance.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateMigrateTask |
The operation that you want to perform. Set the value to CreateMigrateTask. |
BackupMode | String | Yes | FULL |
The type of the migration task. Valid values:
|
DBInstanceId | String | Yes | rm-uf6wjk5xxxxxxx |
The ID of the instance. |
DBName | String | Yes | testDB |
The name of the database that you want to restore. |
IsOnlineDB | String | Yes | True |
Specifies whether to bring the restored database online for user access. Valid values:
Note The value for SQL Server 2008 R2 is fixed to True.
|
CheckDBMode | String | No | AsyncExecuteDBCheck |
The consistency check method of the database. Valid values:
Default value: AsyncExecuteDBCheck (compatible with SQL Server 2008 R2). Note When IsOnlineDB is set to True, this value is valid.
|
OssObjectPositions | String | No | oss-ap-southeast-1.aliyuncs.com:rdsmssqlsingapore:autotest_2008R2_TestMigration_FULL.bak |
The information of the backup file in the OSS bucket. The values consist of three parts that are separated by colons (:):
Note
|
OSSUrls | String | No | check_cdn_oss.sh www.xxxxxx.mobi |
The shared URL of the backup file in the OSS bucket. The URL must be encoded. If you specify multiple URLs, separate them with vertical bars (|) and then encode them. Note This parameter must be entered for instances that run SQL Server 2008 R2.
|
MigrateTaskId | String | No | None |
The ID of the migration task. Valid values:
Default value: FULL. Note
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
BackupMode | String | FULL |
The type of the migration task. Valid values:
|
DBInstanceId | String | rm-uf6wjk5xxxxx |
The ID of the instance. |
DBName | String | test02 |
The name of the database. |
MigrateTaskId | String | 564563256 |
The ID of the migration task. |
RequestId | String | 866F5EB8-4650-4061-87F0-379F6F968BCE |
The ID of the request. |
TaskId | String | 5451225 |
The ID of the task. |
Examples
Sample requests
http(s)://rds.aliyuncs.com/? Action=CreateMigrateTask
&DBInstanceId=rm-uf6wjk5xxxxxxx
&DBName=testDB
&BackupMode=FULL
&IsOnlineDB=True
&OssObjectPositions=oss-ap-southeast-1.aliyuncs.com:rdsmssqlsingapore:autotest_2008R2_TestMigration_FULL.bak
&<Common request parameters>
Sample success responses
XML
format
<CreateMigrateTaskResponse>
<MigrateTaskId>135847</MigrateTaskId>
<DBInstanceId>rm-bp178grbxxxxxxx</DBInstanceId>
<RequestId>5F2B3757-BD56-40B3-B5F2-FCDD9FA0E2E2</RequestId>
<BackupMode>UPDF</BackupMode>
<TaskId>128301751</TaskId>
<DBName>test02</DBName>
</CreateMigrateTaskResponse>
JSON
format
{
"MigrateTaskId": "135847",
"DBInstanceId": "rm-bp178grbxxxxxxx",
"RequestId": "5F2B3757-BD56-40B3-B5F2-FCDD9FA0E2E2",
"BackupMode": "UPDF",
"TaskId": "128301751",
"DBName": "test02"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | InvalidDBName | The instance does not have the specified DB name. | The error message returned when the specified database name does not exist. |
For a list of error codes, visit the API Error Center.