You can call this operation to restore the backup files in OSS to the RDS instances.

Debugging

You can use API Explorer to perform debugging. API Explorer allows you to perform various operations to simplify API usage. For example, you can retrieve APIs, call APIs, and dynamically generate SDK example code.

Request parameters

Parameter Type Required? Example Description
Action String Yes CreateMigrateTask

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

DBInstanceId String Yes rm-uf6wjk5xxxxxxx

The ID of the instance.

DBName String Yes testDB

The name of the target database.

BackupMode String Yes FULL

The type of the migration task. Valid values:

  • FULL: indicates that full backup files are used to restore the data.
  • UPDF: indicates that incremental files or log files are used to restore the data.
IsOnlineDB String Yes True

Indicates whether to publish the restored database for user access. Valid values:

  • True.
  • False.
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:

  • SyncExecuteDBCheck.
  • AsyncExecuteDBCheck.

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 components of OSS.

The values consist of three segments which are separated by colons (:):

  • The endpoint address of OSS: oss-ap-southeast-1.aliyuncs.com.
  • The bucket name of OSS: rdsmssqlsingapore.
  • The key of the backup file in OSS: autotest_2008R2_TestMigration_FULL.bak.
Note
  • This parameter is optional for the instances of SQL Server 2008 R2.
  • This parameter is required for the instances of the version later than SQL Server 2008 R2.
OSSUrls String No check_cdn_oss.sh www.xxxxxx.mobi

The shared OSS URL of the backup file. The URL must be encoded.

When multiple addresses exist, separate them with vertical bars (|) and encode them before parameters are entered.

Note This parameter must be entered for SQL Server 2008 R2 instances.
MigrateTaskId String No None.

The ID of the migration task. Valid values:

  • When BackupMode is set to FULL, this value is null ( compatible with RDS for SQL Server 2008 R2).
  • When BackupMode is set to UPDF, this value is the ID of the corresponding full task.

Default value: FULL.

Note
  • When IsOnlineDB is set to True, BackupMode must be set to FULL.
  • When IsOnlineDB is set to False, BackupMode must be set to UPDF.
AccessKeyId String No LTAIKw8gxxxx

The AccessKey ID issued by Alibaba Cloud for users to access services.

Response parameters

Parameter Type Example Description
BackupMode String FULL

The type of the migration task. Valid values:

  • FULL: indicates that full backup files are used to restore the data.
  • UPDF: indicates that incremental files or log files are used to restore the data.
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>

Successful response examples

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",
	"RequestId":"5F2B3757-BD56-40B3-B5F2-FCDD9FA0E2E2",
	"DBInstanceId":"rm-bp178grbxxxxxxx",
	"BackupMode":"UPDF",
	"TaskId":"128301751",
	"DBName":"testdb"
}

Error codes

Http status code 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.

View error codes