Redis Shutdown Command

Redis Server

The Redis Shutdown command performs the following operations:

  • Stop all clients
  • If there is at least one save point pending, execute the SAVE command
  • If the AOF option is enabled, update the AOF file
  • Shut down the Redis server

Syntax

The basic syntax of the Redis Shutdown command is as follows:

redis 127.0.0.1:6379> SHUTDOWN [NOSAVE] [SAVE] 

Available Versions

>= 1.0.0

Return Value

Returns an error when execution fails. When execution succeeds, no information is returned, the connection between the server and the client is disconnected, and the client exits automatically.

Example

redis 127.0.0.1:6379> PING
PONG

redis 127.0.0.1:6379> SHUTDOWN

$

$ redis
Could not connect to Redis at: Connection refused
not connected>

Redis Server

Other Extensions