Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Redis Bgsave Command

Redis Bgsave Command

Redis Server

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

The BGSAVE command returns OK immediately, then Redis forks a new child process; the original Redis process (parent) continues to process client requests, while the child process is responsible for saving 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 Version

= 1.0.0

Return Value

Feedback information.

Example



redis> BGSAVE

Background saving started

Redis Server