Redis Persistence
Redis provides two ways to persist, namely, RDB (redis DataBase) and aof (Append only File).
An RDB, in short, generates snapshots of redis-stored data at different points in time and stores it on media such as disks .
AOF, it is to change an angle to achieve persistence, that is, all Redis executed write instruction down, at the next Redis reboot, as long as these write instructions from the front to the back of the execution again, you can achieve data recovery .
In fact, the RDB and aof two ways can also be used simultaneously, in this case, if the Redis restart, it will take precedence in the aof way for data recovery, because the AOF mode of data recovery is more complete.
If you don't have the need for data persistence, you can also turn off the RDB and aof mode, so Redis will become a pure memory database, just like memcache.
1.9-redis Persistence