If you need to migrate ECS instances from one account or region to another due to reasons such as insufficient resource inventory, cost optimization, disaster recovery, and instance disk scaling, you can use SMC to efficiently migrate ECS instances.
You can also use the image copy and image share features of ECS to migrate ECS instances across accounts and within the same account. For more information, see Copy a custom image.
Scenarios
You can migrate servers between ECS instances in the following scenarios:
Scenario 1: Migrate an instance from Account A to Account B
This scenario applies to migration between ECS instances across Alibaba Cloud accounts, in the same region, or across regions.
Scenario 2: Migrate data between ECS instances under the same account
This scenario applies to the migration of ECS instances within the same Alibaba Cloud account and across regions or zones.
If you have not purchased an ECS instance, convert the existing source server to an ECS image, and then manually use the image to create a new ECS instance for migration.
If you have purchased an ECS instance and migrate the source server to the purchased ECS instance, the storage and operating system of the source server and the purchased ECS instance must be adapted.
Scenario 3: ECS instance disk scale-in
Currently, ECS instances do not support system disk or data disk scale-in. If you want to scale in or out disks, you can migrate your ECS instances to a custom image or target instance with smaller disks when you migrate ECS instances across different accounts or under the same account. For more information, see Shrink a disk.
Impacts
Before you migrate data, you must take note of the following items, as shown in the following table.
Item | Description |
Migrate Data Directory | During migration, SMC can obtain the disk partition structure of the migration source and automatically generate the destination disk partition when creating a migration task. This accelerates data transmission during the migration. WindowsBy default, only system disk partition C (including other directories mounted on disk C) is migrated to generate a system disk partition. If you want to migrate other partitions, such as disk D, you must select and configure the data disk when you create a migration task. Linux
|
Intermediate Instance | Do not interfere with intermediate instances. To run a migration task, SMC creates a temporary intermediate instance named Note If you select a destination instance, the destination instance is an intermediate instance. |
IP Address | After the migration, the IP address will change. If the service involves the configuration of the IP address, modify it after the migration.
|
Underlying hardware | After the migration, the underlying hardware of the system changes, which may invalidate the licenses of some applications bound to the hardware. |
Preparations
The preparations for server migration are completed. For more information, see Prepare for migration.
If you want to keep the public IP address unchanged and the source ECS instance uses a fixed public IP address, you can convert the public IP address to an Elastic IP Address (EIP) to retain the public IP address, disassociate the EIP from the source ECS instance, and then associate the EIP with the migrated ECS instance. For more information, see Convert the public IP address of a Virtual Private Cloud ECS instance to Elastic IP Address and Bind and unbind Elastic IP Address.
NoteIf the source ECS instance uses an Elastic IP Address (EIP), after the migration, the source ECS instance first disbinds the EIP and then binds the EIP to the migrated ECS instance. For information about how to associate an EIP with an instance, see Associate or disassociate an EIP.
If you want to migrate the source ECS instance to another ECS instance, make sure that the following requirements are met:
You need to back up all important data in the instance to an image, snapshot, or device other than the instance.
The operating system of the destination ECS instance is the same as that of the source server.
The number of data disks attached to the destination ECS instance is greater than or equal to that of data disks attached to the source server. Otherwise, the disk data of the source server cannot be migrated to the destination ECS instance. In this case, you must attach more data disks to the ECS instance. For more information, see Attach a data disk.
The capacity of the system disks and data disks attached to the ECS instance is larger than or equal to that of the system disks and data disks attached to the source server. If you want to shrink the system disks and data disks attached to the source server, make sure that the capacity of the system disks and data disks attached to the destination ECS instance is larger than or equal to the size of the data on the system disks and data disks attached to the source server. Otherwise, data of the source server cannot be fully migrated to the destination ECS instance. In this case, you must scale up the data disks and system disks. For more information about how to resize a cloud disk, see Overview.
Procedure
Step 2: Create and start a migration task
Verify the migration results
Clean up resources
References
If you need to migrate incremental data multiple times, you can perform multiple incremental migrations at a custom interval after the first full migration is complete. This synchronizes the incremental data generated by the source server to Alibaba Cloud and reduces the service suspension time and delivery time of the source server. For more information, see Migrate incremental data from a source server.