This topic describes how to migrate an ApsaraDB RDS instance from standard or enhanced SSDs to local SSDs. This topic also provides a reference for you to migrate the RDS instance from local SSDs to standard or enhanced SSDs.

  • If your RDS instance runs MySQL 5.7 on RDS Basic Edition, you can migrate the instance to local SSDs by changing the instance specifications. For more information, see Change the specifications of an ApsaraDB RDS for MySQL instance.
  • If your RDS instance does not run MySQL 5.7 on RDS Basic Edition, you must create a RDS instance that uses the specified type of storage media. Then, you can use Data Transmission Service (DTS) to migrate the data of your RDS instance to the new RDS instance.

Prerequisites

  • Your RDS instance runs one of the following database engines:
    • RDS MySQL
    • RDS SQL Server
    • RDS PostgreSQL
  • A new RDS instance is created with the specified type of storage media. For more information, see Create an ApsaraDB RDS for MySQL instance.
  • The storage capacity of the new RDS instance is greater than or equal to the used storage space of your RDS instance.
  • Your RDS instance and the new RDS instance reside in the same region.
  • Your RDS instance and the new RDS instance run the same database engine, version, and RDS edition.
  • The binlog_row_image parameter is set to full for your RDS instance. This applies if you select the incremental data migration method.

Precautions

  • After the migration, the information about your RDS instance changes. You must immediately update the configuration data on your application. This prevents interruptions to your workloads.
  • During the migration, you cannot perform data definition language (DDL) operations on your RDS instance.
  • The schema migration method does not support events.
  • If the object name mapping feature is enabled for an object, DTS may fail to migrate the objects that depend on this object.

Procedure

  1. Log on to the DTS console.
  2. In the left-side navigation pane, click Data Migration. On the page that appears, click Create Migration Task. Create Migration Task button
  3. Configure the following parameters. Configure a migration task
    Parameter Description
    Task Name Enter the name of the migration task. By default, DTS generates a name for each task. We recommend that you change the automatically generated name to an informative name based on your business requirements.
    Source Database Instance Type Select RDS Instance.
    Instance Region Select the region to which your RDS instance belongs.
    RDS Instance ID Select the ID of your RDS instance.
    Database Account Enter the username of the account that is used to log on to your RDS instance. The account can be the privileged account. The account can also be a standard account that has the read and write permissions on all databases.
    Database Password Enter the password of the account that you have specified.
    Connection Method Select Non-encrypted connection. If SSL encryption is enabled for your RDS instance, select SSL secure connection. For more information about SSL encryption, see Configure SSL encryption for an ApsaraDB RDS instance.
    Destination Database Instance Type Select RDS Instance.
    Instance Region Select the region to which your RDS instance belongs.
    RDS Instance ID Select the ID of the new RDS instance.
    Database Account Enter the username of the account that is used to log on to the new RDS instance. The account can be the privileged account. The account can also be a standard account that has the read and write permissions on all databases.
    Database Password Enter the password of the account that you have specified.
    Connection Method Select Non-encrypted connection. If SSL encryption is enabled for the new RDS instance, select SSL secure connection. For more information about SSL encryption, see Configure SSL encryption for an ApsaraDB RDS instance.
    Note The parameters that you need to configure vary based on the values of the Instance Type and RDS Instance ID parameters.
  4. Click Test Connectivity in both the Source Database and Destination Database sections.
    Note If your RDS instance and the new RDS instance pass the connectivity test, these instances can be connected. Otherwise, you must fix the errors that impair connectivity.
  5. In the lower-right corner of the page, click Set Whitelist and Next.
  6. Specify the Migration Type parameter. Select objects in the Migration objects section. Click the > icon to move the selected objects to the Selected objects section. Then, click Pre-check and Start. Configure migration types and objects
    Note If you want to modify the name of a database, you must click Edit to the right of the database in the Selected objects section.
    Modify the name of a database
  7. View the precheck results. This step is required only when the migration task fails the precheck. If the migration task passes the precheck, go to Step 10.
    The following figure shows sample precheck results. Precheck failed
  8. Click the icon next to Failed in the Check Result column for each failed check item. View details about the failure. Then, troubleshoot the errors that cause the failure based on the failure details.
  9. After all the errors are fixed, go to the page that displays a list of migration tasks, select the migration task that you have created, and then click Start.Restart a migration task
  10. After the migration task passes the precheck, click Next. Precheck successful
  11. Confirm the configuration of the migration task, select Service Terms, and then click Buy and Start.

What to do next

After the migration task is complete, you must immediately update the configuration data on your RDS instance. This update requires that you replace the endpoint of your RDS instance with the endpoint of the new RDS instance.

Migration complete