All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::RDS::MigrateTask

更新時間:Jun 16, 2026

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:
  • true: Brings the database online.
  • false: Does not bring the database online.
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 (:).
  • OSS endpoint: oss-ap-southeast-1.aliyuncs.com.
  • OSS bucket name: rdsmssqlsingapore.
  • The key of the backup file in OSS: autotest_2008R2_TestMigration_FULL.bak.
Note
  • This parameter is optional if the database is SQL Server 2008 R2.
  • This parameter is required if the database is a version later than SQL Server 2008 R2.

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

CheckDBMode String No No The consistency check method used after the database is brought online. Valid values:
  • SyncExecuteDBCheck: Performs a synchronous DB check.
  • AsyncExecuteDBCheck (Default): Performs an asynchronous DB check.

    Compatible with SQL Server 2008 R2.

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:
  • FULL: Restores data from a full backup file.
  • UPDF: Restores incremental data from an incremental or log file.
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

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