Introduction: Redis is a memory-based database and also provides a number of persistent scenarios that allow users to write in-memory data to the local file system for the next reboot or after the machine continues to be used. This article describes how to set up these features based on Redis.
Settings for snapshots
A. Setting up the redis.conf configuration file
The frequency of Redis snapshot writes
Save 900 1
Save 300 10
Save 60 10000
Snapshot file name settings
Dbfilename Dump.rdb
Snapshot Catalog Color Rendering
Dir/opt/redis
Disable aof, because the AOF priority is higher than the snapshot, so after it is set to OFF, you can use snapshot
AppendOnly No
B. start Redis Server
C. run redis-cli, manipulate some data, and save
D. View dump Data file
E. After restarting Redis-server, you can still read the previous data
From the above process, we can already see the entire snapshot of the use of the process.
Reprint: http://blog.csdn.net/blueheart20/article/details/26520043
http://blog.csdn.net/lang_man_xing/article/category/2422347
Snapshot capabilities for Redis