Is AOF rebuild automatic when starting a redis server?

Viewed 440

If I configure a redis server to have persistence using append only files + specify automatic BGREWRITEAOF like this:

appendonly yes
appendfilename "appendonly.aof"
appendfsync everysec
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb

does this mean that when launching a server instance it will pick up the aof file and remove duplicate commands at startup ? If not, is there a way to do to make sure that every time I launch a server instance I don't get duplicates from my aof file?

1 Answers

Aof file will not rewrite when launching a redis server instance. With you configuration, rewrite would be triggered when appendonly.aof larger than 64mb and twice(100% up) than last rewrite.

The solution is, sending BGREWRITEAOF command manually after launching a redis server instance.

Related