Online migration refers to migrating or synchronizing systems and applications on the source server or virtual machine from your IDCs or other cloud platforms to Tencent Cloud with no system downtime.
Tencent Cloud provides the migration tool go2tencentcloud. After you run the migration tool on the source server, the entire source server can be migrated to the destination Tencent Cloud CVM. With this migration tool, you do not need to prepare, upload, or import images. The source server is directly migrated onto the cloud, meeting business requirements for enterprise cloudification, cross-cloud migration, cross-account or cross-region migration, and hybrid cloud deployment.
If both your source server and destination CVM can access the public network, you can use the default migration mode.
In the current default mode, the source server calls Tencent Cloud APIs through the Internet to initiate a migration request, and transfers data to the destination CVM to complete the migration.
If your source server or destination CVM is located in a private network or Virtual Private Cloud (VPC), the source server cannot directly establish a connection with the destination CVM through the Internet. In this case, you can use the private network migration mode of the tool. You need to establish a connection between the source server and the destination CVM through VPC Peering Connection, VPN Connection, Cloud Connect Network , or Direct Connect.
Operating systems supported by the online migration tool include but are not limited to the following (32-bit or 64-bit):
Linux | Windows |
---|---|
CentOS 5/6/7/8 | - |
Ubuntu 10/12/14/16/18 | |
Debian 7/8/9 | |
SUSE 11/12/15 | |
openSUSE 42 | |
Amazon Linux AMI | |
Red Hat 7/8 |
File Name | Description |
---|---|
go2tencentcloud_x64 | Executable program of the migration tool for the 64-bit Linux operating system |
go2tencentcloud_x32 | Executable program of the migration tool for the 32-bit Linux operating system |
user.json | Configuration file of the source server and the destination CVM during the migration. You need to modify the configurations based on the description of parameters in the user.json file. |
client.json | Configuration file of the migration tool. You need to modify the configurations based on description of parameters in the client.json file. |
rsync_excludes_linux.txt | rsync configuration file, which excludes files and directories that do not need to be migrated in the Linux system. |
Note:
The configuration files cannot be deleted. You must store them under the same folder as the go2tencentcloud executable program.
Parameter | Type | Required | Description |
---|---|---|---|
SecretId | String | Yes | Secret ID for your account to access APIs. For more information, see Access Key. |
SecretKey | String | Yes | Secret key for your account to access APIs. For more information, see Access Key. |
Region | String | Yes | Region of the destination CVM. You only need to specify the region, not the availability zone. For more information on values, see the region list. |
InstanceId | String | Yes | Instance ID of the destination CVM. The ID format is ins-xxxxxxxx . |
DataDisks | Array | No | List of data disks to be migrated from the source server. Each entry represents one data disk, and up to 20 data disks are supported. |
DataDisks.Index | Integer | No | Serial number of the data disk. Value range: [1,20]. The value 1 indicates that this data disk will be migrated to the first data disk mounted on the destination CVM. Likewise, the value 2 indicates that this data disk will be migrated to the second data disk mounted on the destination CVM. |
DataDisks.Size | Integer | No | Size of the data disk on the source server. Unit: GB. Value range: [10,16000]. |
DataDisks.MountPoint | String | No | Mount point of the data disk on the source server, for example, "/mnt/disk1" . |
{
"SecretId": "your secretId",
"SecretKey": "your secretKey",
"Region": "ap-guangzhou",
"InstanceId": "your instance id"
}
Note:
You need to replace the parameter values with the actual values.
For example, a Linux source server has one data disk, the mount point is /mnt/disk1
, and the size of the data disk is 10
GB. To migrate this server to a CVM (with at least one data disk mounted) located in the Guangzhou region, configure the user.json file as follows:
{
"SecretId": "your secretId",
"SecretKey": "your secretKey",
"Region": "ap-guangzhou",
"InstanceId": "your instance id",
"DataDisks": [
{
"Index": 1,
"Size": 10,
"MountPoint": "/mnt/disk1"
}
]
}
For example, a Linux source server has two data disks. The mount point for disk 1 is /mnt/disk1
, and the size is 10
GB. The mount point for disk 2 is /mnt/disk2
, and the size is 20
GB. To migrate this server to a CVM (with at least two data disks mounted) located in Guangzhou, with disk 1 and disk 2 of the source server to be migrated to the first and second data disks of the destination CVM respectively, configure the user.json file as follows:
{
"SecretId": "your secretId",
"SecretKey": "your secretKey",
"Region": "ap-guangzhou",
"InstanceId": "your instance id",
"DataDisks": [
{
"Index": 1,
"Size": 10,
"MountPoint": "/mnt/disk1"
},
{
"Index": 2,
"Size": 20,
"MountPoint": "/mnt/disk2"
}
]
}
Note:
You need to replace the parameter values with the actual values.
Parameter | Type | Required | Description |
---|---|---|---|
Client.Net.Mode | Integer | Yes | Default value: 0 . Valid values:0 (default mode)), 1 (private network migration mode: scenario 1), 2 (private network migration mode: scenario 2), 3 (private network migration mode: scenario 3). Enter a value based on your actual migration mode or scenario. |
Client.Net.Proxy.Ip | String | No | IP address of the network proxy. If you select private network migration mode: scenario 3, this parameter must be specified. |
Client.Net.Proxy.Port | Integer | No | Port of the network proxy. If you select private network migration mode: scenario 3, this parameter must be specified. |
Client.Net.Proxy.User | String | No | Username of the network proxy. If you select private network migration mode: scenario 3, and the network proxy needs to be authenticated, this parameter must be specified. |
Client.Net.Proxy.Password | String | No | Password of the network proxy. If you select private network migration mode: scenario 3, and the network proxy needs to be authenticated, this parameter must be specified. |
Client.Extra.IgnoreCheck | Bool | No | Default value: false . Upon launch, the migration tool automatically checks the environment of the source server. To skip this check, configure this parameter to true . |
Client.Rsync.BandwidthLimit | String | No | Bandwidth limit in KBytes/sec. The default value is empty, meaning there is no bandwidth limit during transfer. |
Client.Rsync.Checksum | Bool | No | Transfer checksum. If this parameter is configured to true , it can strengthen the transfer consistency check, but will increase the CPU load of the source server and slow down the transfer speed. The default value is false , meaning no check will be performed by default. |
Note:
Except for the above parameters, other configuration items in the client.json file usually do not need to be specified.
/dev/*
/sys/*
/proc/*
/var/cache/yum/*
/lost+found/*
/var/lib/lxcfs/*
/var/lib/docker-storage.btrfs/root/.local/share/gvfs-metadata/*
To exclude other directories or files, append them to the rsync_excludes_linux.txt file. For example, to exclude all content of the data disk mounted on /mnt/disk1
, configure the rsync_excludes_linux.txt file as follows:/dev/*
/sys/*
/proc/*
/var/cache/yum/*
/lost+found/*
/var/lib/lxcfs/*
/var/lib/docker-storage.btrfs/root/.local/share/gvfs-metadata/*
/mnt/disk1/*
Parameter | Description |
---|---|
--help |
Prints help information. |
--check |
Checks the source server without migration. |
--log-file |
Configures the log file name, which is log by default. |
--log-level |
Configures the logging level. Valid values: 1 (ERROR level), 2 (INFO level), and 3 (DEBUG level). Default value: 2 . |
--clean |
Enables the destination CVM to forcibly exit the migration mode and cleanse the site. For example, if the console prompts Please execute '--clean' option manually. , you need to specify this parameter and run the tool for the destination CVM to exit the migration mode. |
--version |
Prints the version number. |
Before migration, check the following items of the source server and destination CVM:
Destination CVM |
|
---|---|
Linux source server |
|
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
totrue
in the client.json file.
If you use go2tencentcloud provided by Tencent Cloud for migration, the migration process includes the following three stages. You can intuitively view the migration progress when the tool is running.
Each stage will generate some subtasks to perform related operations, and some time-consuming subtasks may have maximum timeout periods by default. The time required for data transfer depends on the size of the data on the source server, network bandwidth, etc. Please wait for the migration process to complete. The migration tool supports checkpoint restart.
Note:
The destination CVM enters migration mode after the migration starts. Do not reinstall the system, shut down, terminate, or reset passwords of the destination CVM until the migration is completed and the destination CVM exits the migration mode.
Client.Net.Mode
in the client.json file to 0
, that is, select the default mode. If necessary, configure other parameters based on the description of parameters in the client.json file.sudo ./go2tencentcloud_x64
To configure the log file name and logging level when running the tool, execute the following command:sudo ./go2tencentcloud --log-file=my.log --log-level=3
Please wait for the migration process to complete.Client.Net.Mode
in the client.json file to 1
, that is, select the private network migration mode: scenario 1. If necessary, configure other parameters based on the description of parameters in the client.json file.sudo ./go2tencentcloud_x64
If Stage 1 is finished and please run next stage at source machine
is prompted, stage 1 is completed.sudo ./go2tencentcloud_x64
If Stage 2 is finished and please run next stage at gateway machine
is prompted, stage 2 is completed.sudo ./go2tencentcloud_x64
If Migrate successfully
is prompted, the entire migration task has been completed.Client.Net.Mode
in the client.json file to 2
, that is, select the private network migration mode: scenario 2. If necessary, configure other parameters based on the description of parameters in the client.json file.root
to run the tool.sudo ./go2tencentcloud_x64
Please wait for the migration process to complete.Client.Net.Mode
in the client.json file to 3
, that is, select the private network migration mode: scenario 3.Client.Net.Proxy.Ip
and Client.Net.Proxy.Port
in the client.json file to the IP address and port of the network proxy.Client.Net.Proxy.User
and Client.Net.Proxy.Password
to the username and password of the network proxy. You may leave them in blank if authentication is not required. If necessary, you can configure other parameters based on the description of parameters in the client.json file.root
to run the tool.sudo ./go2tencentcloud_x64
Please wait for the migration process to complete.
Was this page helpful?