All Products
Search
Document Center

Data Transmission Service:Migrate from a self-managed Redis to a Tair (Redis OSS-Compatible) instance

Last Updated:Aug 27, 2026

This topic describes how to use Data Transmission Service (DTS) to migrate data from a self-managed Redis database to a Tair (Redis OSS-Compatible) instance. DTS supports both full and incremental data migration. Combining these migration types allows you to smoothly migrate your self-managed Redis database to the cloud with minimal service interruption.

Prerequisites

  • You have created a source self-managed Redis instance and a destination Tair (Redis OSS-Compatible) instance. For more information about how to create a Tair (Redis OSS-Compatible) instance, see Step 1: Create an instance.

    Note
    • DTS currently supports only Tair (Redis OSS-Compatible) instances that use the direct connection mode.

    • For information about the supported versions of the source and destination databases, see Migration solutions overview.

  • The self-managed Redis can properly run the psync or sync commands.

  • The destination Tair (Redis OSS-Compatible) instance must have more available storage space than the amount used by the source self-managed Redis database.

Usage notes

Type

Description

Source database limitations

  • The source server must have sufficient outbound bandwidth. Insufficient bandwidth slows migration.

  • If you perform only full data migration (select only Full Data Migration for Migration Types), do not write new data to the source during migration. Otherwise, source and destination data becomes inconsistent. For real-time consistency, select both full and incremental data migration.

  • In a migration scenario that involves only Full Data Migration, DTS runs the INFO Keyspace command on the source to identify databases (DBs) with data. Only DBs in the INFO Keyspace result are migrated.

    Important

    Some third-party Redis services may not correctly list all DBs in the INFO Keyspace output, causing those DBs to be skipped. Before configuring the migration, run INFO Keyspace on the source to verify all required DBs are listed.

  • If some source keys have expiration policies, the target may have fewer keys because expired keys may not yet be deleted from the source.

    Note

    Non-expiring key counts remain consistent between source and target.

  • DTS inserts a key prefixed with DTS_REDIS_TIMESTAMP_HEARTBEAT into the source to track update timestamps (one per shard in cluster mode). This key is filtered during migration and expires after the task completes.

  • If the source instance is read-only or the DTS account does not have write (SETEX) permissions, the reported latency may be inaccurate.

  • To ensure a stable migration link, increase the repl-backlog-size parameter in redis.conf.

  • To migrate incremental data, the source database account used by the task must have the PSYNC and SYNC permissions.

Other limitations

  • Full data migration increases load on both databases. High-traffic or low-spec servers may experience degraded performance or service unavailability. Evaluate the impact and run migration during off-peak hours.

  • If the target has insufficient memory and triggers data eviction, data inconsistency may occur. The default data eviction policy (maxmemory-policy) for Tair (Redis OSS-Compatible) is volatile-lru. The migration task is not affected.

    To prevent this, set the target eviction policy to noeviction. When memory is full, writes and the task fail, but no data is evicted from the target.

  • For Lua scripts called by EVAL or EVALSHA, DTS cannot confirm whether the scripts were successfully executed during incremental data migration. This is because the target does not explicitly return an execution result.

  • List data may be duplicated because DTS does not Flush existing destination data when using psync or sync.

  • If the self-managed Redis instance is scaled or its specifications change during migration, reconfigure the task. Clear the data migrated to the target before reconfiguring to ensure consistency.

  • Scaling (adding or removing shards), instance specification change (memory increase, spec change, or zone migration), or connection address and port changes during migration interrupt the task because DTS loses continuous log data. If this occurs, clear the data migrated to the target Redis instance before reconfiguring the task.

  • Data loss may occur on the target after an instance migration (including primary/secondary switchover) if unreplicated data exists on the primary.

  • DTS auto-resumes failed tasks. Before switching to the target instance, end or release the task to prevent resumed tasks from overwriting target data.

  • If a cluster shard reaches its memory limit or the target runs out of storage, the task fails with an out of memory (OOM) error.

  • DTS does not support migration if Transparent Data Encryption (TDE) is enabled on the target instance.

  • The following events during migration may cause full data migration to restart, leading to data inconsistency:

    • A transient connection interruption on the source or target Redis instance causes resumable transmission to fail.

    • A primary/secondary switchover or failover occurs on the source or target Redis instance.

    • The connection address of the source or target Redis instance changes.

  • If a Tair (Redis OSS-Compatible) instance has Transport Layer Security (TLS) encryption enabled, you must connect to it by using the SSL-encrypted method in DTS. TLSv1.3 is not supported. You cannot connect to an SSL-enabled Tair (Redis OSS-Compatible) instance by setting the Alibaba Cloud Instance to Alibaba Cloud Instance.

  • If a task includes both full and incremental migration, DTS may re-run both after the migration instance restarts.

  • Restarting the migration instance may re-execute commands, causing data inconsistency—especially with non-idempotent commands like INCRBY or LPUSH, or if the restart triggers a new full data migration.

  • If a task fails, DTS support staff will attempt to restore it within eight hours. During restoration, they may restart the task or adjust its parameters.

    Note

    Only DTS task parameters are modified—not database parameters. Parameters that may be adjusted include those listed in Modify instance parameters.

Billing

Migration type

Instance configuration fee

Internet traffic fee

Full data migration

Free of charge.

When the Access Method parameter of the destination database is set to Public IP Address, you are charged for Internet traffic. For more information, see Billing overview.

Incremental data migration

Charged. For more information, see Billing overview.

Migration types

  • Full data migration

    DTS migrates all existing data of the selected objects from the self-managed Redis database to the destination Tair (Redis OSS-Compatible) instance.

    Note

    If you perform only a full data migration, do not write new data to the self-managed Redis database during the migration to ensure data consistency.

  • Incremental data migration

    In addition to the full data migration, DTS migrates incremental data updates from the self-managed Redis database to the destination Tair (Redis OSS-Compatible) instance. Incremental data migration allows for a smooth migration to the cloud without service interruptions.

Supported commands for incremental migration

  • APPEND

  • BITOP, BLPOP, BRPOP, BRPOPLPUSH

  • DECR, DECRBY, DEL

  • EVAL, EVALSHA, EXEC, EXPIRE, EXPIREAT

  • FLUSHALL, FLUSHDB

  • GEOADD, GETSET

  • HDEL, HINCRBY, HINCRBYFLOAT, HMSET, HSET, HSETNX

  • INCR, INCRBY, INCRBYFLOAT

  • LINSERT, LPOP, LPUSH, LPUSHX, LREM, LSET, LTRIM

  • MOVE, MSET, MSETNX, MULTI

  • PERSIST, PEXPIRE, PEXPIREAT, PFADD, PFMERGE, PSETEX, PUBLISH

  • RENAME, RENAMENX, RESTORE, RPOP, RPOPLPUSH, RPUSH, RPUSHX

  • SADD, SDIFFSTORE, SELECT, SET, SETBIT, SETEX, SETNX, SETRANGE, SINTERSTORE, SMOVE, SPOP, SREM, SUNIONSTORE

  • ZADD, ZINCRBY, ZINTERSTORE, ZREM, ZREMRANGEBYLEX, ZUNIONSTORE, ZREMRANGEBYRANK, ZREMRANGEBYSCORE

  • XADD, XCLAIM, XDEL, XAUTOCLAIM, XGROUP CREATECONSUMER, XTRIM

Preparations (for incremental migration)

To ensure that the incremental data migration task runs as expected, disable the limit on the replication output buffer. This topic uses a server that runs Linux as an example.

Note

If you need to perform only a full data migration, you can skip this step.

  1. Use the redis-cli tool to connect to the self-managed Redis database.

    Note

    You can use redis-cli after you install Redis. For more information, visit the official Redis community website.

    redis-cli -h <host> -p <port> -a <password>
    Note
    • <host>: The connection address of the self-managed Redis database. You can use 127.0.0.1 for a local connection.

    • <port>: The service port of the self-managed Redis database. The default value is 6379.

    • <password>: The password of the self-managed Redis database.

    Example:

    redis-cli -h 127.0.0.1 -p 6379 -a Test123456
  2. Run the following command to disable the limit on the replication output buffer.

    config set client-output-buffer-limit 'slave 0 0 0'

Procedure

  1. Navigate to the migration task list page for the destination region using one of the following methods.

    From the DTS console

    1. Log on to the Data Transmission Service (DTS) console.

    2. In the navigation pane on the left, click Data Migration.

    3. In the upper-left corner of the page, select the region where the migration instance is located.

    From the DMS console

    Note

    The actual operations may vary based on the mode and layout of the DMS console. For more information, see Simple mode console and Customize the layout and style of the DMS console.

    1. Log on to the Data Management (DMS) console.

    2. In the top menu bar, choose Data + AI > Data Transmission (DTS) > Data Migration.

    3. To the right of Data Migration Tasks, select the region where the migration instance is located.

  2. Click Create Task to navigate to the task configuration page.

  3. Configure the source and destination databases.

    Category

    Parameter

    Description

    N/A

    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

    Select Existing Connection

    • To use a database instance that has been added to the system (created or saved), select the desired database instance from the drop-down list. The database information below will be automatically configured.

      Note

      In the DMS console, this parameter is named Select a DMS database instance..

    • If you have not registered the database instance with the system, or do not need to use a registered instance, manually configure the database information below.

    Database Type

    Select Tair/Redis.

    Access Method

    Select an access method based on your source database's deployment location. This example uses Self-managed Database on ECS.

    Note

    If the source instance is a self-managed database, you must also complete the required preparations.

    Instance Region

    Select the region where the ECS instance that hosts the source Redis database resides.

    Replicate Data Across Alibaba Cloud Accounts

    In this example, data is migrated within the same Alibaba Cloud account. Select No.

    ECS Instance ID

    Select the ID of the ECS instance that hosts the source Redis database.

    Note

    If the source Redis database is in a cluster architecture, select the ECS instance ID where any master node resides. You must also manually add the DTS server CIDR block for the region to the security group rules of all other cluster instances. For more information, see Create a security group, Associate a security group with an instance (primary ENI), and Add the CIDR blocks for DTS servers to an IP address whitelist.

    Instance Mode

    Select Standalone or Cluster based on the architecture of the source Redis database.

    Note

    If the Access Method for the self-managed Redis is Public IP Address, the Cluster mode is not supported for Instance Mode.

    Port

    Enter the service port of the source Redis database. The default value is 6379.

    Note

    If the source Redis database is in a cluster architecture, enter the service port of any master node.

    Authentication Method

    Select an authentication method based on your requirements. In this example, Password Login is selected.

    Note
    • Only Redis 6.0 and later support Account + Password Login.

    • If you select Secret-free login, make sure that password-free access is enabled for the Redis database. For information about how to enable password-free access for a Tair (Redis OSS-Compatible) instance, see Enable password-free access over a VPC.

    Database Password

    Enter the password to connect to the source Redis database.

    Note
    • This parameter is optional. You can leave it empty if no password is set.

    • The password must be in the <user>:<password> format. For example, if the custom username for the Redis instance is admin and the password is Rp829dlwa, enter admin:Rp829dlwa.

    Encryption

    Select Non-encrypted or SSL-encrypted based on your database instance requirements.

    Note

    If you are using a self-managed Redis instance (the Access Method is not Alibaba Cloud Instance) and you select SSL-encrypted, you must also upload a CA Certificate and enter the CA Certificate Password.

    Destination Database

    Select Existing Connection

    • To use a database instance that has been added to the system (created or saved), select the desired database instance from the drop-down list. The database information below will be automatically configured.

      Note

      In the DMS console, this parameter is named Select a DMS database instance..

    • If you have not registered the database instance with the system, or do not need to use a registered instance, manually configure the database information below.

    Database Type

    Select Tair/Redis.

    Access Method

    Select Alibaba Cloud Instance.

    Instance Region

    Select the region where the destination Tair (Redis OSS-Compatible) instance resides.

    Replicate Data Across Alibaba Cloud Accounts

    In this example, data is migrated within the same Alibaba Cloud account. Select No.

    Instance ID

    Select the ID of the destination Tair (Redis OSS-Compatible) instance.

    Authentication Method

    Select an authentication method based on your requirements. In this example, Password Login is selected.

    Note
    • Only Redis 6.0 and later support Account + Password Login.

    • If you select Secret-free login, make sure that password-free access is enabled for the Redis database. For information about how to enable password-free access for a Tair (Redis OSS-Compatible) instance, see Enable password-free access over a VPC.

    Database Password

    Enter the password to connect to the destination Tair (Redis OSS-Compatible) instance.

    Note

    The password must be in the <user>:<password> format. For example, if the custom username for the Tair instance is admin and the password is Rp829dlwa, enter admin:Rp829dlwa.

    Encryption

    Select Non-encrypted or SSL-encrypted based on your database instance requirements.

    Note

    If you are using a self-managed Redis instance (the Access Method is not Alibaba Cloud Instance) and you select SSL-encrypted, you must also upload a CA Certificate and enter the CA Certificate Password.

  4. After you complete the configuration, click Test Connectivity and Proceed at the bottom of the page.

    Note
    • Ensure that the IP address segment of the DTS service is automatically or manually added to the security settings of the source and destination databases to allow access from DTS servers. For more information, see Add DTS server IP addresses to a whitelist.

    • If the source or destination database is a self-managed database (the Access Method is not Alibaba Cloud Instance), you must also click Test Connectivity in the CIDR Blocks of DTS Servers dialog box that appears.

  5. Configure the task objects.

    1. On the Configure Objects page, configure the objects that you want to migrate.

      Parameter

      Description

      Migration Types

      Select Full Data Migration + Incremental Data Migration.

      Note

      If the account does not have SYNC or PSYNC permissions on the source database, select Full Data Migration.

      Processing Mode of Conflicting Tables

      • Precheck and Report Errors: Checks whether the destination is empty. If the destination to be migrated to is empty, the precheck is passed. If not, an error is reported during the precheck, and the data migration job does not start.

      • Ignore Errors and Proceed: Skips the Check the existence of objects in the destination database. check item.

        Warning

        If you select Ignore Errors and Proceed and a key in the destination has the same name as a key in the source during migration, the data from the source overwrites the data in the destination. This may cause data loss in the destination. Proceed with caution.

      Source Objects

      In the Source Objects box, click the objects to migrate, and then click Right arrow to move them to the Selected Objects box.

      Note

      You can select objects at the database level. If you need to migrate data for specific keys within a database, you can use the Filter task data with an SQL conditionfeature in the Selected Objects pane.

      Selected Objects

      To specify a destination database (DB 0 to DB 255) or filter data by prefix, use the mapping and filtering functions. In the Selected Objects box, right-click the database to migrate, and then configure the settings in the Edit Schema dialog box. For more information, see Object name mappingand Filter task data with an SQL condition.

    2. Click Next: Advanced Settings.

      Parameter

      Description

      Dedicated Cluster for Task Scheduling

      By default, DTS schedules tasks on a shared cluster. You do not need to select one. If you want more stable tasks, you can purchase a dedicated cluster to run DTS migration tasks.

      Retry Time for Failed Connections

      After the migration task starts, if the connection to the source or destination database fails, DTS reports an error and immediately begins to retry the connection. The default retry duration is 720 minutes. You can customize the retry time to a value from 10 to 1440 minutes. We recommend that you set the duration to more than 30 minutes. If DTS reconnects to the source and destination databases within the specified duration, the migration task automatically resumes. Otherwise, the task fails.

      Note
      • For multiple DTS instances that share the same source or destination, the network retry time is determined by the setting of the last created task.

      • Because you are charged for the task during the connection retry period, we recommend that you customize the retry time based on your business needs, or release the DTS instance as soon as possible after the source and destination database instances are released.

      Retry Time for Other Issues

      After the migration task starts, if a non-connectivity issue, such as a DDL or DML execution exception, occurs in the source or destination database, DTS reports an error and immediately begins to retry the operation. The default retry duration is 10 minutes. You can customize the retry time to a value from 1 to 1440 minutes. We recommend that you set the duration to more than 10 minutes. If the related operations succeed within the specified retry duration, the migration task automatically resumes. Otherwise, the task fails.

      Important

      The value of Retry Time for Other Issues must be less than the value of Retry Time for Failed Connections.

      Enable Throttling for Full Data Migration

      During full migration, DTS consumes read and write resources on the source and destination databases, which may increase the database load. If required, you can enable throttling for the full migration task. You can set Queries per second (QPS) to the source database, RPS of Full Data Migration, and Data migration speed for full migration (MB/s) to reduce the load on the destination database.

      Note

      This parameter is available only if you select Full Data Migration for Migration Types.

      Enable Throttling for Incremental Data Migration

      If required, you can also choose to set speed limits for the incremental migration task. You can set RPS of Incremental Data Migration and Data migration speed for incremental migration (MB/s) to reduce the load on the destination database.

      Note

      This parameter is available only if you select Incremental Data Migration for Migration Types.

      Extend Expiration Time of Destination Database Key

      Set an additional expiration time for keys when they are migrated from the source database to the destination database. To ensure data consistency, we recommend setting an extended key expiration time if commands such as the following are used.

      Note

      In scenarios that involve distributed locks, this may prevent locks from being released in a timely manner.

      expire key seconds
      pexpire key milliseconds
      expireat key timestamp
      pexpireat key timestampMs

      Use Slave Node

      If the Instance Mode of the source self-managed Redis is Cluster, you can choose to read data from master or replica nodes. The default is No, which means data is read from master nodes.

      Environment Tag

      You can select an environment tag to identify the instance based on your requirements. In this example, no selection is needed.

      Configure ETL

      Choose whether to enable the extract, transform, and load (ETL) feature. For more information, see What is ETL? Valid values:

      Monitoring and Alerting

      Select whether to set alerts and receive alert notifications based on your business needs.

      • No: Does not set an alert.

      • Yes: Configure alerts by setting an alert threshold and an alert notifications. If a migration fails or the latency exceeds the threshold, the system sends an alert notification.

    3. Click Data Verification to configure a data verification task.

      To use the data verification feature, see Configure data verification.

  6. Save the task and run a precheck.

    • To view the parameters for configuring this instance when you call the API operation, move the pointer over the Next: Save Task Settings and Precheck button and click Preview OpenAPI parameters in the bubble that appears.

    • If you do not need to view or have finished viewing the API parameters, click Next: Save Task Settings and Precheck at the bottom of the page.

    Note
    • Before the migration task starts, DTS performs a precheck. The task starts only after it passes the precheck.

    • If the precheck fails, click View Details next to the failed check item, fix the issue based on the prompt, and then run the precheck again.

    • If a warning is reported during the precheck:

      • For check items that cannot be ignored, click View Details next to the failed item, fix the issue based on the prompt, and then run the precheck again.

      • For check items that can be ignored, you can click Confirm Alert Details, Ignore, OK, and Precheck Again to skip the alert item and run the precheck again. If you choose to ignore a warning, it may cause issues such as data inconsistency and pose risks to your business.

  7. Purchase the instance.

    1. When the Success Rate reaches 100%, click Next: Purchase Instance.

    2. On the Purchase page, select the link specification for the data migration instance. For more information, see the following table.

      Category

      Parameter

      Description

      New Instance Class

      Resource Group Settings

      Select the resource group to which the instance belongs. The default value is default resource group. For more information, see What is Resource Management?

      Instance Class

      DTS provides migration specifications with different performance levels. The link specification affects the migration speed. You can select a specification based on your business scenario. For more information, see Data migration link specifications.

    3. After the configuration is complete, read and select Data Transmission Service (Pay-as-you-go) Service Terms.

    4. Click Buy and Start, and then click OK in the OK dialog box.

      You can view the specific progress on the data migration page.

      Note

      If your DTS instance is configured for both full and incremental migration (Migration Types includes both Full Data Migration and Incremental Data Migration), the task is listed as Incremental Data Migration on the migration task list page.