可以做ppt的网站或软件,博客推广的方法与技巧,聊城市城乡建设部网站查询,河南搜索引擎推广价格“当需要进行Redis实例或集群数据迁移时#xff0c;我们可以采用导出/导入的方式进行数据迁移#xff0c;但当需要做数据异地灾备或双活时#xff0c;再使用传统的方式就不合适了#xff0c;我们需要借助工具(如redis-port/redis-shake)来完成。”redis-shake介绍redis-sha… “当需要进行Redis实例或集群数据迁移时我们可以采用导出/导入的方式进行数据迁移但当需要做数据异地灾备或双活时再使用传统的方式就不合适了我们需要借助工具(如redis-port/redis-shake)来完成。”redis-shake介绍redis-shake就是一款非常好用的工具可以支持备份、恢复、解析、同步等功能主要的功能有decode对RDB文件进行读取并以json格式存储restore将RDB文件恢复到目的Redis服务器dump将源Redis服务器的数据通过RDB文件的方式保存下来sync支持源Redis和目的Redis的数据同步通过模拟成Slave(使用psync)支持全量和增量数据的同步对单节点、主从、集群环境之间进行同步(2.8-5.0版本codis环境)也支持云上环境rump使用scan和restore命令进行数据迁移对不支持psync命令的环境可以使用这种方式仅支持全量的数据迁移数据迁移原理redis-shake通过模拟成一个从节点加入到源Redis进行全量拉取并回放然后进行增量的拉取。其对大key的同步支持分批拉取同时提供监控数据。迁移演练如从云上Redis迁移到线下Redis./redis-shake.linux \-type sync \-conf redis-shake.conf参考配置文件# idid redis-shake# parallel routines number used in RDB file syncing.parallel 4# source redis configuration.# used in dump and sync.# ip:portsource.address 172.17.134.223:6379# password.source.password_raw xxx# auth type, dont modify itsource.auth_type auth# version number, default is 6 (6 for Redis Version 3.0.7, 7 for 3.2.0)source.version 6# target redis configuration. used in restore and sync.# used in restore and sync.# ip:porttarget.address 10.0.2.23:6379# password.target.password_raw xx# auth type, dont modify ittarget.auth_type auth# version number, default is 6 (6 for Redis Version 3.0.7, 7 for 3.2.0)target.version 6# all the data will come into this db. # used in restore and sync.target.db -1# big key threshold, the default is 500 * 1024 * 1024. The field of the big key will be split in processing.big_key_threshold 524288000# use psync command.# used in sync.# 默认使用sync命令启用将会使用psync命令psync false同时也提供迁移的状态监控curl 127.0.0.1:9320/metric|jq数据一致性校验迁移后数据的一致性使用redis-full-check进行检查通过多次对比的方式进行源端和目的端的数据校验每次都会抓取源和目的端的数据进行差异化比较记录不一致的数据(存储在sqlite3中)进入下一轮对比支持对key、value或两者的一致性进行校验。云上服务之间我们可以使用DTS来进行毕竟是付费服务相对来说更简单需要在Redis服务上创建复制类型的账号。