Migrating Baidu Cloud BCC Data to Tencent Cloud

Last updated: 2021-12-13 18:24:45

    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

    • Source server: you can use the Baidu Cloud snapshot feature or other methods to back up data.
    • Destination CVM: 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 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.

    • 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 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. 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.
    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 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.
      For example, on a 64-bit Linux source server, execute the following command as the root user to run the tool.
      sudo ./go2tencentcloud_x64
      Please wait for the migration process to complete.
      If the following appears on the console, the migration has been completed successfully.