Redis数据迁移同步

Redis数据迁移同步

使用阿里云开发的redis-shake工具来进行数据同步。

官方文档:https://tair-opensource.github.io/RedisShake/zh/

工具:https://github.com/tair-opensource/RedisShake

  1. redis-shake下载,到github下载,这里下载的是redis-shake-v4.4.0-linux-amd64.tar.gz
  2. 将redis-shake上传到服务器
  3. 解压redis-shake
bash 复制代码
tar -zxvf redis-shake-v4.4.0-linux-amd64.tar.gz
  1. 编辑修改redis-shake工具使用的shake.toml,主要是修改[sync_reader]、[redis_writer]部分
bash 复制代码
[sync_reader]
cluster = false            # Set to true if the source is a Redis cluster
address = "源Redis:26379" # For clusters, specify the address of any cluster node; use the master or slave address in master-slave mode
username = ""              # Keep empty if ACL is not in use
password = ""              # Keep empty if no authentication is required
tls = false                # Set to true to enable TLS if needed
sync_rdb = true            # Set to false if RDB synchronization is not required
sync_aof = true            # Set to false if AOF synchronization is not required
prefer_replica = false     # Set to true to sync from a replica node
try_diskless = false       # Set to true for diskless sync if the source has repl-diskless-sync=yes


[redis_writer]
cluster = false            # set to true if target is a redis cluster
address = "目标:26379" # when cluster is true, set address to one of the cluster node
username = ""              # keep empty if not using ACL
password = ""              # keep empty if no authentication is required
tls = false
off_reply = false          # turn off the server reply
  1. 开启同步
bash 复制代码
./redis-shake shake.toml
相关推荐
qq_414256576 小时前
Redis如何解决哨兵通知延迟问题_优化客户端连接池动态刷新拓扑的订阅监听机制
jvm·数据库·python
m0_676544386 小时前
MySQL如何配置不同级别的事务锁_调整innodb_locks_unsafe_for_binlog
jvm·数据库·python
dFObBIMmai6 小时前
mysql索引区分度不足如何解决_mysql多列索引组合优化
jvm·数据库·python
神明9316 小时前
SQL处理JOIN查询中数据倾斜的问题_散列连接键或增加缓存
jvm·数据库·python
m0_591364736 小时前
c++ 实时傅里叶变换stft c++如何进行音频的频谱分析
jvm·数据库·python
2401_832365526 小时前
MySQL无法修改数据表结构_检查磁盘空间与元数据锁
jvm·数据库·python
ERBU DISH6 小时前
Linux下启动redis
linux·redis·bootstrap
l1t6 小时前
类似 X-13ARIMA-SEATS 功能的 JDemetra+ 安装和使用
java·数据库·r语言
X56617 小时前
c++ aot编程 c++如何使用oneapi进行跨平台并行编程
jvm·数据库·python
2501_901006477 小时前
如何按优先级控制 Flex 容器中子元素的截断顺序
jvm·数据库·python