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
相关推荐
修行者Java5 分钟前
Redis 核心功能全解析:功能描述、应用场景与 Java 实战
redis
xie_pin_an6 分钟前
Redis 核心命令速查表
数据库·redis·缓存
喵行星6 分钟前
MySQL XtraBackup 使用文档(全量 + 增量备份与恢复)
数据库·mysql·adb
苦学编程的谢1 小时前
Redis_11_类型补充+命令补充+RESP
数据库·redis·缓存
一 乐1 小时前
社区养老保障|智慧养老|基于springboot+小程序社区养老保障系统设计与实现(源码+数据库+文档)
java·数据库·vue.js·spring boot·后端·小程序
hzk的学习笔记1 小时前
Redisson 和 Jedis 的区别
数据库·redis·缓存
我想吹水1 小时前
Django 测试样例
数据库·django·sqlite
郏国上1 小时前
遍历访问阿里云节点下的所有文件信息并写入excel文件
数据库·mongodb·阿里云·excel
小光学长2 小时前
基于Web的课前问题导入系统pn8lj4ii(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面。
java·前端·数据库
无心水2 小时前
【中间件:Redis】5、Redis分布式锁实战:从基础实现到Redisson高级版(避坑指南)
redis·分布式·中间件·redisson·后端面试·redis分布式锁·分布式系统