Migrating Tencent Cloud CVM Data Across Availability Zones

Last updated: 2020-07-10 12:07:57

    You can use the cross-region data migration to move data on a CVM in an availability zone in one region to a destination CVM in an availability zone of another region, or move data between CVMs in different availability zones within the same region.

    1. Obtaining the Migration Tool

    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 connection, 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 Migrating

    Before migrating, check the following on source servers and destination CVMs respectively:

    Destination CVM
    1. Storage: the storage space in its cloud disks (including system disks and data disks) is sufficient to store the data from the source server.
    2. Security group: the 443 and 80 ports must be open to Internet in a security group.
    3. 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. Change your network billing method in advance if needed.
    4. Operating system: we recommend using the same operating system on both the source server and the destination CVM. 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
    1. Check for and install virtIO. For more information, see Checking Virtio Drivers in Linux.
    2. Check whether rsync and grub2-install (or grub-install) are installed.
    3. Check whether SELinux is enabled. Disable it if enabled.
    4. Ensure the current system time is correct, because the Tencent Cloud API will use the UNIX timestamp to check against 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.
    • The “go2tencentcloud” migration tool automatically checks by default when it starts running. 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 true.

    5. Starting the Migration

    1. (Optional) Establish a connection between the source server and the destination CVM.
    2. 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, SecretId and SecretKey. For more information, see Access Key.
      • The region and instance ID of the destination CVM.
      • (Optional) The data disk configuration of the source server.
    3. Configure the “client.json” file.
      The “client.json” file is used to configure the migration mode and other parameters. You need to configure the Client.Net.Mode parameter in the “client.json” file, regardless of the migration modes or scenarios.
    4. (Optional) Exclude files and directories on the source server from the migration.
      Edit the “rsync_excludes_linux.txt” file on the Linux source server to remove files and directories that do not need to be migrated.
    5. Run the tool.
      For example, on a 64-bit Linux source server, execute the following command as root to run the tool.
      sudo ./go2tencentcloud_x64
      For example, you are using the private network mode: scenario 2 for migration. If the following appears on the console, the migration is successful.

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback