All Products
Search
Document Center

PolarDB:Migrate data by using DTS

Last Updated:Apr 22, 2025

This topic describes how to use Data Transmission Service (DTS) to migrate data from a Tair (Redis OSS-compatible) instance to a PolarDB for MySQL-based Orca database and from an Orca database to other databases.

Prerequisites

Limits

  • Incremental data migration from an Orca database is not supported.

  • You can select only the Express Connect, VPN Gateway, or Smart Access Gateway access method for an Orca database regardless of whether it is used as the source or destination.

  • Limits for the Tair (Redis OSS-compatible) instance:

  • You can migrate data only from the DB0 database of a Tair (Redis OSS-compatible) instance to an Orca database. If the source Tair (Redis OSS-compatible) instance uses a logical database from DB1 to DB255, you cannot migrate data from the database to the Orca database.

Procedure

Create a DTS migration task

Note

The following steps describe how to migrate data from a Tair (Redis OSS-compatible) instance to an Orca database.

Step 1: Configure the source and destination databases

  1. Log on to the DTS Migration Tasks page.

  2. Click Create Task. The Create Data Migration Task page appears.

    image

  1. Configure the following parameters for the source and destination databases.

    Section

    Parameter

    Description

    Sample image

    N/A

    Task Name

    DTS automatically creates a task name. You can also specify a custom name to identify the task. The name can be non-unique.

    image

    Source Database

    Database Type

    The source database type. In this example, Tair/Redis is selected.

    Note

    If the source or destination database is from a third-party cloud platform, perform the required preparations.

    Access Method

    The method to access the source database. Select Alibaba Cloud Instance.

    Note

    Configure this parameter based on your needs.

    Instance Region

    If you set Database Type to Tair/Redis, set this parameter to the region of your Tair (Redis OSS-compatible) instance or a nearby region.

    Instance ID

    The virtual private cloud (VPC) of the source database. You can obtain the VPC of a Tair (Redis OSS-compatible) instance on its information page.

    Authentication Method

    Select Account + Password Login.

    Note

    In this example, the database account and password of your Tair (Redis OSS-compatible) instance are used.

    Encryption

    The encryption method. Valid values:

    1. Non-encrypted (default).

    2. SSL-encrypted.

    Destination Database

    Database Type

    By default, Tair/Redis is selected.

    Note

    In this example, Database Type is set to Tair/Redis.

    image

    Access Method

    Select Express Connect, VPN Gateway, or Smart Access Gateway.

    Instance Region

    If you set the instance type to Orca, set this parameter to the region of the PolarDB cluster or a nearby region.

    Connected VPC

    Select the VPC of the PolarDB cluster. You can obtain the VPC on the cluster's basic information page.

    Instance Mode

    By default, Standalone is selected. Cluster Edition is not supported.

    Domain Name or IP

    Enter an endpoint of Orca.

    Port Number

    Enter the Orca service port of the PolarDB cluster. Default value: 6379.

    Authentication Method

    Select Account + Password Login.

    Note

    Enter the created Orca account and its password.

    Encryption

    Select Non-encrypted.

  1. Test the connection and proceed to the next step.

    Note

    Add the destination IP addresses from the CIDR Blocks of DTS Servers dialog box to a whitelist of the PolarDB cluster, and then click Test Connectivity. If no exception occurs, the system automatically proceed to Step 2: Configure Task Objects.

    Warning

    If the CIDR blocks of DTS servers are automatically or manually added to the whitelist of the database or instance, or to the ECS security group rules, security risks may arise. Therefore, before you use DTS to migrate data, you must understand and acknowledge the potential risks and take preventive measures, including but not limited to the following measures: enhance the security of your username and password, limit the ports that are exposed, authenticate API calls, regularly check the whitelist or ECS security group rules and forbid unauthorized CIDR blocks, or connect the database to DTS by using Express Connect, VPN Gateway, or Smart Access Gateway.

    image

Step 2: Configure task objects

  1. Configure the following parameters for the task objects.

    Parameter

    Description

    Sample image

    Migration Types

    • To perform only full data migration, select Full Data Migration.

    • To perform only incremental data migration, select Incremental Data Migration.

    • To perform migration without service interruption, select Full Data Migration and Incremental Data Migration.

    Note
    • If you do not select Incremental Data Migration, do not write data to the source database during data migration. This ensures data consistency.

    • Incremental migration from an Orca database is not supported.

    image

    Processing Mode of Conflicting Tables

    The processing mode for conflicting tables. Valid values:

    • Precheck and Report Errors (default).

    • Ignore Errors and Proceed.

    Source Objects

    In the Source Objects section, click the database to be migrated, and then click 向右小箭头 to move it to the Selected Objects section.

    Note
    • This task migrates data at the database level.

    • In this example, 0 is selected. Orca supports data migration only from the DB0 database.

    image

  2. Click Next: Advanced Settings, and configure the settings.

  3. Click Next Step: Data Verification, and configure the settings.

Step 3: Precheck

After configuration, click Next: Save Task Settings and Precheck at the bottom right of the page, and wait for the check to complete.

Note
  • DTS performs a precheck before data migration starts. You can start data migration only after it passes the precheck.

  • If the precheck fails, click 提示 next to the check item to view the details.

    • After you fix the issue, repeat the precheck.

    • If there's no need to troubleshoot, click Ignore. In the message that appears, click OK. Then, click Precheck Again.

Step 4: Purchase

  1. After passing the precheck, click Next: Purchase Instance.

  2. In the Confirm Settings dialog box, configure the Channel Specification parameter. Then, read and select Data Transmission Service (Pay-as-you-go) Service Terms.

  3. Click Buy And Start to start migration.

    • Full data migration

      Do not manually stop a full data migration. Otherwise, the data migrated to the destination may be incomplete. Wait until the migration automatically stops.

    • Incremental data migration

      An incremental data migration does not automatically stop. You can only manually stop it.

      Note

      Manually stop an incremental data migration at an appropriate time. For example, you can stop the migration during off-peak hours or before you switch your workloads over to the destination instance.

      1. Monitor the migration progress. When the migration status changes to Incremental Data Migration and shows "The data migration task is not delayed", stop writing data to the source database for a few minutes. During this time, the progress bar may display some latency.

      2. Wait until the migration status becomes Incremental Data Migration and shows "The data migration task is not delayed" again. Then, manually stop the migration.

        image

  4. Wait for the migration to complete.