当前位置:网站首页>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
边栏推荐
- 【Proteus仿真】4x4矩阵键盘中断方式扫描 +数码管显示
- 7-29 delete substring in string (non KMP)
- Magic Quadrant of motianlun's 2021 China Database
- Typescript (5) class, inheritance, polymorphism
- Mysql database password modification
- Werewolf kill casual game wechat applet template source code / wechat game source code
- Is it safe to open a securities account at qiniu business school in 2022?
- IPFs Brief
- Docker中安裝Oracle數據庫
- Learning notes of Lichuang EDA: Copper laying dead zone? isolated island? Dead copper?
猜你喜欢

To the interface problems we have encountered

【图像处理】基于matlab实现图像曲线调整系统

SAP ui5 beginner tutorial Part 23 - sorting sort and grouping Group trial version of list control

4276. good at C

Analysis of sending principle of OData metadata request for SAP ui5 application

Design and development of VB mine sweeping game
![[js practice every m days] JS export object analysis based on libcef application (steam)](/img/ab/c242f42af3a7db7ce522622092bb6c.jpg)
[js practice every m days] JS export object analysis based on libcef application (steam)
![[image enhancement] manual multiple exposure fusion amef image defogging based on MATLAB [including Matlab source code 1916]](/img/e9/e5a7163c949db9e649829fcdcf76f5.jpg)
[image enhancement] manual multiple exposure fusion amef image defogging based on MATLAB [including Matlab source code 1916]

Advanced Installer Architect创作工具

What is the difference between the histology and western blotting 两种方法都是进行组织染色的
随机推荐
Rasa对话机器人之HelpDesk (五)
Typescript (4) interface
[proteus simulation] 4x4 matrix keyboard interrupt mode scanning + nixie tube display
Do280 allocating persistent storage
Edrawmax mind map, edrawmax organization chart
ASP. Design and implementation of net+sql online alumni list
Teach you how to understand the test environment project deployment
Similarities and differences between SRAM and DRAM
TypeScript(4)接口
牛客网——华为题库(41~50)
DO280分配持久性存储
如何进行数据库选型
Last week, institutional encryption asset products outflow US $423million, a record high
802.1x协议简述
Is it safe to open a securities account at qiniu business school in 2022?
[image detection] recognition of the front and back of a coin based on texture features with matlab code attached
独家分析 | 软件测试关于简历和面试的真实情况
How can multidimensional analysis pre summary work?
Magic Quadrant of motianlun's 2021 China Database
[RRT 3D path planning] rapid expansion of random tree UAV 3D path planning based on MATLAB [including Matlab source code phase 1914]