当前位置:网站首页>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
边栏推荐
猜你喜欢

創建對象的時候堆內存的分配

JS reverse | four libraries and one platform response data encryption

904. 水果成篮

MySQL 13th job - transaction management

How to start the learning journey of webrtc native cross platform development?

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

基础-MySQL

118. Yanghui triangle

904. fruit baskets

Constraintlayout control uses full Raiders
随机推荐
What should the preview do?
Differences between JVM, Dalvik and art
The fourteenth MySQL operation - e-mall project
[untitled]
Global and Chinese market of electronic pet door 2022-2028: Research Report on technology, participants, trends, market size and share
Constraintlayout control uses full Raiders
904. fruit baskets
【无标题】
SSH, SCP command appears permission denied, please try again solution
35 qlineedit control synthesis example
MySQL 13th job - transaction management
工程数学概率论统计简明教程第二版复习大纲
Some problems to be considered when designing technical implementation scheme
利用foreach循环二维数组
MySQL第十一作業-視圖的應用
Cmake / set command
1. sum of two numbers (leetcode topic)
When will JVM garbage collection enter the older generation
A list of common methods for customizing paint and canvas of view
Global and Chinese market for change and configuration management software 2022-2028: Research Report on technology, participants, trends, market size and share