English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Redis Shutdown Command

Redis Server

The Redis Shutdown command performs the following operations:

  • Stop all clients
  • If there is at least one save point waiting, execute the SAVE command
  • If the AOF option is enabled, update the AOF file
  • Close the redis server (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

Errors are returned when executed failed. No information is returned when executed successfully, the connection between the server and the client is disconnected, and the client exits automatically.

Online Examples

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