ALIYUN::RDS::MigrateTask is used to create a migration task to restore backup files from an Object Storage Service (OSS) bucket to an ApsaraDB RDS for SQL Server instance.
Syntax
{
"Type": "ALIYUN::RDS::MigrateTask",
"Properties": {
"IsOnlineDB": Boolean,
"DBInstanceId": String,
"OssObjectPositions": String,
"CheckDBMode": String,
"BackupMode": String,
"DBName": String,
"OSSUrls": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
IsOnlineDB | Boolean | Yes | No | Specifies whether to make the restored database available for user access in the cloud. | Valid values:
Note If the database version is SQL Server 2008 R2, you must set the value to true. |
DBInstanceId | String | Yes | No | The ID of the instance. | None. |
OssObjectPositions | String | No | No | The information about the backup file in the OSS bucket. | The value consists of the following parts that are separated by colons (:):
Note
Example: |
CheckDBMode | String | No | No | The consistency check method for the database. | Default value: AsyncExecuteDBCheck. Valid values:
Note This property takes effect only when the IsOnlineDB property is set to true. |
BackupMode | String | Yes | No | The type of 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 the OSS bucket. The URL must be encoded. | If you specify multiple URLs, separate the URLs with vertical bars (|) and then encode the URLs. Note This property is required when the database version is SQL Server 2008 R2. |
Return values
Fn::GetAtt
MigrateTaskId: the ID of the migration task.
DBName: the name of the destination database.
Examples
JSON
format{ "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" ] } } } }