Migrating Tencent Cloud CVM Data Across Accounts

Last updated: 2020-08-12 16:53:49

    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.

    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 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 the migration, check the following items of the source server and destination CVM:

    Destination CVM
    1. 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.
    2. Security group: 443 and 80 ports must be open to the 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. If needed, change your network billing method in advance.
    4. 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 migration destination.
    Linux source server
    1. Check and install Virtio. For more information, see Checking Virtio Drivers in Linux.
    2. Check whether rsync is installed by running which rsync for verification.
    3. Check whether SELinux is enabled. If yes, disable it.
    4. 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.

    Note:

    • You can use tool commands such as sudo ./go2tencentcloud_x64 --check to automatically check the source server.
    • By default, the go2tencentcloud migration tool automatically performs checks upon launch. To skip checks and perform forced migration, configure Client.Extra.IgnoreCheck to true in the client.json file.
    • For more information on the go2tencentcloud migration tool, see Migration Tool.

    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 of the destination CVM.
      • The 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 which migration modes or scenarios you select.
    4. (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.
    5. Run the tool.
      Take cross-account migration in private network mode: scenario 1 as an example:
      1. On a CVM that has access to the public network, execute the following command to run the tool for migration stage 1.
        sudo ./go2tencentcloud_x64
        If Stage 1 is finished and please run next stage at source machine. is prompted, stage 1 has been completed.
      2. 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.
        sudo ./go2tencentcloud_x64
        If Stage 2 is finished and please run next stage at gateway machine. is prompted, stage 2 has been completed.
      3. 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.
        sudo ./go2tencentcloud_x64
        If Migrate successfully. is prompted, the entire migration task has been completed successfully.

    Was this page helpful?

    Was this page helpful?

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