This document describes how to migrate data from Alibaba Cloud ApsaraDB for RDS to TencentDB using DTS, Tencent Cloud's data migration tool.
During data transfer, the data replication method of TencentDB must be async replication, which can only be changed after data transfer is completed.
1.1. Log in to the RDS Console and select a target instance.
1.2. You can obtain the necessary information on the target instance's basic information page as shown below:
The public network address provided by Alibaba Cloud needs to be converted into IP format. You can query IP/server addresses here.
1.3. Hover over the profile photo in the top-right corner and select accesskeys in the drop-down menu to get the required Accesskey.
Log in to the DTS Console, go to the data migration page, click Create Task, and configure the task, source database, and target database on the page redirected to.
Select a connection type as needed and enter the connection information of the source database.
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.
Select TencentDB instance as target instance type and enter the link information of the target instance.
Select the database to be migrated, 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 check ratio fields are required if spot check 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:
- Passed: The check is fully successful.
- Warning: The check fails. Database operation may be affected during or after data migration, but the migration task can still be executed.
- Failed: The check fails and the migration task cannot be executed. In this case, please check and modify the migration task information according to the error and then check the task again.
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.
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.