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

PropertyTypeRequiredEditableDescriptionConstraint
IsOnlineDBBooleanYesNoSpecifies whether to make the restored database available for user access in the cloud. Valid values:
  • true
  • false
Note If the database version is SQL Server 2008 R2, you must set the value to true.
DBInstanceIdStringYesNoThe ID of the instance. None.
OssObjectPositionsStringNoNoThe information about the backup file in the OSS bucket. The value consists of the following parts that are separated by colons (:):
  • OSS endpoint: oss-ap-southeast-1.aliyuncs.com.
  • OSS bucket name: rdsmssqlsingapore.
  • Key of the backup file in the OSS bucket: autotest_2008R2_TestMigration_FULL.bak.
Note
  • This property is optional if the database version is SQL Server 2008 R2.
  • This property is required if the database version is later than SQL Server 2008 R2.

Example: oss-ap-southeast-1.aliyuncs.com:rdsmssqlsingapore:autotest_2008R2_TestMigration_FULL.bak.

CheckDBModeStringNoNoThe consistency check method for the database. Default value: AsyncExecuteDBCheck. Valid values:
  • SyncExecuteDBCheck: synchronous database check.
  • AsyncExecuteDBCheck: asynchronous database check.

    This check method is supported for the database whose version is SQL Server 2008 R2.

Note This property takes effect only when the IsOnlineDB property is set to true.
BackupModeStringYesNoThe type of the migration task. Valid values:
  • FULL: restores data by using full backup files.
  • UPDF: restores data by using incremental or log backup files.
DBNameStringYesNoThe name of the destination database. None.
OSSUrlsStringNoNoThe 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

  • YAML 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                    
  • 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"
            ]
          }
        }
      }
    }