All Products
Search
Document Center

Migration Hub:Migration plan from Huawei Cloud GeminiDB Redis to Alibaba Cloud Tair (Redis-compatible)

Last Updated:Jan 27, 2026

1. Scenarios

This plan describes how to smoothly and efficiently migrate Huawei Cloud GeminiDB Redis databases to Alibaba Cloud Tair (Redis-compatible).

The migration types are as follows:

  • Full data migration: Migrates all existing data from the source GeminiDB Redis database to the destination Tair (Redis-compatible) instance.

  • Incremental data migration: After the full data migration is complete, this type of migration continuously synchronizes real-time incremental data from the source GeminiDB Redis database to ensure data consistency between the source and destination.

This plan helps you migrate GeminiDB Redis databases with zero or minimal downtime to minimize the impact on your services.

2. Introduction to migration tools

1. Alibaba Cloud Data Transmission Service (DTS)

Data Transmission Service (DTS) is a one-stop data transmission and processing platform from Alibaba Cloud. It integrates core features such as data migration, data synchronization, change tracking, data transformation, and data validation. DTS is designed to build secure, reliable, and high-performance data flow links between various data sources. It can be used for various purposes, such as migrating to the cloud, implementing geo-disaster recovery, and building real-time data warehouses.

2. Huawei Cloud Data Replication Service (DRS)

Data Replication Service (DRS) is a user-friendly, stable, and efficient cloud service from Huawei Cloud that is used for real-time database migration and synchronization.

3. RedisShake

RedisShake is a high-performance Redis data migration and synchronization tool developed by the Alibaba Cloud NoSQL team. It is primarily used to move data between different Redis instances, perform online stream synchronization, and parse and restore RDB backup files.

4. Redis-full-check

Redis-full-check is an open source tool developed by the Alibaba Cloud NoSQL team that compares data between two Redis instances to check for consistency. It is typically used for correctness validation after data migration and supports Redis versions 2.x to 7.x. It does not support Redis Modules.

5. compatibility-test

compatibility-test-suite-for-redis is an open source tool that checks the compatibility of your Redis-Like system with open source Redis versions, such as 6.0 or 7.0.

3. Migration plan

This section describes the end-to-end migration process. It explains the technical principles of core data migration and rollback and details the corresponding data validation strategy.

1. Overall migration process

The entire GeminiDB Redis migration process consists of the following main steps to ensure data integrity, business continuity, and minimal risk:

  • Preparation: Evaluate the source and destination environments, including network connectivity, resource planning, and security authentication. Deploy the Redis-full-check and compatibility-test-suite-for-redis tools.

  • Version selection and compatibility validation: When you select the core Redis version, ensure that the Tair (Redis-compatible) instance has the same or a higher version. Use the compatibility-test-suite-for-redis tool to validate the compatibility between the GeminiDB Redis and Tair (Redis-compatible) instances.

  • Database creation and configuration: Create a Tair (Redis-compatible) instance in Alibaba Cloud. Ensure that the instance is compatible with the source GeminiDB Redis instance version and has sufficient resources to handle the data and traffic after migration.

  • Data migration:

    • Forward data migration: Use Huawei Cloud DRS to migrate full and incremental data from the source GeminiDB Redis to the Tair (Redis-compatible) instance.

    • Reverse data migration: After the forward data migration is complete, use Alibaba Cloud DTS or RedisShake to migrate incremental data from the Tair (Redis-compatible) instance back to GeminiDB Redis. This step maintains data consistency in the source and prepares for a potential rollback.

  • Data validation: After full and incremental data synchronization is stable, perform multi-dimensional validation of data consistency between the source and destination Redis instances. This includes checking the data volume and key-value content.

  • Service cutover and validation: Smoothly switch service traffic from the source GeminiDB Redis to the destination Tair (Redis-compatible) instance. Then, perform comprehensive service validation.

  • Old environment cleanup and rollback plan: After you confirm that the new environment is running stably, you can gradually clean up the old environment. At the same time, create a detailed rollback plan to handle any potential issues.

2. Data migration plan

2.1. Compatibility validation

Validation principle:

compatibility-test-suite-for-redis, or ctsr, works as follows:

  • Client behavior simulation: It simulates a standard Redis client and sends various Redis commands to the system under test (SUT).

  • Protocol and command validation: It validates the ability of the SUT to parse the Redis communication protocol (RESP). It also checks whether the response to each command is as expected.

  • Behavioral consistency comparison: It compares the response of the SUT, including return values, data types, and error messages, with the response from a reference Redis instance that has known correct behavior.

  • Data structures and semantics: It thoroughly validates the correctness of the operations of the SUT on various Redis data structures, such as strings, lists, and hashes. It also checks whether the behavior of advanced features, such as command atomicity, time-to-live (TTL), transactions, publish/subscribe, and Lua scripts, is consistent with the official Redis.

  • Error handling: It tests whether the SUT returns the correct error messages when it encounters invalid commands, parameter errors, or type errors.

Prerequisites:

ctsr is written in Python. The test machine must have Python 3.7 or a later version installed.

The machine that runs ctsr must have network connectivity to both GeminiDB Redis and Tair (Redis-compatible).

Risks and notes:

ctsr performs many write operations, such as SET, LPUSH, and HSET. It also typically uses the FLUSHDB or FLUSHALL command to clear data. Running ctsr in a production environment or a staging environment with important data can cause production data to be deleted or overwritten. Do not run ctsr directly in a production environment or a staging environment that contains production data. Always run tests in an isolated, non-production, and disposable staging environment. Examples include a developer machine, a temporary container in a CI/CD pipeline, or a dedicated test virtual machine.

2.2. Forward data migration

Migration principle:

You can use the real-time migration feature of the Huawei Cloud DRS tool. This feature supports migrating data from GeminiDB Redis to other Redis services. This allows data migration from Huawei Cloud GeminiDB Redis to Alibaba Cloud Tair (Redis-compatible).

Prerequisites:

The GeminiDB Redis core version must be 4.2.0 or a later version.

To use the migration feature, you must disable the keyspace notifications for expired events.

Risks and notes:

DRS inserts a key with the prefix DRS_REDIS_TIMESTAMP_HEARTBEAT into GeminiDB Redis to record the update timestamp. If GeminiDB Redis has a cluster architecture, DRS inserts this key on each shard of the source database. This key is filtered out during synchronization and expires after the sync task ends. During incremental synchronization, this key exists in the source database but not in the destination database. You can ignore this key during comparison. If your service also uses keys with the prefix DRS_REDIS_TIMESTAMP_HEARTBEAT, data inconsistency may occur.

2.3. Reverse data migration

Using Data Transmission Service (DTS)
Migration principle:

You can use the data migration feature of the Alibaba Cloud DTS tool. This feature supports migrating data from Tair (Redis-compatible) to other Redis services. This allows data migration from Alibaba Cloud Tair (Redis-compatible) to Huawei Cloud GeminiDB Redis. However, DTS cannot directly enable incremental mode. You must start a new GeminiDB Redis instance on the source side to act as a rollback instance. Then, you can use DTS for full and incremental reverse data migration.

Risks and notes:

DTS inserts a key with the prefix DTS_REDIS_TIMESTAMP_HEARTBEAT into Tair (Redis-compatible) to record the update timestamp. If Tair (Redis-compatible) has a cluster architecture, DTS inserts this key on each shard of the source database. This key is filtered out during synchronization and expires after the sync task ends. During incremental synchronization, this key exists in the source database but not in the destination database. You can ignore this key during comparison. If your service also uses keys with the prefix DTS_REDIS_TIMESTAMP_HEARTBEAT, data inconsistency may occur.

Using RedisShake
Migration principle:

RedisShake uses the Redis keyspace notifications feature to subscribe to key changes. RedisShake uses the psubscribe command to subscribe to __keyevent@*__:*. When a key changes, RedisShake uses the DUMP and RESTORE commands to read the content of the key from the source and write it to the destination.

Introduction to RedisShake

Risks and notes:

Redis has strict restrictions on the RESTORE command. You must ensure that the Redis versions are identical.

The DUMP command is CPU-intensive and can place a high load on the source instance. You cannot rate-limit RedisShake during this phase. Use this command with caution to avoid affecting the availability of the source instance.

3. Data validation plan

3.1. Data validation using Redis-full-check

Redis-full-check performs data validation by fully comparing the data in the source and destination Redis instances. The comparison is performed in multiple rounds. In each round, the tool retrieves data from both the source and destination and compares them for differences. Inconsistent data is recorded in a SQLite3 database for the next round of comparison. This multi-round process helps the data converge and reduces inconsistencies caused by incremental data synchronization. The data that remains in the SQLite database at the end is the final set of differences.

The comparison direction of Redis-full-check is one-way. It retrieves data from source A and checks whether the data exists in destination B. It does not check the other way. This means that the tool checks whether the source is a subset of the destination. To perform a bidirectional comparison, you need to run the comparison twice. The first time, use A as the source and B as the destination. The second time, use B as the source and A as the destination.

3.2. Data validation using Data Transmission Service (DTS)

Data validation is a feature of DTS that monitors data differences between the source and destination databases. It supports the validation of the source and destination databases without service interruption. If inconsistent data is found during the task, DTS re-validates the abnormal data after a specific period. This ensures that the abnormality is not caused by incremental synchronization latency.

4. Cutover plan

This cutover plan uses Huawei Cloud DRS for forward synchronization, Alibaba Cloud DTS for reverse synchronization and validation, and Redis-full-check for forward validation.

4.1. Data synchronization

Configure the whitelist for the Alibaba Cloud Tair (Redis-compatible) instance to allow access only from the Huawei Cloud DRS sync link, the Alibaba Cloud DTS sync link, and the Redis-full-check tool. Establish a DRS sync link for full and incremental data from Huawei Cloud GeminiDB Redis to Alibaba Cloud Tair (Redis-compatible). Establish a DTS sync link for full and incremental data from Alibaba Cloud Tair (Redis-compatible) to the Huawei Cloud GeminiDB Redis rollback instance. Complete the full synchronization and maintain incremental synchronization until the cutover window. Before the cutover window, you can use Redis-full-check to perform a full data validation to verify data consistency.

4.2. Data cutover

Stop writes to the Huawei Cloud GeminiDB Redis. Observe the Huawei Cloud DRS sync link to ensure that no new data is being written. Use Redis-full-check to perform a sample data validation to verify the consistency of incremental data. Update the whitelist of the Alibaba Cloud Tair (Redis-compatible) instance to allow service access. Switch the service to Alibaba Cloud Tair (Redis-compatible). After you verify that the service functions normally, the cutover is complete. Keep the DTS sync link from Alibaba Cloud Tair (Redis-compatible) to Huawei Cloud GeminiDB Redis active for a period and then stop the synchronization.

4.3. Data rollback

If service validation fails and the issue cannot be fixed quickly, stop writes to the Alibaba Cloud Tair (Redis-compatible) instance. Observe the DTS sync link to ensure that no new data is being written. Stop the DTS sync link. Switch the service back to the Huawei Cloud GeminiDB Redis instance.

4. Migration implementation

1. Compatibility validation

1.1. Deploy the compatibility-test tool

Obtain the tool project.

git clone https://github.com/tair-opensource/compatibility-test-suite-for-redis.git
cd compatibility-test-suite-for-redis

Install the dependencies. Python 3.7 or a later version is required.

pip3 install -r requirements.txt

For more information about the test commands and their corresponding version information, see this table.

1.2. Run the compatibility-test tool

The test parameters are described as follows:

optional arguments:
  -h, --help            show this help message and exit
  --host HOST           the redis host
  --port PORT           the redis port
  --password PASSWORD   the redis password
  --testfile TESTFILE   the redis compatibility test cases
  --specific-version {1.0.0,2.8.0,3.2.0,4.0.0,5.0.0,6.0.0,6.2.0,7.0.0,7.2.0}
                        the redis version
  --show-failed         show details of failed tests
  --cluster             server is a node of the Redis cluster
  --ssl                 open ssl connection
  --genhtml             generate test report in html format

Example command:

python3 redis_compatibility_test.py --host 192.168.XX.XX --port 6379 --password Qwer***** --testfile cts.json --specific-version 6.2.0 

2. Forward data migration

For more information, see the Huawei Cloud DRS operation document.

3. Reverse data migration

For more information, see the Alibaba Cloud DTS operation document.

Migration plan overview

4. Data validation

4.1. Data validation using Redis-full-check

Deploy the Redis-full-check tool
wget https://github.com/tair-opensource/RedisFullCheck/releases/download/release-v1.4.8-20200212/redis-full-check-1.4.8.tar.gz
tar -zxcf redis-full-check-1.4.8.tar.gz 
cd redis-full-check-1.4.8/
Run the Redis-full-check tool

Parameter descriptions

  -s, --source=SOURCE               Source Redis address (ip:port). For a cluster, separate different DBs with semicolons (;). You only need to configure one of the primary or replica nodes. For example: 10.1.1.1:1000;10.2.2.2:2000;10.3.3.3:3000.
  -p, --sourcepassword=Password     Source Redis password.
      --sourceauthtype=AUTH-TYPE    Source database management permissions. This parameter is not used for open source Redis.
      --sourcedbtype=               Source database type. 0: DB (standalone or primary/replica), 1: cluster, 2: Alibaba Cloud.
      --sourcedbfilterlist=         Whitelist of logical DBs to fetch from the source. Separate with semicolons (;). For example, 0;5;15 means DB0, DB5, and DB15 will be fetched.
  -t, --target=TARGET               Destination Redis address (ip:port).
  -a, --targetpassword=Password     Destination Redis password.
      --targetauthtype=AUTH-TYPE    Destination database management permissions. This parameter is not used for open source Redis.
      --targetdbtype=               See sourcedbtype.
      --targetdbfilterlist=         See sourcedbfilterlist.
  -d, --db=Sqlite3-DB-FILE          Location of the SQLite3 DB file for storing different keys. Default is result.db.
      --comparetimes=COUNT          Number of comparison rounds.
  -m, --comparemode=                Comparison mode. 1: full comparison. 2: compare only the value length. 3: compare only if the key exists. 4: full comparison but ignore large keys.
      --id=                         Used for metrics.
      --jobid=                      Used for metrics.
      --taskid=                     Used for metrics.
  -q, --qps=                        QPS rate limit threshold.
      --interval=Second             Interval in seconds between rounds.
      --batchcount=COUNT            Batch aggregation count.
      --parallel=COUNT              Number of concurrent coroutines for comparison. Default is 5.
      --log=FILE                    Log file.
      --result=FILE                 Record inconsistent results to the result file. Format: 'db    diff-type    key    field'.
      --metric=FILE                 Metric file.
      --bigkeythreshold=COUNT       Threshold for splitting large keys. Used for comparemode=4.
  -f, --filterlist=FILTER           List of keys to compare, separated by semicolons (;). For example, "abc*|efg|m*" compares 'abc', 'abc1', 'efg', 'm', and 'mxyz', but not 'efgh' or 'p'.
  -v, --version

Example

For example, the source Redis is 113.47.XX.XX:6379 and the destination is r-bp1dql854dakxxxxxx.redis.rds.aliyuncs.com:6379.

./redis-full-check -s 113.47.XX.XX:6379 -p mock_source_password -t r-bp1dql854dakxxxxxx.redis.rds.aliyuncs.com:6379 -a mock_target_password --comparemode=1 --comparetimes=1 --log log --result result

The execution results are saved to a SQLite3 database file. If you do not specify a path, the system creates a result.db.<N> file in the current working directory, where N is the comparison round number.
The database design includes the following:

  • Primary table (key): Summarizes inconsistent key names.

  • Details table (field): Records detailed inconsistency information for members of Hash, Set, and ZSet types, or indexes of List types. It is linked to the primary table using the key_id foreign key.

  • Process tables (key_<N>, field_<N>): Store the intermediate comparison status for each iteration round for traceability.

Example result

[ecs-assist-user@iZbp1daxq5tl4bibxxxxxx redis-full-check-1.4.8]$ sqlite3 result.db.1
SQLite version 3.26.0 2018-12-01 12:34:55
Enter ".help" for usage hints.
sqlite> .headers on
sqlite> .mode column
sqlite> select * from key;
id          key         type        conflict_type  db          source_len  target_len
----------  ----------  ----------  -------------  ----------  ----------  ----------
1           user:1006   string      value          0           11          9         
2           user:1001   string      value          0           11          9         
3           user:1010   string      value          0           11          9         
4           user:1008   string      value          0           11          9         
5           user:1009   string      value          0           11          9         
6           user:1004   string      value          0           11          9         
7           user:1005   string      value          0           11          9         
8           user:1007   string      value          0           11          9         
9           user:1002   string      value          0           11          9         
10          user:1011   string      lack_target    0           11          0         
11          user:1003   string      value          0           11          9         
12          user:1002   string      lack_target    1           11          0         
13          user:1008   string      lack_target    1           11          0         
14          user:1003   string      lack_target    1           11          0         
15          user:1006   string      lack_target    1           11          0         
16          user:1007   string      lack_target    1           11          0         
17          user:1004   string      lack_target    1           11          0         
18          user:1005   string      lack_target    1           11          0         
19          user:1009   string      lack_target    1           11          0         
20          user:1011   string      lack_target    1           11          0         
21          user:1010   string      lack_target    1           11          0         
22          user:1001   string      lack_target    1           11          0         
23          user:1006   string      lack_target    2           11          0         
24          user:1003   string      lack_target    2           11          0         
25          user:1010   string      lack_target    2           11          0         
26          user:1011   string      lack_target    2           11          0         
27          user:1007   string      lack_target    2           11          0         
28          user:1002   string      lack_target    2           11          0         
29          user:1001   string      lack_target    2           11          0         
30          user:1004   string      lack_target    2           11          0         
31          user:1005   string      lack_target    2           11          0         
32          user:1009   string      lack_target    2           11          0         
33          user:1008   string      lack_target    2           11          0         
sqlite> .exit 

4.2. Data validation using Alibaba Cloud Data Transmission Service (DTS)

When you use DTS for data migration, you can select the data validation task. You can then check the data validation results in the data migration task.

5. Migration considerations

1. Storage class

Huawei Cloud GeminiDB Redis uses a hybrid storage class of memory and SSD. Tair (Redis-compatible) has gradually phased out this approach. Choosing the memory storage class may increase your costs.

2. Bitmap usage

Huawei Cloud GeminiDB Redis has a special optimization for Bitmaps. This optimization allows them to be used like a normal String with fast APPEND operations. If you use this feature, you must modify your code to use standard commands such as SETBIT before you migrate to Tair (Redis-compatible).