About
The Redis Migrator is a Golang-based tool designed to migrate database keys from one Redis cluster to another.
Since Redis 5.0.0
, you can use REPLICAOF
command to replicate data from one redis to another.
This application is developed for the older version of Redis or AWS ElastiCache instances that do not support REPLICAOF
command (AWS docs).
(This repo is forked from opstree/redis-migration. The original repo has been inactive for over 3 years, so I decided to continue its development without creating pull requests.)
Supported key types:
- String
- Hash
- List
- Set
- Sorted Set
Usage
Installation
Using Go
go install github.com/huantt/redis-migrator@latest
Using Docker
docker run \
--rm \
-v /path/to/migrate.yaml:/data/migrate.yaml \
huanttok/redis-migrator migrate \
--config.file=/data/migrate.yaml \
--log.level=debug
To call localhost
while using Docker, use host.docker.internal
instead.
Configuration
For using redis-migrator, we have to create a configuration file and provide some needful information to it. An example…