redis-shake安装部署(4.0.2)

发布时间 2023-11-07 14:10:12作者: slnngk

环境:
Os:Centos 7
redis-shake:4.0.2

说明:
redis源端和目的端都是单节点


1.项目地址
https://github.com/tair-opensource/RedisShake/tags

2.下载介质
我这里下载的版本是4.0.2,文件如下:
redis-shake-linux-amd64.tar.gz

 

3.安装
[root@localhost soft]# mkdir -p /opt/redis-shake
[root@localhost soft]# mv redis-shake-linux-amd64.tar.gz /opt/redis-shake/
[root@localhost soft]# cd /opt/redis-shake
[root@localhost redis-shake]# tar -xvf redis-shake-linux-amd64.tar.gz

 

 

4.修改配置文件(只修改红色部分)

[root@localhost redis-shake]# more shake.toml
function = ""


[sync_reader]
cluster = false
address = "192.168.1.108:7051"
username = ""              # keep empty if not using ACL
password = "redis123"              # keep empty if no authentication is required
tls = false

# [scan_reader]
# cluster = false
# address = "127.0.0.1:6379"
# username = ""              # keep empty if not using ACL
# password = ""              # keep empty if no authentication is required
# tls = false

# [rdb_reader]
# filepath = "/tmp/dump.rdb"

[redis_writer]
cluster = false
address = "192.168.1.109:7051"
username = ""              # keep empty if not using ACL
password = "redis123"              # keep empty if no authentication is required
tls = false

 

5.启动

[root@localhost redis-shake]# ./redis-shake /opt/redis-shake/shake.toml
2023-11-07 00:59:09 INF load config from file: /opt/redis-shake/shake.toml
2023-11-07 00:59:09 INF log_level: [info], log_file: [/opt/redis-shake/data/shake.log]
2023-11-07 00:59:09 INF changed work dir to [/opt/redis-shake/data]
2023-11-07 00:59:09 INF GOMAXPROCS defaults to the value of runtime.NumCPU [1]
2023-11-07 00:59:09 INF not set pprof port
2023-11-07 00:59:09 INF no function script
2023-11-07 00:59:09 INF create SyncStandaloneReader: 192.168.1.108:7051
2023-11-07 00:59:09 INF create RedisStandaloneWriter: 192.168.1.109:7051
2023-11-07 00:59:09 INF not set status port
2023-11-07 00:59:09 INF start syncing...
2023-11-07 00:59:14 INF read_count=[11], read_ops=[0.00], write_count=[11], write_ops=[0.00], syncing aof, diff=[0]
2023-11-07 00:59:19 INF read_count=[11], read_ops=[0.00], write_count=[11], write_ops=[0.00], syncing aof, diff=[0]
2023-11-07 00:59:24 INF read_count=[11], read_ops=[0.00], write_count=[11], write_ops=[0.00], syncing aof, diff=[0]
2023-11-07 00:59:29 INF read_count=[11], read_ops=[0.00], write_count=[11], write_ops=[0.00], syncing aof, diff=[0]
2023-11-07 00:59:34 INF read_count=[11], read_ops=[0.00], write_count=[11], write_ops=[0.00], syncing aof, diff=[0]
2023-11-07 00:59:39 INF read_count=[11], read_ops=[0.00], write_count=[11], write_ops=[0.00], syncing aof, diff=[0]

 

6.登录到目的库进行验证
/usr/local/services/redis/bin/redis-cli -h 192.168.1.109 -p 7051 -a redis123
192.168.1.109:7051> keys