Is there any way to check, from an active session, whether a Redis server has persistence (e.g. RDB persistence) enabled? The INFO command does contain a section on persistence, but it is not clear to me whether the values indicate that persistence is turned on.
2 Answers
There are two type of persistance, RDB and AOF.
- Check is RDB persistence enabled:
redis-cli CONFIG GET save
RDB persistence enabled if it return something like that:
1) "save" 2) "900 1 300 10 60 10000"
RDB persistence disabled if you get empty result:
1) "save" 2) ""
To check is AOF persistence enabled, invoke:
redis-cli CONFIG GET appendonly
If you get yes
- it's enabled, no
- disabled.

- 1,817
- 1
- 18
- 41
-
To understand the meaning of the output like `900 1 300 10 60 10000` check out `save`'s setting description in the example of a `redis.conf` file https://redis.io/docs/management/config-file/ – Aleksei Mialkin Jul 12 '23 at 13:09
INFO
is one way, but you can also use CONFIG GET
for save
and appendonly
to check if persistence is enabled.
As for using INFO
's output to understand your persistency settings, this is a little trickier. For AOF, simply check the value of aof_enabled
under the Persistence section of INFO
's output - 0
means that it's disabled. RDB files, OTOH, are used both for snapshotting and backups so INFO
is less helpful in that context. If you know that no SAVE
/BGSAVE
commands have been issued to your instances, periodic changes to the value of rdb_last_save_time
will indicate that the save
configuration directive is used.

- 47,336
- 7
- 91
- 117
-
Can you please elaborate? (e.g. how INFO tells you that persistence is enabled) – Gigi Feb 20 '15 at 14:20
-
-
1Can you please explain how to use `CONFIG GET` to obtain that information? – Rafael Eyng Jul 05 '19 at 18:28
-
1
-
The documentation about `save`'s values is in the default redis.conf file (http://download.redis.io/redis-stable/redis.conf). – Itamar Haber Jul 06 '19 at 22:12