当前位置: 首页 > news >正文

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
tar -zxvf redis-shake-v4.4.0-linux-amd64.tar.gz
  1. 编辑修改redis-shake工具使用的shake.toml,主要是修改[sync_reader]、[redis_writer]部分
[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. 开启同步
./redis-shake shake.toml

相关文章:

  • 乳腺超声图像结节分割
  • LeetCode算法题(Go语言实现)_15
  • 煤矿油田光伏管理新突破:安科瑞分布式监控系统如何破解高耗能行业转型难题
  • 深度学习框架PyTorch——从入门到精通(9)PyTorch简介
  • 机试题——村落基站建设
  • Java 集合中ArrayList与LinkedList的性能比较
  • Visual Studio 2022中打开其他项目的步骤
  • 虚拟货币和 Token
  • 剑指Offer26 -- 树
  • ‘无法定位程序输入点kernel32.dll’详细的修复方法,一键快速修复kernel32.dll
  • 瑞芯微RK356X主板复用接口配置方法,触觉智能嵌入式方案商
  • 使用ModbusRTU读取松下测高仪的高度
  • CORDIC算法:三角函数的硬件加速革命——从数学原理到FPGA实现的超高效计算方案
  • d2025328
  • LAC自动建立L2TP
  • 如何做管理
  • Python Random 模块使用完全指南
  • 【leetcode hot 100 55】跳跃游戏
  • 深入探索 libarchive
  • 【机器人-开发工具】ROS 2(3)常见工具软件安装(2025持续更新......)
  • 西域都护府博物馆今日在新疆轮台县开馆
  • 中共中央、国务院印发《党政机关厉行节约反对浪费条例》
  • “马上涨价”再到“吞下关税”,美政策让沃尔玛“输两次”
  • 英国警方再逮捕一名涉嫌参与首相住宅纵火案嫌疑人
  • 国内规模最大女子赛艇官方赛事在沪启航,中外41支队伍逐浪
  • 证监会发布《上市公司募集资金监管规则》,6月15日起施行