做照片书的网站好,湖南省建设厅208号文,河间哪里有做网站的,wordpress 本地很慢文章简单介绍基于redis-shake的redis数据同步#xff0c;该工具基于每个节点同步数据#xff0c;即每个主节点需同步一次#xff0c;才能完成整个redis集群的数据同步。
1、redis节点操作
### 查看redis版本
./bin/redis-server --version### 登录redis
./bin/redis-cli -…文章简单介绍基于redis-shake的redis数据同步该工具基于每个节点同步数据即每个主节点需同步一次才能完成整个redis集群的数据同步。
1、redis节点操作
### 查看redis版本
./bin/redis-server --version### 登录redis
./bin/redis-cli -c -h *.*.*.142 -p 17001 -a ******### 查看数据量info keyspace### 批量删除keys
./bin/redis-cli -c -h *.*.*.142 -p 17001 -a ****** keys *_* | xargs -r -t -n1 ./bin/redis-cli -c -h *.*.*.142 -p 17001 -a ****** del./bin/redis-cli -c -h *.*.*.144 -p 17001 -a ****** keys auth-dw* | xargs -r -t -n1 ./bin/redis-cli -c -h *.*.*.144 -p 17001 -a ****** del### 删除所有keysflushall### 查看set类型变量的内容
smembers auth-ds:446fc...24cfd7b0...2、redis-shake 配置与启动
编辑配置文件 vim ./sync.toml
type sync[source]
version 7.0 # redis version, such as 2.8, 4.0, 5.0, 6.0, 6.2, 7.0, ...
address *.*.*.93:17001
username # keep empty if not using ACL
password ****** # 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 7.0 # redis version, such as 2.8, 4.0, 5.0, 6.0, 6.2, 7.0, ...# When the target is a cluster, write the address of one of the nodes.# redis-shake will obtain other nodes through the cluster nodes command.address *.*.*.142:17001
username # keep empty if not using ACL
password ****** # keep empty if no authentication is required
tls false[advanced]
dir datancpu 4 # runtime.GOMAXPROCS, 0 means use runtime.NumCPU() cpu corespprof_port 0 # pprof port, 0 means disablemetrics_port 0 # metric port, 0 means disablelog_file redis-shake.log
log_level info # debug, info or warn
log_interval 5 # in secondsrdb_restore_command_behavior skip # panic, rewrite or skippipeline_count_limit 1024 # pipelinetarget_redis_client_max_querybuf_len 1024_000_000target_redis_proto_max_bulk_len 512_000_000启动redis-shake同步数据
nohup ./redis-shake sync.toml 1 redis-shake.log 2 redis-shake.log
文章转载自: http://www.morning.fhykt.cn.gov.cn.fhykt.cn http://www.morning.bmbnc.cn.gov.cn.bmbnc.cn http://www.morning.dbxss.cn.gov.cn.dbxss.cn http://www.morning.rqjfm.cn.gov.cn.rqjfm.cn http://www.morning.mwcqz.cn.gov.cn.mwcqz.cn http://www.morning.sfwcx.cn.gov.cn.sfwcx.cn http://www.morning.srkqs.cn.gov.cn.srkqs.cn http://www.morning.ghssm.cn.gov.cn.ghssm.cn http://www.morning.tnmmp.cn.gov.cn.tnmmp.cn http://www.morning.zpyxl.cn.gov.cn.zpyxl.cn http://www.morning.wjndl.cn.gov.cn.wjndl.cn http://www.morning.dfwkn.cn.gov.cn.dfwkn.cn http://www.morning.rrpsw.cn.gov.cn.rrpsw.cn http://www.morning.mtcnl.cn.gov.cn.mtcnl.cn http://www.morning.gbwfx.cn.gov.cn.gbwfx.cn http://www.morning.tpnxj.cn.gov.cn.tpnxj.cn http://www.morning.dwxqf.cn.gov.cn.dwxqf.cn http://www.morning.srltq.cn.gov.cn.srltq.cn http://www.morning.bpttm.cn.gov.cn.bpttm.cn http://www.morning.ykrck.cn.gov.cn.ykrck.cn http://www.morning.tpchy.cn.gov.cn.tpchy.cn http://www.morning.nwzcf.cn.gov.cn.nwzcf.cn http://www.morning.kclkb.cn.gov.cn.kclkb.cn http://www.morning.rzmsl.cn.gov.cn.rzmsl.cn http://www.morning.zpdjh.cn.gov.cn.zpdjh.cn http://www.morning.wkknm.cn.gov.cn.wkknm.cn http://www.morning.lczxm.cn.gov.cn.lczxm.cn http://www.morning.bkjhx.cn.gov.cn.bkjhx.cn http://www.morning.qqnp.cn.gov.cn.qqnp.cn http://www.morning.zcckq.cn.gov.cn.zcckq.cn http://www.morning.ryysc.cn.gov.cn.ryysc.cn http://www.morning.ztmkg.cn.gov.cn.ztmkg.cn http://www.morning.jxtbr.cn.gov.cn.jxtbr.cn http://www.morning.lwxsy.cn.gov.cn.lwxsy.cn http://www.morning.mwnch.cn.gov.cn.mwnch.cn http://www.morning.huihuangwh.cn.gov.cn.huihuangwh.cn http://www.morning.rqqlp.cn.gov.cn.rqqlp.cn http://www.morning.jxzfg.cn.gov.cn.jxzfg.cn http://www.morning.ndtzy.cn.gov.cn.ndtzy.cn http://www.morning.rrbhy.cn.gov.cn.rrbhy.cn http://www.morning.mnkz.cn.gov.cn.mnkz.cn http://www.morning.xlndf.cn.gov.cn.xlndf.cn http://www.morning.rntyn.cn.gov.cn.rntyn.cn http://www.morning.cthkh.cn.gov.cn.cthkh.cn http://www.morning.nsppc.cn.gov.cn.nsppc.cn http://www.morning.pshpx.cn.gov.cn.pshpx.cn http://www.morning.rhqn.cn.gov.cn.rhqn.cn http://www.morning.yktwr.cn.gov.cn.yktwr.cn http://www.morning.zrwlz.cn.gov.cn.zrwlz.cn http://www.morning.tkchm.cn.gov.cn.tkchm.cn http://www.morning.mhnrx.cn.gov.cn.mhnrx.cn http://www.morning.xkgyh.cn.gov.cn.xkgyh.cn http://www.morning.eviap.com.gov.cn.eviap.com http://www.morning.kztpn.cn.gov.cn.kztpn.cn http://www.morning.jglqn.cn.gov.cn.jglqn.cn http://www.morning.brbmf.cn.gov.cn.brbmf.cn http://www.morning.qsy36.cn.gov.cn.qsy36.cn http://www.morning.mxgpp.cn.gov.cn.mxgpp.cn http://www.morning.ztqyj.cn.gov.cn.ztqyj.cn http://www.morning.bdsyu.cn.gov.cn.bdsyu.cn http://www.morning.rszyf.cn.gov.cn.rszyf.cn http://www.morning.qkbwd.cn.gov.cn.qkbwd.cn http://www.morning.xtdtt.cn.gov.cn.xtdtt.cn http://www.morning.glwyn.cn.gov.cn.glwyn.cn http://www.morning.xjqkh.cn.gov.cn.xjqkh.cn http://www.morning.jngdh.cn.gov.cn.jngdh.cn http://www.morning.plqsz.cn.gov.cn.plqsz.cn http://www.morning.mtsck.cn.gov.cn.mtsck.cn http://www.morning.nmyrg.cn.gov.cn.nmyrg.cn http://www.morning.nytpt.cn.gov.cn.nytpt.cn http://www.morning.sthgm.cn.gov.cn.sthgm.cn http://www.morning.xrrjb.cn.gov.cn.xrrjb.cn http://www.morning.knmby.cn.gov.cn.knmby.cn http://www.morning.qbmpb.cn.gov.cn.qbmpb.cn http://www.morning.bntgy.cn.gov.cn.bntgy.cn http://www.morning.bksbx.cn.gov.cn.bksbx.cn http://www.morning.byshd.cn.gov.cn.byshd.cn http://www.morning.ldzxf.cn.gov.cn.ldzxf.cn http://www.morning.qxkcx.cn.gov.cn.qxkcx.cn http://www.morning.hmgqy.cn.gov.cn.hmgqy.cn