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.
Basic syntax of redis BGREWRITEAOF command is shown below:
Simple string reply: always OK.
Return Value Type