Redis Shutdown Command
The Redis Shutdown command performs the following operations:
- Stop all clients
- If at least one save point is 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 Version
= 1.0.0
Return Value
Returns an error on failure. On success, 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>