修改本页
Redis

SHUTDOWN [NOSAVE] [SAVE]

The command behavior is the following:

If persistence is enabled this commands makes sure that Redis is switched off without the lost of any data. This is not guaranteed if the client uses simply SAVE and then QUIT because other clients may alter the DB data between the two commands.

Note: A Redis instance that is configured for not persisting on disk (no AOF configured, nor "save" directive) will not dump the RDB file on SHUTDOWN, as usually you don't want Redis instances used only for caching to block on when shutting down.

SAVE and NOSAVE modifiers

It is possible to specify an optional modifier to alter the behavior of the command. Specifically:

返回值

Simple string reply on error. On success nothing is returned since the server quits and the connection is closed.

Comments powered by Disqus