The online migration tool supports migrating Tencent Cloud CVM data across accounts. You can use cross-account data migration to move data between CVMs under two different accounts.
Click here to obtain the compressed migration tool package.
2. 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 a connection between them through VPC peering connections, VPN connections, Cloud Connect Network, or Direct Connect before using the private network mode for migration.
3. Backing up Data
You can create a snapshot or use other methods to back up data.
4. Checking Before the Migration
Before migration, check the following items of the source server and destination CVM:
- Storage: cloud disks (including system disks and data disks) of the destination CVM must have sufficient storage capacity to store data from the source server.
- Security group: 443 and 80 ports must be open to the Internet in a security group.
- Bandwidth: we recommend that you increase inbound and outbound bandwidth for faster migration. The traffic consumed during migration will be approximately equal to the data volume. If needed, change your network billing method in advance.
- Operating system: we recommend that you use the same operating system on both the source server and the destination CVM. Different operating systems will result in inconsistency between the image to be created 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 destination.
|Linux source server|
- Check and install Virtio. For more information, see Checking Virtio Drivers in Linux.
- Check whether rsync is installed by running
which rsync for verification.
- Check whether SELinux is enabled. If yes, disable it.
- Ensure the current system time is correct, because the Tencent Cloud API will use the UNIX timestamp to check the generated token after receiving a migration request.
- You can use tool commands to automatically check the source server, for example,
sudo ./go2tencentcloud_x64 --check.
- By default, the go2tencentcloud migration tool automatically performs checks upon launch. To skip checks and perform forced migration, configure
true in the client.json file.
- For more information on the go2tencentcloud migration tool, see Migration Tool.
5. Starting the Migration
- (Optional) Establish a connection between the source server and the destination CVM.
- Configure the “user.json” file.
The “user.json” file is used to configure the source server and the destination CVM. It contains the following configuration items:
- The API keys of your account, that is,
SecretKey. For more information, see Access Key.
- The region of the destination CVM. For more information on supported regions, see Regions and Availability Zones.
- The instance ID of the destination CVM, which can be checked on the Instances page.
- (Optional) The data disk configuration of the source server.
- Configure the “client.json” file.
The “client.json” file is used to configure the migration scenario and other parameters. You need to configure the
Client.Net.Mode parameter in the “client.json” file, regardless of which migration modes or scenarios you select.
- (Optional) Exclude files and directories on the source 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.
Take cross-account migration in private network mode: scenario 1 as an example:
- On a CVM that has access to the public network, execute the following command to run the tool for migration stage 1.
Stage 1 is finished and please run next stage at source machine. is prompted, stage 1 has been completed.
- After the previous step (stage 1) is completed, copy the entire tool directory in stage 1 to the source server to be migrated, and then run the tool for migration stage 2.
Execute the following command to run the tool for migration stage 2.
Stage 2 is finished and please run next stage at gateway machine. is prompted, stage 2 has been completed.
- After the previous step (stage 2) is completed, copy the entire tool directory in stage 2 to the source server in stage 1, and then run the tool for migration stage 3.
Execute the following command to run the tool for migration stage 3.
Migrate successfully. is prompted, the entire migration task has been completed successfully.