Hands-on task
AOF that survives a restart
The server stores sessions session:* (200 keys). RDB snapshots are disabled (save ""), so right now the data lives only in memory.
Enable the AOF log so that the setting survives a restart:
/etc/redis/redis.confmust containappendonly yesandappendfsync everysec;- the sessions must not be lost;
- after enabling it, write the key
aof:checkwith the valuesurvived; - restart Redis with
service redis-server restart.
After the restart AOF must be on, and aof:check and all the sessions must still be there.
Open the config /etc/redis/redis.conf in the Editor tab — you can see what's in it now and what changed after your commands.
- redis
- AOF
- appendonly
- appendfsync
- CONFIG REWRITE
- persistence