当前位置:网站首页>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 
边栏推荐
- Global and Chinese market of charity software 2022-2028: Research Report on technology, participants, trends, market size and share
- 18、 MySQL -- index
- MySQL 8.0 data backup and recovery
- Qt6 QML Book/Qt Quick 3D/基础知识
- 浅议.NET遗留应用改造
- In 2021, the global revenue of syphilis rapid detection kits was about US $608.1 million, and it is expected to reach US $712.9 million in 2028
- 不同业务场景该如何选择缓存的读写策略?
- How to do Taobao full screen rotation code? Taobao rotation tmall full screen rotation code
- Producer consumer mode (multithreading, use of shared resources)
- Etcd raft Based Consistency assurance
猜你喜欢

From the behind the scenes arena of the ice and snow event, see how digital builders can ensure large-scale events
![[Yugong series] go teaching course 002 go language environment installation in July 2022](/img/47/35b4fb0354122e233977b261ef405b.png)
[Yugong series] go teaching course 002 go language environment installation in July 2022

SQL injection - Fundamentals of SQL database operation

"Actbert" Baidu & Sydney University of technology proposed actbert to learn the global and local video text representation, which is effective in five video text tasks

Sightseeing - statistics of the number of shortest paths + state transfer + secondary small paths

Interval product of zhinai sauce (prefix product + inverse element)

1.4 learn more about functions

Xai+ network security? Brandon University and others' latest "interpretable artificial intelligence in network security applications" overview, 33 page PDF describes its current situation, challenges,

Go learning notes (4) basic types and statements (3)

19、 MySQL -- SQL statements and queries
随机推荐
Scientific research document management Zotero
[Yugong series] February 2022 Net architecture class 004 ABP vNext used in WPF project
The 29th day of force deduction (DP topic)
"Designer universe" argument: Data Optimization in the design field ultimately falls on cost, safety and health | chinabrand.com org
The 12th Blue Bridge Cup
Kubernetes abnormal communication network fault solution ideas
University of Electronic Science and technology | playback of clustering experience effectively used in reinforcement learning
How to handle wechat circle of friends marketing activities and share production and release skills
Qtablewidget control of QT
强化学习-学习笔记1 | 基础概念
thrift go
In 2021, the global revenue of thick film resistors was about $1537.3 million, and it is expected to reach $2118.7 million in 2028
Discussion Net legacy application transformation
Cap and base theory
Global and Chinese market of liquid antifreeze 2022-2028: Research Report on technology, participants, trends, market size and share
2022 low voltage electrician examination and low voltage electrician simulation examination question bank
LabVIEW training
Wargames study notes -- Leviathan
你真的知道自己多大了吗?
Use of CMD command