Redis Bgrewriteaof command
Redis Bgrewriteaof command for asynchronous execution of a AOF (AppendOnly File) file overwrite operation. Rewrite will create a volume of optimized version of the current AOF file.
Even Bgrewriteaof fails, there will not be any loss of data, because the old AOF files are not modified before Bgrewriteaof success.
Note: From thebeginning Redis 2.4, AOF rewrite themselves triggered by Redis, BGREWRITEAOF only used to manually trigger the rewriting operation.
grammar
redis Bgrewriteaof basic command syntax is as follows:
redis 127.0.0.1:6379> BGREWRITEAOF
Available versions
> = 1.0.0
return value
Feedback.
Examples
redis 127.0.0.1:6379> Background append only file rewriting started