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
相关推荐
coding者在努力11 分钟前
SQL使用NOT EXITS实现全称量词查询(数据库查询所有)详细讲解和技巧总结
网络·数据库·sql
航Hang*18 分钟前
第3章:复习篇——第4节:创建、管理视图与索引---题库
网络·数据库·笔记·sql·学习·mysql·期末
李慕婉学姐23 分钟前
Springboot旅游景点管理系统2fj40iq6(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面。
数据库·spring boot·后端
早日退休!!!29 分钟前
Roofline模型核心原理:延迟、吞吐与并发的底层逻辑
大数据·网络·数据库
砚边数影34 分钟前
KingbaseES基础(二):SQL进阶 —— 批量插入/查询 AI 样本数据实战
java·数据库·人工智能·sql·ai
霖霖总总35 分钟前
[小技巧35]深入 InnoDB 的 LRU 机制:从原理到调优
数据库·mysql·性能优化
Coder_Boy_1 小时前
基于SpringAI的在线考试系统-考试系统DDD(领域驱动设计)实现步骤详解(2)
java·前端·数据库·人工智能·spring boot
风行無痕1 小时前
MySQL 8.4 数据库修改字段长度的过程
数据库·mysql
難釋懷1 小时前
Redis命令-Hash命令
数据库·redis·哈希算法