RedisShake使用案例
下载shake工具
mkdir /data/reidsshake -p
cd /data/reidsshake
wget https://github.com/tair-opensource/RedisShake/releases/download/v3.1.11/redis-shake-linux-amd64.tar.gz
tar xf redis-shake-linux-amd64.tar.gz
cd redis-shake
调整配置文件
cat sync.toml
type = "sync"
[source]
version = 5.0 # redis version, such as 2.8, 4.0, 5.0, 6.0, 6.2, 7.0, ...
#源端地址
address = "127.0.0.1:6379"
username = "" # keep empty if not using ACL
#源端密码
password = "skkkkkkkkkkkkk" # keep empty if no authentication is required
tls = false
elasticache_psync = "" # using when source is ElastiCache. ref: https://github.com/alibaba/RedisShake/issues/373
[target]
type = "standalone" # "standalone" or "cluster"
version = 5.0 # redis version, such as 2.8, 4.0, 5.0, 6.0, 6.2, 7.0, ...
#目标端地址
address = "127.0.0.1:6380"
username = "" # keep empty if not using ACL
#密码
password = "stttttttttt" # keep empty if no authentication is required
#常规没有开启,aws等云厂实例可酌情打开
tls = false
[advanced]
dir = "data"
ncpu = 4
pprof_port = 0
metrics_port = 0
log_file = "redis-shake.log"
log_level = "info" # debug, info or warn
log_interval = 5 # in seconds
rdb_restore_command_behavior = "rewrite" # panic, rewrite or skip
pipeline_count_limit = 1024
target_redis_client_max_querybuf_len = 1024_000_000
target_redis_proto_max_bulk_len = 512_000_000
启动同步
nohup redis-shake sync.toml &
#查看同步进度
# tail -f nohup.out
#curl 127.0.0.1:xxx/progress|python -m json.tool