自建codis上阿里云

阿里开源项目地址:https://github.com/alibaba/RedisShake

程序下载地址:https://github.com/alibaba/RedisShake/releases

注意是在你需要同步的这台机器去同步,有多少台机器就部署多少台机器去同步到目标地址

下载最新程序,里面包含了配置文件

https://github.com/alibaba/RedisShake/releases/download/release-v2.0.3-20200724/redis-shake-v2.0.3.tar.gz
tar xf redis-shake-v2.0.3.tar.gz
redis-shake-v2.0.3

配置文件

egrep -v "^$|^#" redis-shake.conf
conf.version = 1
id = redis-shake
log.file =
log.level = info
pid_path = 
system_profile = 9310
http_profile = 9320
parallel = 32
source.type = standalone
source.address = 0.0.0.0:6379   #需要同步的本地地址
source.password_raw =           #本地redis的认证密码
source.auth_type = auth
source.tls_enable = false
source.rdb.input = local
source.rdb.parallel = 0
source.rdb.special_cloud = 
target.type = standalone
target.address = xxx.xxx.xxx.xxx:6379     #云redis地址和端口
target.password_raw =                     #目标云redis的认证密码
target.auth_type = auth
target.db = -1
target.tls_enable = false
target.rdb.output = local_dump
target.version =
fake_time =
key_exists = none
filter.db.whitelist =
filter.db.blacklist =
filter.key.whitelist =
filter.key.blacklist =
filter.slot =
filter.lua = false
big_key_threshold = 524288000
metric = true
metric.print_log = false
sender.size = 104857600
sender.count = 4095    #默认值,可以根据需求进行调整,
sender.delay_channel_size = 65535
keep_alive = 0
scan.key_number = 50
scan.special_cloud =
scan.key_file =
qps = 200000
resume_from_break_point = false
replace_hash_tag = false

 

开始同步,同步时间取决于网络,文件大小决定

./redis-shake.linux -type=sync -conf=./redis-shake.conf  

posted @ 2021-06-14 13:43  缺个好听的昵称  阅读(1)  评论(0编辑  收藏  举报