Cross-region data migration moves the data on a CVM in an availability zone in one region to a destination CVM in an availability zone of another region. It can also mean the migration of data between CVMs in different availability zones within the same region.
Click here to obtain the compressed migration tool package.
Choosing a migration mode based on the network environment
Choose the appropriate migration mode according to the network environments of your source servers and destination CVMs.
Currently, the migration tool supports the default mode and the private network mode. The private network mode applies to three scenarios. Each migration mode or scenario has different network requirements for source servers and destination CVMs. If both source servers and destination CVMs can access the public network, you can use the default mode for migration. If source servers or destination CVMs cannot directly access the public network, you need to establish connections through VPC Peering Connection, VPN Connection, Cloud Connect Network, or Direct Connect before using the private network mode for migration.
You can back up your data by creating snapshots.
Checking before migrating
Before migrating, check the following items for source servers and destination CVMs respectively:
- Storage: The cloud disks of the destination CVM, including system disks and data disks. Verify that they have sufficient storage to store the data from the source server.
- Security group: Ports 443 and 80 must be open in a security group.
- Bandwidth setting: We recommend that you increase bandwidth for faster migration. The traffic consumed during migration will be approximately equal to the data volume. Change your networking billing method in advance if needed.
- Operating system: We recommend that the destination CVM and the source server use the same operating system. Different operating systems will result in inconsistency between the image that will be created later and the actual operating system. For example, when migrating a source server with the CentOS 7 system installed, choose a CVM with the CentOS 7 system installed as the migration destination.
|Linux source server|
- Check for and install Virtio. For more information, see Checking Virtio Drivers in Linux.
- Check whether rsync and grub2-install (or grub-install) are installed.
- Check whether SELinux is enabled. Disable it if enabled.
- When a migration request is sent to Tencent Cloud API, the API uses the current UNIX time to check against the generated token. In this case, ensure that the current system time is correct.
- You can use tool commands to automate the checking of source servers, for example,
sudo ./go2tencentcloud_x64 --check.
- By default, the go2tencentcloud migration tool automatically performs checking when it starts to run. If you want to skip the check and force migration, configure the value of the
Client.Extra.IgnoreCheck field in the client.json file to
- (Optional) Establish a connection between the source server and the destination CVM.
- Configure the user.json file.
The user.json file is for configuring the source server and the destination CVM. It contains the following configuration items:
- The access key pair of your account API, that is, SecretId and SecretKey. For more information, see Access Keys.
- The region and instance ID of the target CVM.
- (Optional) The data disk configuration of the source server.
- Configure the client.json file.
The client.json file is for configuring the migration mode and other migration configuration items. You need to configure the
Client.Net.Mode parameter in the client.json file despite migration modes or scenarios.
- (Optional) Remove files and directories on the server that do not need to be migrated.
Edit the rsync_excludes_linux.txt file on the Linux source server to remove files and directories that do not need to be migrated.
- Run the tool.
For example, on a 64-bit Linux source server, run the following command with root permissions to run the tool.