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_readerredis_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
相关推荐
笃行3502 小时前
从兼容到进阶:驱动直连、窗口函数与动态 SQL 实测——KingbaseES V9R3C18 深度体验(二)
数据库
笃行3502 小时前
MySQL 的 JSON 字段迁到金仓还能用吗?——KingbaseES V9R3C18 JSON 操作符与函数兼容实测
数据库
heimeiyingwang3 小时前
【架构实战】缓存一致性:Cache Aside与双写问题的破解
spring·缓存·架构
栈溢出了3 小时前
Redis 分片集群与哈希槽笔记
java·redis·笔记·spring
IpdataCloud3 小时前
跨境AI金融风险怎么防?IP风险画像的实战应用指南
数据库·tcp/ip·金融·ip
Alan_755 小时前
API 接口慢调用根因定位:从 TCP 建连到数据库 IO 的全栈排查实战
数据库
Lihua奏6 小时前
Redis:它不只是缓存,还是高并发系统的工具箱
redis
多巴胺梦想家6 小时前
事务与并发控制:当多人同时操作数据库
服务器·数据库·oracle
howard20057 小时前
PostgreSQL起步
数据库·postgresql
秋田君7 小时前
QT_QT布局详解
开发语言·数据库·qt