3

How can you disable snapshotting on a running Redis instance?

You can disable the "save" setting in the Redis configuration by commenting out the "save" lines. E.g.,

#save 900 1
#save 300 10
#save 60 10000

However, Redis lacks a command to reload its configuration without restarting. How can I remove the "save" settings from a running instance of Redis? There seems to be no CONFIG DEL or CONFIG UNSET commands, and I didn't see anything related to this in CONFIG GET or CONFIG SET.

Uyghur Lives Matter
  • 1,656
  • 3
  • 22
  • 31

1 Answers1

3

If you try inspecting the value of the "save" setting, you'll notice it's a single string value containing each save point:

> CONFIG GET save
1) "save"
2) "900 1 300 10 60 10000"

According to the Redis configuration file redis.conf:

It is also possible to remove all the previously configured save points by adding a save directive with a single empty string argument like in the following example:

save ""

So to disable snapshotting you can remove those save points by setting its value to an empty string:

> CONFIG SET save ""
OK
> CONFIG GET save
1) "save"
2) ""
Uyghur Lives Matter
  • 1,656
  • 3
  • 22
  • 31