Redis Persistent Configuration
There are 2 ways to persist Redis 1 snapshot 2 is log
configuration options for Rdb snapshots:
Save 1//within the range of 1 writes , a snapshot is generated
Save +// if There are more than five writes in a second , a snapshot is generated
Save 10000// if There are 10000 writes in a second , a snapshot is generated
( these 3 options are masked , the rdb is disabled )
Stop-writes-on-bgsave-error Yes// background backup process error , does the main process stop writing ?
Rdbcompression Yes// the exported rdb file is compressed
Rdbchecksum Yes// import RBD when restoring data , do not verify The integrity of the RDB
Dbfilename Dump.rdb//The rdb filename of the guide
Dir.///rdb Placement Path
configuration of the Aof:
AppendOnly No # whether to turn on the aof log feature
Appendfsync always # every 1 commands , sync to aof immediately. Safety , Slow Speed
Appendfsync everysec # compromise, write 1 times per second
Appendfsync No # writes to the operating system , determines the buffer size by the operating system , and writes uniformly to the aof. Low Synchronization frequency , Fast Speed ,
No-appendfsync-on-rewrite Yes: # in the process of exporting an RDB snapshot , either stop synchronizing aof
Auto-aof-rewrite-percentage #aof File size compared to the size of the last rewrite , when the growth rate 100% , rewrite
Auto-aof-rewrite-min-size 64mb #aof file , at least 64M , override
Redis rdb Snapshot and aof log persistence configuration