Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Redis Persistence Enabled?

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.

like image 391
Gigi Avatar asked Mar 24 '26 09:03

Gigi


1 Answers

There are two type of persistance, RDB and AOF.

  1. 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) ""
  1. To check is AOF persistence enabled, invoke:

    redis-cli CONFIG GET appendonly

If you get yes - it's enabled, no - disabled.

like image 108
Vadim Yangunaev Avatar answered Mar 26 '26 14:03

Vadim Yangunaev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!