Redis Bgsave Command

Redis Server

The Redis Bgsave command is used to asynchronously save the current database data to disk in the background.

After the BGSAVE command executes, it immediately returns OK. Then Redis forks a new child process. The original Redis process (parent process) continues to handle client requests, while the child process is responsible for saving the data to disk and then exits.

Syntax

The basic syntax of the redis Bgsave command is as follows:

redis 127.0.0.1:6379> BGSAVE

Available Versions

>= 1.0.0

Return Value

Feedback message.

Examples

redis> BGSAVE
Background saving started

Redis Server

Other Extensions