redis / redis

Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, Streams, HyperLogLogs, Bitmaps.

Home Page:http://redis.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[QUESTION] Can AOF refer to RDB file created by RDB mechanism ?

jureaky opened this issue · comments

Hello,

The official document discourages using AOF alone for backup & restore.

The document says one of benefits of using both RDB and AOF mechanisms is faster restarts.

However, AOF with aof-preamble is already creating & using rdb file as AOF base, so I think using AOF alone can make the same effect of using RDB mechanism.

So my question is, when both RDB and AOF are enabled, can AOF restore based on the latest rdb file of dump.rdb created by RDB mechanism or appendonly.aof.*.base.rdb created by AOF mechanism ?

For example, AOF rewrites happened 3 hours ago, so base.rdb file is created at that time, and RDB replaced dump.rdb file 5 minutes ago. Then what I can expect when restarting is dumping 5-min aged dump.rdb file to the memory and executing commands in incr.aof file from the moment dump.rdb is written ?

If that's not the case, I don't think using both RDB and AOF at the same time adds any benefits.