Data Transmission Service (DTS) can migrate data from an RDS instance in another Alibaba Cloud account to an RDS instance in your current account. This topic describes how to configure a cross-account data migration task and highlights important considerations.
Prerequisites
The destination instance must have more storage space than the source instance is using.
This topic describes the procedure in the legacy DTS console. Links to the old console now automatically redirect to the new console. For instructions on using the new console, see Migrate RDS instances across Alibaba Cloud accounts.
Billing
|
Migration type |
Task configuration fee |
Internet traffic fee |
|
Schema migration and full data migration |
Free of charge. |
DTS charges an Internet traffic fee when the Access Method of the destination database is set to Public IP Address. Billing overview. |
|
Incremental data migration |
Charged. Billing overview. |
Account permission requirements
Instance type | Schema migration | Full data migration | Incremental data migration |
Source RDS instance | Read and write permissions | Read and write permissions | Read and write permissions |
Destination RDS instance | Read and write permissions | Read and write permissions | Read and write permissions |
Before you begin
In the source Alibaba Cloud account, configure Resource Access Management (RAM) to authorize the destination Alibaba Cloud account as a trusted account. This allows the destination account to access the required cloud resources of the source account through DTS. For more information, see Configure RAM authorization for a cross-account data migration task.
Procedure
Log on to the DTS console with the Alibaba Cloud account that owns the destination RDS instance.
-
In the navigation pane on the left, click Data Migration.
-
At the top of the Migration Tasks page, select the region where the destination instance is located.
-
In the upper-right corner of the page, click Create Data Migration Task.
On the Source and Destination Databases page, set the source instance type to RDS Instance, and then click RDS instance of another Alibaba Cloud account next to the RDS Instance ID field.
Configure the source and destination databases.
Parameter
Description
Task Name
DTS automatically generates a task name. We recommend that you specify a descriptive name for easy identification. The name does not need to be unique.
Source Database
Instance Type: Select RDS Instance.
NoteSkip this step if RDS Instance is already selected.
Instance Region: Select the region where the source RDS instance is located.
NoteThe source and destination RDS instances can be in different regions.
Alibaba Cloud Account ID of the RDS instance owner: Enter the ID of the Alibaba Cloud account to which the source instance belongs.
NoteTo obtain the account ID, log on to the Account Management page with the Alibaba Cloud account that owns the source instance.
Role Name: Enter the role name that is configured for the Alibaba Cloud account that owns the source instance. For more information, see Configure RAM authorization for a cross-account data migration task.
RDS Instance ID: Select the ID of the source RDS instance.
NoteIf an alert is displayed when you select the RDS Instance ID, resolve the issue as prompted. For common alerts, see FAQ.
Database Account: Enter the database account of the source RDS instance. For information about the required permissions, see Account permission requirements.
Database Password: Enter the password for the database account.
Destination Database
Instance Type: Select RDS Instance.
NoteThe source and destination RDS instances can be in different regions.
Instance Region: Select the region where the destination RDS instance is located.
RDS Instance ID: Select the ID of the destination RDS instance.
Database Account: Enter the database account of the destination RDS instance. For information about the required permissions, see Account permission requirements.
Database Password: Enter the password for the database account.
Connection Method: Select Non-encrypted or SSL-encrypted based on your requirements. In this example, Non-encrypted is selected.
NoteIf you select SSL-encrypted, you must enable the SSL encryption feature for the RDS instance in advance. For more information, see Configure SSL encryption.
After completing the configuration, click Set Whitelist and Next in the lower-right corner.
If the source or destination database is an Alibaba Cloud database instance, such as ApsaraDB RDS for MySQL or ApsaraDB for MongoDB, DTS automatically adds the CIDR blocks of DTS servers in the corresponding region to the whitelist of the database instance. If the database is a self-managed database on an ECS instance, DTS automatically adds the CIDR blocks of DTS servers to the security group rules of the ECS instance. You must also ensure that the self-managed database does not restrict access from the ECS instance. If the database is deployed as a cluster on multiple ECS instances, you must manually add the CIDR blocks of DTS servers in the corresponding region to the security rules of each ECS instance. If the database is a self-managed database in an on-premises data center or hosted on another cloud service, you must manually add the CIDR blocks of DTS servers in the corresponding region to allow access from the DTS servers. For the CIDR blocks of DTS servers, see IP address ranges of DTS servers.
WarningAdding the public CIDR blocks of DTS servers, whether automatically or manually, may introduce security risks. By using this product, you acknowledge and accept these potential risks. You are responsible for implementing basic security measures, including but not limited to using strong passwords, restricting open ports, using authentication for internal API calls, regularly reviewing and restricting unnecessary network segments, or connecting through private networks such as Express Connect, VPN Gateway, or Smart Access Gateway.
-
Select the migration types and objects.
Parameter
Description
Migration Types
-
For a full migration only, select both Schema Migration and Full Data Migration.
-
For a minimal-downtime migration, select Schema Migration, Full Data Migration, and Incremental Data Migration.
NoteIf you do not select Incremental Data Migration, do not write new data to the source database during the migration to ensure data consistency.
Migration Objects
In the Available box, click the objects you want to migrate, and then click the
icon to move them to the Selected Objects box.Note-
You can select objects at the database, table, or column level. If you select only tables or columns, other objects such as views, triggers, and stored procedures are not migrated.
-
By default, object names in the destination database are the same as in the source database. To rename an object in the destination database, use the object name mapping feature. For more information, see Object name mapping.
-
Using the object name mapping feature can cause the migration of dependent objects to fail.
Object Name Mapping
To change the names of migrated objects in the destination instance, use the object name mapping feature. For more information, see Object name mapping.
Retry Duration for Failed Connections
The default retry duration is 12 hours. You can also specify a custom duration. If DTS reconnects to the databases within the specified time, the data migration task automatically resumes. Otherwise, the task fails.
NoteYou are charged for the DTS task while it is retrying the connection. We recommend that you set a custom retry duration based on your business needs or release the DTS instance as soon as possible after the source and destination instances are released.
Migrate Temporary Tables Created by DMS Online DDL
If you use Data Management (DMS) to perform online DDL operations on the source database, you can choose whether to migrate the temporary tables generated by these operations.
-
Yes: DTS migrates data from the temporary tables created by online DDL operations.
NoteIf the temporary tables from online DDL operations are very large, the data migration task may experience delays.
-
No: DTS does not migrate data from temporary tables, and migrates only the original DDL data from the source database.
NoteThis option can cause table locks on the destination database.
-
-
After you complete these settings, click Pre-check and Start in the lower-right corner of the page.
Note-
DTS performs a precheck before the task starts. The task can start only after it passes the precheck.
-
If the precheck fails, click the
icon next to the failed item to view details.-
Fix the issues based on the details, and then run the precheck again.
-
For warnings that do not require a fix, you can select Ignore or Ignore and Rerun Precheck to run the precheck again.
-
-
-
After the task passes the precheck, click Next.
-
On the Confirm Order page, select a Instance Class and select the Data Transmission Service (Pay-As-You-Go) Terms of Service checkbox.
-
Click Buy and Start. The migration task starts.
-
Full data migration
Do not manually stop the task. Wait for it to complete automatically to avoid data loss.
-
Incremental data migration
The task does not stop automatically. Stop it manually.
NoteStop the task during off-peak hours or when you are ready to switch to the destination instance.
-
Wait until the task status changes to Incremental Data Migration and shows Undelayed. Then, stop writing data to the source database for a few minutes. The status of Incremental Data Migration may show a latency.
-
Wait until the status of Incremental Data Migration changes back to Undelayed. Then, stop the migration task manually. The progress of schema migration and full data migration both show 100%. To pause the migration task, select the task and click Pause in the batch operations bar at the bottom.
-
-
FAQ
This section describes common alerts that may occur when you select the RDS Instance ID for the source database and provides solutions.
Alert message | Solution |
The following error message appears: | Check whether the ID of the Alibaba Cloud account that owns the source instance and the role name are correct. Note To find the account ID, log on to the Account Management console with the Alibaba Cloud account that owns the source instance. |
The Warning dialog box appears with the following error: | Make sure you have configured RAM authorization in the Alibaba Cloud account that owns the source instance. You must set the Alibaba Cloud account that owns the destination instance as a trusted account, allowing it to access the required cloud resources of the source account through DTS. For more information, see Configure RAM authorization for a cross-account data migration task. |