Easy Tutorial
❮ Lists Lpush Sets Srem ❯

Redis Bgsave Command

Redis Server

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

After executing the BGSAVE command, 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 for the redis Bgsave command is as follows:

redis 127.0.0.1:6379> BGSAVE

Available Versions

= 1.0.0

Return Value

Feedback message.

Example

redis> BGSAVE
Background saving started

Redis Server

❮ Lists Lpush Sets Srem ❯