Skip to content

About

Add bidirectional data synchronization functionality on top of the original project, with the ability to tag the data source (Redis) and insertion time.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

RedisShake: Redis Data Transformation and Migration Tool

CI Website Release ghcr.io

Overview

RedisShake is a powerful tool for Redis data transformation and migration, offering:

  1. Zero Downtime Migration: Enables seamless data migration without data loss or service interruption, ensuring continuous operation during the transfer process.

  2. Redis Compatibility: Supports Redis 2.8 to 7.4, across standalone, master-slave, sentinel, and cluster deployments.

  3. Cloud Service Integration: Seamlessly works with Redis-like databases from major cloud providers:

  4. Module Support: Compatible with TairString, TairZSet, and TairHash.

  5. Flexible Data Source: Supports PSync, RDB, and Scan data fetch methods.

  6. Advanced Data Processing: Enables custom script-based data transformation and easy-to-use data filter rules.

  7. New Features: Supported acyclic two-way synchronization, enabling bidirectional data migration between Redis instances. But the two-way synchronization feature only supports sync_reader mode, not rdb_reader and scan_reader mode. You must confirm that the redis mode is consistent with the cluster-enable configuration, otherwise the two-way synchronization feature will not work.

How to Get RedisShake

  1. Download from Releases.

  2. Use Docker:

docker run --network host \
    -e SYNC=true \
    -e SHAKE_SRC_ADDRESS=127.0.0.1:6379 \
    -e SHAKE_DST_ADDRESS=127.0.0.1:6380 \
    ghcr.io/tair-opensource/redisshake:latest
  1. Build it yourself:
git clone https://github.com/tair-opensource/RedisShake
cd RedisShake
sh build.sh

How to Use RedisShake

To move data between two Redis instances and skip some keys:

  1. Make a file called shake.toml with these settings:
[sync_reader]
address = "127.0.0.1:6379"

[redis_writer]
address = "127.0.0.1:6380"

[filter]
# skip keys with "temp:" or "cache:" prefix
block_key_prefix = ["temp:", "cache:"] 
  1. Using the acyclic two-way synchronization feature, you need to add the following configuration to the shake.toml file:
cluster = false            # Set to true if the source is a Redis cluster
address = "127.0.0.1:9001" # For clusters, specify the address of any cluster node; use the master or slave address in master-slave mode
sync_rdb = true            # Set to false if RDB synchronization is not required
sync_aof = true            # Set to false if AOF synchronization is not required
bisync = true              # set to true for Data Synchronization Between Different Two Redis  (Preventing Infinite Sync Loops)
#prefix = "bsy&88@*"        # as prefix of marking keys


[redis_writer] 
cluster = true            # set to true if target is a redis cluster
address = "127.0.0.1:8001" # when cluster is true, set address to one of the cluster node
  1. Run RedisShake:
./redis-shake shake.toml

For more help, check the docs.

Compatibility Report

Planning a major version upgrade? To prevent unexpected issues, please check our Major Version Compatibility Report for a list of breaking changes and important bug fixes.

History

RedisShake, actively maintained by the Tair team at Alibaba Cloud, evolved from redis-port. Key milestones:

  • RedisShake 2.x: Improved stability and performance.
  • RedisShake 3.x: Complete codebase rewrite, enhancing efficiency and usability.
  • RedisShake 4.x: Enhanced readers, configuration, observability, and functions.

License

RedisShake is open-sourced under the MIT license.

About

Add bidirectional data synchronization functionality on top of the original project, with the ability to tag the data source (Redis) and insertion time.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages