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
相关推荐
嘟嘟w3 分钟前
SQL注入是什么
数据库·sql·oracle
摇滚侠3 分钟前
Redis 零基础到进阶,Redis 主从复制,笔记55-62
数据库·redis·笔记
surtr15 分钟前
数据库基础(数据库原理和应用)
数据库·sql·mysql·oracle·database
张人玉8 分钟前
c# DataSet 类
数据库·c#·dataset
想用offer打牌9 分钟前
数据库大事务有什么危害(面试版)
数据库·后端·架构
廋到被风吹走10 分钟前
【数据库】【Redis】数据结构全景图:命令、场景与避坑指南
数据结构·数据库·redis
Jaising66610 分钟前
Spring 错误使用事务导致数据可见性问题分析
数据库·spring boot
xixingzhe213 分钟前
数据、数据库分类
数据库
松涛和鸣14 分钟前
34、 Linux IPC进程间通信:无名管道(Pipe) 和有名管道(FIFO)
linux·服务器·c语言·网络·数据结构·数据库
云老大TG:@yunlaoda36022 分钟前
如何使用华为云国际站代理商的FunctionGraph进行事件驱动的应用开发?
大数据·数据库·华为云·云计算