w3resource logo
Redis Tutorial

Redis Server: BGREWRITEAOF

Description

Redis BGREWRITEAOF command instruct Redis to start rewriting process in an Append-Only File. If BGREWRITEAOF fails, no data gets lost as the old AOF will be untouched. The rewrite will be only triggered by Redis if there is not already a background process doing persistence.

If an AOF rewrite is already in progress the command returns an error and no AOF rewrite will be scheduled for a later time.

Syntax:

Basic syntax of redis BGREWRITEAOF command is shown below:

BGREWRITEAOF

Available since

1.0.0.

Return Value

Simple string reply: always OK.

Return Value Type

String