{"id":23647037,"url":"https://github.com/supercaracal/redis-cluster-data-transfer","last_synced_at":"2025-10-16T07:32:15.493Z","repository":{"id":60626061,"uuid":"266833107","full_name":"supercaracal/redis-cluster-data-transfer","owner":"supercaracal","description":"Data-copy tool between Redis clusters","archived":false,"fork":false,"pushed_at":"2022-10-19T01:32:33.000Z","size":95,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-31T22:36:07.986Z","etag":null,"topics":["redis-cluster","tool"],"latest_commit_sha":null,"homepage":"https://redis.io/docs/reference/cluster-spec/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/supercaracal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-25T16:54:07.000Z","updated_at":"2025-07-31T22:38:36.000Z","dependencies_parsed_at":"2023-01-20T06:03:53.754Z","dependency_job_id":null,"html_url":"https://github.com/supercaracal/redis-cluster-data-transfer","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/supercaracal/redis-cluster-data-transfer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supercaracal%2Fredis-cluster-data-transfer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supercaracal%2Fredis-cluster-data-transfer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supercaracal%2Fredis-cluster-data-transfer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supercaracal%2Fredis-cluster-data-transfer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/supercaracal","download_url":"https://codeload.github.com/supercaracal/redis-cluster-data-transfer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supercaracal%2Fredis-cluster-data-transfer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279165815,"owners_count":26117931,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-16T02:00:06.019Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["redis-cluster","tool"],"created_at":"2024-12-28T13:49:02.975Z","updated_at":"2025-10-16T07:32:15.456Z","avatar_url":"https://github.com/supercaracal.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"Redis Cluster Data Transfer ![](https://github.com/supercaracal/redis-cluster-data-transfer/workflows/Test/badge.svg?branch=master)\n=================================\n\nThis tool copies all keys from a Redis cluster to another one as able as possible by command.\n\nI want to migrate my redis cluster from 3 to 5.  \nOfficial Redis client has migration feature but source data is deleted.  \n\n[Redis cluster tutorial](https://redis.io/topics/cluster-tutorial)\n\n\u003e There is an alternative way to import data from external instances to a Redis Cluster, which is to use the `redis-cli --cluster import` command.\n\u003e The command moves all the keys of a running instance (deleting the keys from the source instance) to the specified pre-existing Redis Cluster.\n\nI need a copy tool.\n\n## Using commands\n\n* [CLUSTER SLOTS](https://redis.io/commands/cluster-slots)\n  * For mapping nodes and slots\n* [CLUSTER COUNTKEYSINSLOT](https://redis.io/commands/cluster-countkeysinslot)\n  * For counting keys in a slot\n* [CLUSTER GETKEYSINSLOT](https://redis.io/commands/cluster-getkeysinslot)\n  * For listing keys in a slot\n* [DUMP](https://redis.io/commands/dump)\n  * For fetching a key from source node\n* [PTTL](https://redis.io/commands/pttl)\n  * For fetching remained TTL milliseconds of a key\n* [RESTORE](https://redis.io/commands/restore)\n  * For transferring a key to destination node\n\n## Not supported\n* AUTH\n* SSL\n* RESP3\n* Windows\n\nso on and so forth\n\n## TODO\n* Use non-blocking IO\n\n## Trial\n\n```\n$ git clone https://github.com/supercaracal/redis-cluster-data-transfer.git\n$ cd redis-cluster-data-transfer/\n$ make\n$ docker compose up -d\n\n$ bin/cli 127.0.0.1:16371\n\u003e\u003e set key1 1\nOK\n\u003e\u003e set key2 2\nOK\n\u003e\u003e set key3 3\nOK\n\u003e\u003e quit\n\n$ bin/exe 127.0.0.1:16371 127.0.0.1:16381\n3 keys were found\n3 keys were copied\n0 keys were skipped\n0 keys were failed\n\n$ bin/diff 127.0.0.1:16371 127.0.0.1:16381\n3 keys were found\n3 keys were same\n0 keys were different\n0 keys were deficient\n0 keys were failed\n0 keys were skipped\n\n$ bin/cli 127.0.0.1:16381\n\u003e\u003e get key1\n1\n\u003e\u003e get key2\n2\n\u003e\u003e get key3\n3\n\u003e\u003e quit\n$\n```\n\n## Dry run\n\n```\n$ bin/exe 127.0.0.1:16371 127.0.0.1:16381 -C\n```\n\n## Performance\nIt takes approximately 3 minutes while 10 million keys are copied. This program is I/O bound.\n\n## See also\n* [Netflix/dynomite](https://github.com/Netflix/dynomite)\n* [sripathikrishnan/redis-rdb-tools](https://github.com/sripathikrishnan/redis-rdb-tools)\n* [alibaba/RedisShake](https://github.com/alibaba/RedisShake)\n* [alibaba/RedisFullCheck](https://github.com/alibaba/RedisFullCheck)\n* [vipshop/redis-migrate-tool](https://github.com/vipshop/redis-migrate-tool)\n* [frsyuki/embulk-plugin-redis](https://github.com/frsyuki/embulk-plugin-redis)\n* [opstree/redis-migration](https://github.com/opstree/redis-migration)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupercaracal%2Fredis-cluster-data-transfer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupercaracal%2Fredis-cluster-data-transfer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupercaracal%2Fredis-cluster-data-transfer/lists"}