Redis 数据同步 redis-port

MIT
Google Go
跨平台
豌豆荚
2015-04-19
红薯

redis-port 是一个 Redis 工具,通过解析 rdb 文件,实现 Redis 主节点和从节点的数据同步。

示例:

$ cat dump.rdb | ./redis-port decode 2>/dev/null
  {"db":0,"type":"string","expireat":0,"key":"a","key64":"YQ==","value64":"MTAwMDA="}
  {"db":0,"type":"string","expireat":0,"key":"b","key64":"Yg==","value64":"aGVsbG8ud29ybGQ="}
  {"db":0,"type":"hash","expireat":0,"key":"c","key64":"Yw==","field":"c1","field64":"YzE=","member64":"MTAw"
  {"db":0,"type":"hash","expireat":0,"key":"c","key64":"Yw==","field":"c2","field64":"YzI=","member64":"dGVzdC5zdHJpbmc="}
  {"db":0,"type":"list","expireat":0,"key":"d","key64":"ZA==","index":0,"value64":"bDE="}
  {"db":0,"type":"list","expireat":0,"key":"d","key64":"ZA==","index":1,"value64":"bDI="}
  {"db":0,"type":"zset","expireat":0,"key":"e","key64":"ZQ==","member":"e1","member64":"ZTE=","score":1.000000}
  {"db":0,"type":"zset","expireat":0,"key":"e","key64":"ZQ==","member":"e2","member64":"ZTI=","score":2.000000}
  ... ...

加载中

评论(0)

暂无评论

暂无资讯

暂无问答

阿里云esc 使用docker部署redis集群

原文参考的 https://www.cnblogs.com/lianggp/articles/8136222.html 我只是实践了以后把我遇到的问题整理记录下来 一:阿里云如果是centos最好是7以上,可以安装 最新的docker-ce 二:安装最...

2018/10/14 11:14
268
1
Docker容器安装Redis集群

Redis集群分两种模式,一种是Master-Slave模式,就是主从模式,一个master带多个slave,另外一种是cluster模式,由多组master-slave组成。 |>>>>>>>>主从模式<<<<<<<<<<| 准备一个目录,比如...

02/15 10:52
144
0
keepalived + redis 主备容灾部署

# 方案图 ![方案部署](https://static.oschina.net/uploads/img/201608/17160847_Xzdo.png "方案部署图") 现网环境中有两个数据库主机,master, 和slave。以及一个vip Master: 192.168.11...

2016/08/17 16:38
71
0
kubernetes 使用kubectl port-forward 访问应用

概述或功能 通过端口转发映射本地端口到指定的应用端口 例子 创建 Redis deployment and service 创建redis deployment kubectl create -f https://k8s.io/docs/tutorials/stateless-applic...

02/13 10:33
67
0
Redis使用redis-trib.rb创建带密码的集群问题总结

1、设定集群密码 各个节点的配置中设定密码,注意集群模式下,下面两行都需要 1 2 masterauth passwd123 requirepass passwd123 2、各个节点的配置中开启集群配置的相关选项,如下: 1 2 3 ...

09/11 09:16
71
0
linux之yum安装redis

因为Redis是C实现的,需要gcc来进行编译,所以原因是系统未安装gcc,按顺序执行: yum install cpp yum install binutils yum install glibc yum install glibc-kernheaders yum install gli...

2018/12/19 12:00
10
0
基于docker的redis集群搭建

获取redis配置文件 wget http://download.redis.io/redis-stable/redis.conf 复制主从配置文件 cp redis.conf redis-master.conf cp redis.conf redis-slave.conf 修改主库配置信息 # 设置任...

03/16 17:17
51
0
windows搭建redis伪集群

一、安装 ruby 环境 1、解压 rubyinstaller-2.5.0-2-x64.7z 到指定目录 2、添加 RUBY_HOME 系统变量。变量名:RUBY_HOME;变量值:C:\rubyinstaller-2.5.0-2-x64 3、修改 Path 系统变量。追加...

04/08 22:59
16
0
redis集群

一、主从集群 1.1 修改配置文件并安装redis (1)修改 redis.windows-service.conf 文件 [redis6380主] port 6380 [redis6381从] port 6381 slaveof 127.0.0.1 6380 [redis6382从] port 6382...

2018/05/30 16:33
9
0

没有更多内容

加载失败,请刷新页面

返回顶部
顶部