当前位置:网站首页>Redis data migration (III)
Redis data migration (III)
2022-06-29 01:36:00 【Interesting soul_ A secular heart】
redis-dump The way
Installation environment depends on :
install RVM
See if it is installed ruby , Or the currently installed version
ruby -v
install ruby Environmental Science
// To configure DNS analysis
vi /etc/hosts
199.232.28.133 raw.githubusercontent.com
// Install the secret key
gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 94558F59
// The following command needs to be executed many times , To succeed , Maybe due to network problems , The specific reason is not clear
curl -L get.rvm.io | bash -s stable
install ruby
find / -name rvm -print
source /usr/local/rvm/scripts/rvm
rvm list known
rvm remove 2.0.0
rvm install 2.7.0
Installation succeeded. Check the version number 
The above screenshot shows that the installation was successful
redis-dump install
remove gem Bring your own source ( Slow downloading of us servers )
gem sources --remove https://rubygems.org/
Add domestic sources
gem sources -a https://gems.ruby-china.com
View source
gem sources -l
``
// install redis-dump
gem install redis-dump -V
Verify that the installation was successful 
Now let's start using redis-dump The tool exports the response data
Export to this machine redis The library is 0 All of the key value
redis-dump -u 127.0.0.1:6379 -d 0 > redis216.txt
see redis Corresponding to all keyz value 
Export file view
vim redis216.txt

The comparison of the above two figures can verify that the export is successful
Use redis-load Command import data 
First, export the redis The file is sent to the machine to be imported , You need to enter the machine password for confirmation
scp redis216.txt root@10.0.8.152:/usr/software

View the target machine key List of values 
It can be seen that the target machine is temporarily unavailable key value
After executing the Import command
cat redis216.txt | redis-load -u 127.0.0.1:9010 -d 0

So far we have finished using redis-dump Import and export of tools
Two different commands for import , Example
// Mode one
cat redis216.txt | redis-load -u 127.0.0.1:9010 -d 0
// Mode two
< redis216.txt | redis-load -u 127.0.0.1:9010 -d 0
边栏推荐
- 统计学习方法(4/22)朴素贝叶斯
- 多维分析预汇总应该怎样做才管用?
- 独家分析 | 软件测试关于简历和面试的真实情况
- Design and development of VB mine sweeping game
- 4276. 擅长C
- Pat grade a real problem 1165
- [RRT 3D path planning] rapid expansion of random tree UAV 3D path planning based on MATLAB [including Matlab source code phase 1914]
- 肖特基二极管在防止电源反接的作用
- Docker中安裝Oracle數據庫
- 免疫组化和免疫组学之间的区别是啥?
猜你喜欢

The function of Schottky diode in preventing reverse connection of power supply

Day 7 scripts and special effects

Do280 allocating persistent storage

Vulnerability mining | routine in password retrieval

Installing Oracle database in docker

Testing until you're 35? The 35 + test will lead to unemployment?

机构加密资产产品上周流出4.23亿美元资金,创历史新高

EdrawMax思维导图,EdrawMax组织结构图

免疫组化和免疫组学之间的区别是啥?

Typescript (4) interface
随机推荐
想请教股票开户要认识谁?现在网上开户安全么?
肖特基二极管在防止电源反接的作用
198. house raiding
How can multidimensional analysis pre summary work?
What is the difference between the histology and western blotting 两种方法都是进行组织染色的
TypeScript(7)泛型
Installing Oracle database in docker
PR FAQ: how to retrieve accidentally deleted video and audio in PR?
[RRT 3D path planning] rapid expansion of random tree UAV 3D path planning based on MATLAB [including Matlab source code phase 1914]
How to use PN junction to measure temperature?
月薪过万的测试员,是一种什么样的生活状态?
Research on VB multi-layer firewall technology - state detection
Noip2006-2018 improvement group preliminary test questions improvement procedure questions csp-s 2019 2020 preliminary test questions improvement procedure questions
PHP hospital network reservation management system source code, hospital consultation reservation registration OA system (commercial or graduation design)
Connected to rainwater series problems
Teach you how to understand the test environment project deployment
大厂裁员潮下,测试人员路在何方?
Learning notes of Lichuang EDA: Copper laying dead zone? isolated island? Dead copper?
Database - optimizer
如何进行数据库选型