This document describes how to migrate data from Alibaba Cloud ApsaraDB for RDS to TencentDB using DTS, Tencent Cloud's data migration tool.
ApsaraDB RDS for MySQL 5.6 or 5.7.
During data transfer, the data replication method of TencentDB must be async replication, which can only be changed after data transfer is completed.
The public network address provided by Alibaba Cloud needs to be converted into IP format. You can query IP/server addresses here.
Configure the task, source database, and target database. After the network connectivity test is successful, click Create.
Select a connection type as needed, enter the connection information of the source database, and click Test Connectivity.
You need to add the IP of your TencentDB instance to Alibaba Cloud's allowlist for IP mapping; otherwise, the connectivity test would fail.
- For mapping a TencentDB for MySQL instance with a public IP, you need to add the public IP of the corresponding region to Alibaba Cloud's allowlist.
- If the source database type is configured as "Direct Connect" or "VPN" during DTS configuration, an IP for external mapping will appear after the task is generated. You need to add it to Alibaba Cloud's allowlist.
You can submit a ticket to query the DTS IP allowlist of corresponding region, or click Test Connectivity, and the DTS IP allowlist will be displayed in the detection result when the connectivity test fails.
Select TencentDB instance as target instance type and enter the link information of the target instance.
Select the database to migrate, create a migration task information, and check the task information.
Select a data consistency check type as needed (e.g., full check or no check).
The detection ratio fields are required if sampling detection is selected.
After the migration task is created, you need to click Next: Check Task to verify the task information. You cannot start the migration task until all the check items are passed.
There are 3 statuses for task check:
Due to system design limitations, multiple migration tasks submitted or queued at the same time will be performed in sequence by queuing time.
After the check is passed, you can click Start to start data migration. Please note that if you have configured scheduled execution, the migration task will begin queuing and be executed at the specified time; otherwise, it will be executed immediately.
After the migration is started, you can view the corresponding migration progress under the migration task. The subsequent steps required for migration and the current stage will be displayed if you hover over the exclamation mark after the current step.
If an error occurs: "errMsg": "Failed to start backup task. SDK.ServerUnreachable Unable to connect server:HTTP Error 403: Forbidden":
You can troubleshoot the problem in the following steps:
- Check whether your Alibaba Cloud key has permission to initiate cold backup on the ApsaraDB for RDS instance. If an Alibaba Cloud root account is used, which has all permissions, this cause can be ruled out.
- Log in to the Alibaba Cloud Console, check whether the ApsaraDB for RDS instance is executing a conflicting task such as cold backup or upgrading; if automatic backup is enabled, you need to disable it.
- If the problem persists after the above two steps, please contact Alibaba Cloud to find out the cause of failure in initiating a cold backup task with an API.
To cancel an in-progress migration task, click Cancel.
show processlistcommand to confirm that there is no business connection.
show master statuscommand to get the latest GTID of ApsaraDB for RDS and compare it with that of TencentDB obtained via
show slave status, so as to ensure that there is no synchronization delay between TencentDB and ApsaraDB for RDS instances.
show slave statuscommand to record the sync time point of TencentDB.
After the migration is 100% complete, you can click Complete on the right. You can also call the DTS TencentCloud API to stop the sync.
If the migration is in uncompleted status, the migration task will continue, so will data sync.
Disable the read-only feature of TencentDB, restart the application, and observe the status of TencentDB to make sure that it is running normally.