当前位置:网站首页>RDB persistence validation test
RDB persistence validation test
2022-06-26 10:30:00 【Xianghan collection】
RDB Persistence validation test
verification shutdown The persistence of
1. Example
If it already exists rdb Delete the file first
rm -rf dump.rdb
Save test values
set k1 1
set k2 2
perform shutdown, Verify save rdb file
127.0.0.1:6379> SHUTDOWN
not connected> exit
see file
[[email protected] redis-3.2.9]# ll
total 20344
-rw-rw-r--. 1 root root 87407 May 17 2017 00-RELEASENOTES
-rw-rw-r--. 1 root root 53 May 17 2017 BUGS
-rw-rw-r--. 1 root root 1805 May 17 2017 CONTRIBUTING
-rw-rw-r--. 1 root root 1487 May 17 2017 COPYING
drwxrwxr-x. 7 root root 4096 Jan 22 17:54 deps
-rw-r--r--. 1 root root 93 Jan 25 16:59 dump.rdb
-rw-rw-r--. 1 root root 11 May 17 2017 INSTALL
-rw-rw-r--. 1 root root 151 May 17 2017 Makefile
-rw-rw-r--. 1 root root 4223 May 17 2017 MANIFESTO
-rw-rw-r--. 1 root root 6834 May 17 2017 README.md
-rwxr-xr-x. 1 root root 2433664 Jan 22 18:09 redis-benchmark
-rwxr-xr-x. 1 root root 25165 Jan 22 18:09 redis-check-aof
-rwxr-xr-x. 1 root root 5183694 Jan 22 18:09 redis-check-rdb
-rwxr-xr-x. 1 root root 2586683 Jan 22 18:09 redis-cli
-rw-rw-r--. 1 root root 46696 Jan 22 18:10 redis.conf
-rwxr-xr-x. 1 root root 5183694 Jan 22 18:09 redis-sentinel
-rwxr-xr-x. 1 root root 5183694 Jan 22 18:09 redis-server
-rwxrwxr-x. 1 root root 271 May 17 2017 runtest
-rwxrwxr-x. 1 root root 280 May 17 2017 runtest-cluster
-rwxrwxr-x. 1 root root 281 May 17 2017 runtest-sentinel
-rw-rw-r--. 1 root root 7606 May 17 2017 sentinel.conf
drwxrwxr-x. 2 root root 4096 Jan 22 18:05 src
drwxrwxr-x. 10 root root 4096 May 17 2017 tests
drwxrwxr-x. 7 root root 4096 May 17 2017 utils
Resume operation
./redis-server redis.conf
verification
127.0.0.1:6379> get k1
"1"
Data recovery successful
2. Counter example
Save test values
set k1 1
set k2 2
perform shutdown, Verify save rdb file
127.0.0.1:6379> SHUTDOWN
not connected> exit
see file
[[email protected] redis-3.2.9]# ll
total 20344
-rw-rw-r--. 1 root root 87407 May 17 2017 00-RELEASENOTES
-rw-rw-r--. 1 root root 53 May 17 2017 BUGS
-rw-rw-r--. 1 root root 1805 May 17 2017 CONTRIBUTING
-rw-rw-r--. 1 root root 1487 May 17 2017 COPYING
drwxrwxr-x. 7 root root 4096 Jan 22 17:54 deps
-rw-r--r--. 1 root root 93 Jan 25 16:59 dump.rdb
-rw-rw-r--. 1 root root 11 May 17 2017 INSTALL
-rw-rw-r--. 1 root root 151 May 17 2017 Makefile
-rw-rw-r--. 1 root root 4223 May 17 2017 MANIFESTO
-rw-rw-r--. 1 root root 6834 May 17 2017 README.md
-rwxr-xr-x. 1 root root 2433664 Jan 22 18:09 redis-benchmark
-rwxr-xr-x. 1 root root 25165 Jan 22 18:09 redis-check-aof
-rwxr-xr-x. 1 root root 5183694 Jan 22 18:09 redis-check-rdb
-rwxr-xr-x. 1 root root 2586683 Jan 22 18:09 redis-cli
-rw-rw-r--. 1 root root 46696 Jan 22 18:10 redis.conf
-rwxr-xr-x. 1 root root 5183694 Jan 22 18:09 redis-sentinel
-rwxr-xr-x. 1 root root 5183694 Jan 22 18:09 redis-server
-rwxrwxr-x. 1 root root 271 May 17 2017 runtest
-rwxrwxr-x. 1 root root 280 May 17 2017 runtest-cluster
-rwxrwxr-x. 1 root root 281 May 17 2017 runtest-sentinel
-rw-rw-r--. 1 root root 7606 May 17 2017 sentinel.conf
drwxrwxr-x. 2 root root 4096 Jan 22 18:05 src
drwxrwxr-x. 10 root root 4096 May 17 2017 tests
drwxrwxr-x. 7 root root 4096 May 17 2017 utils
Delete rdb file
rm -rf dump.rdb
Resume operation
./redis-server redis.conf
verification
127.0.0.1:6379> get k1
(nil)
Data recovery failed , as a result of rdb Been deleted
边栏推荐
- 挖财商学院证券开户安全嘛?
- 【LeetCode】59. 螺旋矩阵 II
- Appium automation test foundation - mobile end test environment construction (II)
- Record the handling of oom problems caused by too many threads at one time
- MySQL Chapter 6 Summary
- Progressive Web 应用程序PWA是应用程序开发的未来
- Standard implementation of streaming layout: a guide to flexboxlayout
- MySQL 9th job - connection Query & sub query
- VS或Qt编译链接过程中出现“无法解析的外部符号”的原因:
- MySQL seventh job - update data
猜你喜欢

Problems encountered in the application and development of Hongmeng and some roast

36 qtextedit control input multiline text

Developers, what is the microservice architecture?

DBSCAN

Jar version conflict resolution

SwiftUI 开发经验之为离线优先的应用程序设计数据层

118. Yanghui triangle

MySQL job 11 - application de la vue

字符串常量池、class常量池和运行时常量池

瑞萨电子面向物联网应用推出完整的智能传感器解决方案
随机推荐
How to change the QR code material color of wechat applet
Dynamic library connection - symbol conflict - global symbol intervention
Little red book - Summary of internal sales spike project
Hcia-dhcp experiment
MySQL项目7总结
Blog article index Summary - wechat games
2. 合并两个有序数组
基础-MySQL
JS reverse | four libraries and one platform response data encryption
字符串常量池、class常量池和运行时常量池
How do technicians send notifications?
Global and Chinese market of recycled paper 2022-2028: Research Report on technology, participants, trends, market size and share
cmake / set 命令
What is LSP
MySQL项目8总结
方法区里面有什么——class文件、class文件常量池、运行时常量池
Yarn package management tool
Svn command
MySQL 11th job - view application
MySQL 13th job - transaction management