当前位置:网站首页>Redis data migration (II)
Redis data migration (II)
2022-07-03 20:48:00 【Interesting soul_ A secular heart】
Mode one : Use redis-cli Migrating data
Migrating code ( take )192.168.31.216 Server redis Of 0 All data in the database is migrated to the server that executes the command redis Of 0 database :
New file
vim redis-mv.sh And add the following
redis-cli -h 192.168.31.216 -p 6379 -n 0 keys "*" | while read key
do
redis-cli -h 192.168.31.216 -p 6379 -n 0 --raw dump $key | perl -pe 'chomp if eof' | redis-cli -h 127.0.0.1 -p 6379 -n 0 -x restore $key 0
echo "migrate key $key"
done
Give the file corresponding permissions , And execute the file
chmod 777 redis-mv.sh
./redis-mv.sh
Execute output diagram
Database value before migration
After the move
边栏推荐
- @Transactional注解失效的场景
- "Designer universe" argument: Data Optimization in the design field ultimately falls on cost, safety and health | chinabrand.com org
- QT6 QML book/qt quick 3d/ Basics
- Basic knowledge of dictionaries and collections
- 设计电商秒杀系统
- 2.4 conversion of different data types
- Interval product of zhinai sauce (prefix product + inverse element)
- Use nodejs+express+mongodb to complete the data persistence project (with modified source code)
- [Tang Laoshi] C -- encapsulation: member variables and access modifiers
- Rhcsa third day notes
猜你喜欢
9 pyqt5 qscrollarea scroll area and qscrollbar scroll bar
全网都在疯传的《老板管理手册》(转)
Camera calibration (I): robot hand eye calibration
Measurement fitting based on Halcon learning -- Practice [1]
JS three families
Xai+ network security? Brandon University and others' latest "interpretable artificial intelligence in network security applications" overview, 33 page PDF describes its current situation, challenges,
Discussion Net legacy application transformation
一台服务器最大并发 tcp 连接数多少?65535?
LabVIEW training
1.5 learn to find mistakes first
随机推荐
【愚公系列】2022年7月 Go教学课程 002-Go语言环境安装
How to set the system volume programmatically- How to programmatically set the system volume?
Xai+ network security? Brandon University and others' latest "interpretable artificial intelligence in network security applications" overview, 33 page PDF describes its current situation, challenges,
Preliminary practice of niuke.com (11)
Camera calibration (I): robot hand eye calibration
6006. Take out the minimum number of magic beans
"Designer universe" APEC safety and health +: environmental protection Panda "xiaobaobao" Happy Valentine's Day 2022 | ChinaBrand | Asia Pacific Economic media
2022 melting welding and thermal cutting examination materials and free melting welding and thermal cutting examination questions
Analysis of gas fee setting under eip1559
阻塞非阻塞和同步异步的区分 参考一些书籍
浅议.NET遗留应用改造
电子科技大学|强化学习中有效利用的聚类经验回放
Global and Chinese market of electrolyte analyzers 2022-2028: Research Report on technology, participants, trends, market size and share
Kubernetes 通信异常网络故障 解决思路
AI enhanced safety monitoring project [with detailed code]
强化学习-学习笔记1 | 基础概念
Task of gradle learning
你真的知道自己多大了吗?
2.5 conversion of different data types (2)
Machine learning support vector machine SVM