This topic describes how to use the data migration feature to migrate the data of an ApsaraDB RDS for MySQL instance in the ApsaraDB RDS console. The data migration feature is provided by Data Transmission Service (DTS).
Prerequisites
An RDS instance is created. For information about how to create an RDS instance, see Create an ApsaraDB RDS for MySQL instance.
If your self-managed MySQL instance is deployed on an on-premises device or a third-party cloud platform, make sure that the CIDR block of the required DTS server is added to an IP address whitelist of the self-managed MySQL instance to allow the DTS server to connect to the self-managed MySQL instance. For more information, see Add the CIDR blocks of DTS servers or What is DTS?
A source or destination database is created based on your business requirements. If your RDS instance is used as the destination instance, the available storage of the RDS instance must be greater than the storage capacity of the source instance. For more information about how to expand the storage capacity of an RDS instance, see Change instance specifications.
NoteWe recommend that you enable the automatic storage expansion feature for your RDS instance. This way, the system automatically expands the storage capacity of the RDS instance when the available storage reaches the specified threshold. For more information, see Use the automatic storage expansion feature.
DTS is authorized to access Alibaba Cloud resources. For more information, see Authorize DTS to access Alibaba Cloud resources.
Billing rules
The feature is provided by DTS and shares the same billable items as DTS. For more information, see Billable items.
Procedure
Go to the Data Migration and Synchronization page.
Go to the Instances page.
In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the instance ID.
In the left-side navigation pane of the page that appears, click Data Migration and Synchronization.
Click the Data Migration tab. On the tab that appears, click Create Data Migration Task and perform the following operations:
Configure the source and destination databases.
NoteIf you use the current RDS instance as the source or destination instance, the Instance Region and RDS Instance ID parameters are automatically configured and cannot be modified.
Configure the source database.
Configure the Database Account and Database Password parameters.
Configure the Encryption parameter.
Configure the destination database.
Configure the Database Type and Access Method parameters.
Configure the Instance Region and RDS Instance ID parameters.
Configure the Encryption parameter.
Click Test Connectivity and Proceed.
Configure objects.
NoteThis step is the same as that in the DTS console of the original version. In the DTS console of the new version, the configuration is optimized. For more information, see [Notice] DTS console fully upgraded.
Configure the Migration Types parameter. Valid values: Schema Migration, Full Data Migration, and Incremental Data Migration.
Configure the Processing Mode of Conflicting Tables parameter. Valid values: Precheck and Report Errors and Ignore Errors and Proceed.
Configure the Capitalization of Object Names in Destination Instance parameter. You can specify whether to capitalize the database names, table names, and column names for migration objects.
NoteBy default, DTS default policy is selected. You can select other options to ensure that the capitalization of object names is consistent with that in the source and destination databases. For more information, see Specify the capitalization of object names in the destination instance.
In the Source Objects section, select the objects that you want to migrate and move them to the Selected Objects section.
Modify the name of the object that you want to migrate in the destination instance. If you want to modify the names of multiple objects, click Batch Edit in the upper-right corner of the page.
Click Advanced Settings (Optional) to configure the advanced parameters.
In the Data Verification Settings section, configure the Data Verification Mode parameter. The value varies based on the migration type. For more information, see Configure the Migration Types parameter.
Configure the required parameters in the Advanced Settings section. Parameter settings and the subsequent steps are the same as those in the DTS console. You must configure the parameters based on your business requirements.
NoteFor more information, see Migrate data between ApsaraDB RDS instances of different Alibaba Cloud accounts.
FAQ
What do I do if the
DTS-RETRY-ERR-0069: Datasource rejected establishment of connection (.*)? Too many connections
error is reported during a DTS migration task?This error is reported because the number of connections to the source or destination database exceeds the upper limit. You can increase the maximum number of connections of the source or destination database and then restart the task.
For more information about the errors that may be reported for DTS tasks and how to troubleshoot them, see Common errors and troubleshooting.