If you want to migrate data from an Elastic Compute Service (ECS) instance that belong to one Alibaba Cloud account or region to an ECS instance that belong to another Alibaba Cloud account or region due to insufficient resource inventory, cost optimization, disaster recovery, and disk capacity scale-down, you can use Server Migration Center (SMC).
You can also use the image copy and image sharing features of ECS to migrate data between ECS instances that belong to the same Alibaba Cloud account or different Alibaba Cloud accounts. For more information, see Copy a custom image.
Scenarios
You can migrate data between ECS instances in the following scenarios:
Scenario 1: Migrate data from an ECS instance in one account to an ECS instance in another Account
In this scenario, you can migrate data between ECS instances that belong to different Alibaba Cloud accounts and reside in the same region or different regions.
Scenario 2: Migrate data between ECS instances that belong to the same Alibaba Cloud account
In this scenario, you can migrate data between ECS instances that belong to the same Alibaba Cloud account and reside in different regions or zones.
If you have not purchased a destination ECS instance, you must create an image based on the migration source, and then create a new ECS instance based on the image as the destination ECS instance in the destination region or zone.
If you have purchased a destination ECS instance, you can migrate data from the migration source to the destination ECS instance. In this case, the storage and operating system of the migration source must be the same as the storage and operating system of the destination ECS instance.
Scenario 3: Scale down disks of an ECS instance
System disks and data disks of ECS instances cannot be scaled down. If you want to scale down a disk of an ECS instance, you can migrate data from the migration source to a custom image or destination ECS instance that has smaller disk capacity. The migration source and destination ECS instance can belong to the same Alibaba Cloud account or different Alibaba Cloud accounts. For more information, see Shrink disks.
The disk size of a Linux server can only be modified during server migration when block replication is disabled.
The disk needs to be compressed before migrating the Windows server.
Impacts
Before you migrate data, you must understand the impacts caused by migration, as shown in the following table.
Item | Description |
Data directory | During migration, SMC can automatically generate a disk partition structure that is as consistent as possible with that of the source server based on the disk partition structure of the source server. You can adjust the partition structure of the destination disk as needed, including the partition size and location sequence, transfer mode, and whether to enable LVM. By default, all the disks of the server are migrated, but the following conditions still need to be considered:
For more information, see Adjust the disk partition structure as needed. |
Intermediate instance | Do not perform operations on the intermediate instance during the migration. To run a migration job, SMC creates a temporary intermediate instance named Note When you migrate a server to an ECS instance, the ECS instance serves as the intermediate instance. |
IP address | After the migration, the IP address of your server is changed. If your business involves IP address configuration, change the IP address after the source server is migrated.
|
Underlying hardware | After the migration, the underlying hardware may change, and the application licenses that are associated with the underlying hardware may become invalid. Perform checks as needed. |
Before you begin
The preparations for server migration are completed. For more information, see Before you begin.
If you want to use the same public IP address for the migration source and destination ECS instance and the migration source uses a fixed public IP address, you can convert the fixed public IP address to an EIP before you migrate data to retain the public IP address. After you migrate data, you can disassociate the EIP from the migration source and then associate the EIP with the destination ECS instance. For more information, see Convert the public IP address of an ECS instance in a VPC to an EIP and Associate or disassociate an EIP.
NoteIf the migration source uses an EIP, you can disassociate the EIP from the migration source after you migrate data and then associate the EIP with the destination ECS instance. For more information, see Associate or disassociate an EIP.
If you have purchased an destination ECS instance, make sure that the following requirements are met:
Important data on the destination ECS instance is backed up to an image, snapshot, or storage device other than the destination instance.
The operating system of the destination ECS instance is the same as the operating system of the migration source.
The number of data disks attached to the destination ECS instance is greater than or equal to the number of data disks attached to the migration source. Otherwise, the data on the data disks of the migration source cannot be migrated to the destination ECS instance. In this case, you must attach more data disks to the destination ECS instance. For more information, see Attach a data disk.
The capacity of the system disk and data disks attached to the destination ECS instance is greater than or equal to the capacity of the system disk and data disks attached to the migration source. If you want to scale down the system disk and data disks attached to the migration source, make sure that the capacity of the system disk and data disks attached to the destination ECS instance is greater than or equal to the capacity actually consumed by the data on the system disk and data disks attached to the migration source. Otherwise, data on the migration source cannot be fully migrated to the destination ECS instance. In this case, you must scale up the system disk and data disks attached to the destination ECS instance. For more information about how to scale up a disk, see Overview.
Procedure
Step 2: Create and start a migration job
Verify the migration result
Clear resources
What to do next
If you need to migrate incremental data multiple times, you can initiate incremental data migration multiple times at custom intervals after the first full migration is complete. This synchronizes the incremental data generated by the source server to Alibaba Cloud and reduces the suspension time and delivery time of the services provided by the source server. For more information, see Migrate incremental data from a server.