Restores backup files from Object Storage Service (OSS) to an ApsaraDB RDS for SQL Server instance for data migration to the cloud.
Syntax
{
"Type": "ALIYUN::RDS::MigrateTask",
"Properties": {
"IsOnlineDB": Boolean,
"DBInstanceId": String,
"OssObjectPositions": String,
"CheckDBMode": String,
"BackupMode": String,
"DBName": String,
"OSSUrls": String
}
}
Properties
| Property | Type | Required | Updatable | Description | Constraints |
| IsOnlineDB | Boolean | Yes | No | Specifies whether to bring the restored database online. | Valid values:
Note If the database is SQL Server 2008 R2, this parameter is always set to true. |
| DBInstanceId | String | Yes | No | The instance ID. | None |
| OssObjectPositions | String | No | No | The location of the backup file in OSS. | The value consists of three parts separated by colons (:).
Note
Example: |
| CheckDBMode | String | No | No | The consistency check method used after the database is brought online. | Valid values:
Note This parameter is valid only when the IsOnlineDB parameter is set to true. |
| BackupMode | String | Yes | No | The backup mode for the migration task. | Valid values:
|
| DBName | String | Yes | No | The name of the destination database. | None |
| OSSUrls | String | No | No | The shared URL of the backup file in OSS. The URL must be URL-encoded. | If you have multiple URLs, separate them with vertical bars (|) and then URL-encode the entire string. Note This parameter is required if the database is SQL Server 2008 R2. |
Return values
Fn::GetAtt
MigrateTaskId: The ID of the migration task.
DBName: The name of the destination database.
Examples
-
JSONformat{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "RdsId": { "Type": "String", "AssociationProperty": "ALIYUN::RDS::Instance::InstanceId" }, "DBName": { "Type": "String", "Description": "The name of the database that you want to restore." } }, "Resources": { "MigrateTask": { "Type": "ALIYUN::RDS::MigrateTask", "Properties": { "IsOnlineDB": true, "DBInstanceId": { "Ref": "RdsId" }, "BackupMode": "FULL", "DBName": { "Ref": "DBName" } } } }, "Outputs": { "MigrateTaskId": { "Description": "The ID of the migrate task.", "Value": { "Fn::GetAtt": [ "MigrateTask", "MigrateTaskId" ] } } } }