All Products
Search
Document Center

Migrate between RDS instances

Last Updated: Jan 21, 2019

With DTS, you can migrate data between two RDS instances. For storage engines supporting incremental migration, you can also migrate data to the target RDS instance without stopping services of the source RDS instance. DTS supports only migration between the same type of databases (such as RDS For MySQL > RDS For MySQL), not migration between different types of databases (such as RDS For MySQL > RDS For SQL Server).

This section describes how to use DTS to configure data migration tasks between two RDS instances.

Permission requirements

Different migration types have different permission requirements for migration accounts of source and target databases.

Migration type Schema migration Full migration Incremental migration
Source RDS Instance Read/Write permissions Read/Write permissions Read/Write permissions
Target RDS for MySQL instance Read/Write permissions Read/Write permissions Read/Write permissions

Configure a migration task

The following describes how to use DTS to migrate data between two RDS MySQL instances. You can use DTS to migrate data between two different instances or within one RDS instance.

Create a database in the RDS instance

In the data migration process, if the database to be migrated does not exist in the target RDS instance, DTS automatically creates one. However, in the following two cases, you need to manually create the database before configuring the migration task.

  1. The database name does not meet the RDS definition requirements (consisting of lower-case letters, digits, underscores, or dashes, beginning with a letter, ending with a letter or digit, and consisting of up to 64 characters).
  2. The database to be migrated has different names in the local and the target RDS for PostgreSQL instances.

In the preceding two cases, you need to create databases in the RDS console before configuring the migration task. For more information, see Create RDS database.

Create a migration account

For information about permissions required for the migration accounts, see the preceding permission requirements. If you have not created any RDS database accounts, see Create RDS instance account.

You need to create a migration account in the source and target RDS instances, and grant the read and write permissions of the databases and tables to be migrated.

Configure a migration task

When all of the preceding requirements are met, you can start to configure a migration task. To configure a migration task, follow these steps:

  1. Log on to the DTS console, click Create Migration Task in the upper-right corner.

  2. Configure connection information of source and target instances.

    You need to configure the migration task name and the connection information of source and target RDS instances. Specifically:

    • Task name

      DTS generates a name for every task automatically. The task name does not need to be unique. You can modify the task name as required. We recommend that you configure a meaningful name for the task so that the task can be easily identified.

    • Source instance information

      • Instance type: Select RDS Instance.
      • RDS instance ID: ID of the source RDS instance to be migrated. DTS supports RDS instances in classic networks and VPC networks.
      • Database name: If the storage engine of the RDS instance is PostgreSQL or PPAS, you need to configure the database name. The database name is the default database to be connected.
      • Database account: The account used to access the RDS instance.
      • Database password: The password of the account used to access the source RDS instance.
    • Target instance information

      • Instance type: Select the RDS Instance.
      • RDS instance ID: ID of the target RDS instance to be migrated. DTS supports RDS instances in classic networks and VPC networks.
      • Database name: If the storage engine of the RDS instance is PostgreSQL or PPAS, you need to configure the database name. The database name is the default database to be connected.
      • Database account: The account used to access the RDS instance
      • Database password: The password of the account used to access the source RDS instance.1

    After you configure the connection information, click Authorize Whitelist to configure the whitelist. In this step, DTS adds the IP address of its server to the whitelist of the destination RDS instance to avoid migration failures.

  3. Select the migration object and migration type.

    • Migration type

      DTS supports schema migration, full migration and incremental migration.

      If you only need to migrate existing data, select Schema migration and Full migration.

      If you need to migrate data without downtime, select Schema migration, Full migration, and Incremental migration.

    • Migration object

      Select the object to be migrated. The migration objects can be databases, tables, and columns. By default, after the object is migrated to the target RDS instance, the object name remains the same as that in the source RDS instance. To make an object has different names in the source instance and the target instance, you need to use the object name mapping feature provided by DTS. For more information, see Object name mapping.

    2

  4. Pre-check

    Before the migration task starts, DTS performs a pre-check. Only when the pre-check is passed, the migration can start successfully.

    If the pre-check fails, click Details corresponding to a specific check to see details. Fix the errors accordingly, and then perform a pre-check again.3

  5. Migration task

    After the pre-check is passed, you can start the migration task and view the detailed status of the migration and the migration progress in the task list.

    If you select incremental migration, changes that occur to the source database during the migration are synchronized to the target RDS instance and the migration task does not end automatically. If you only want to migrate data rather than perform data synchronization, stop writing data to the source database for a few minutes until the incremental migration has no delay, then stop the migration task, and switch services to the target RDS instance.

    The data migration between two RDS instances is complete.