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

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 is executed, it immediately returns OK, and 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 exiting.

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 Information.

Online Examples

redis> BGSAVE
Background saving started

Redis Server