1

I'm trying to use mixed persistency (RDB + AOF as tail) in Redis with the following configuration:

aof-use-rdb-preamble yes appendonly yes save 10 1 # <-- just to speed the tests

I assume from https://github.com/antirez/redis/blob/4.0/redis.conf#L746-L782 that when Redis is restarted, it loads the seed data from [RDB file][AOF tail].

I would like that every time the RDB is written, the AOF file would be flushed in order to keep in it only the tail (the latest updates since the last RDB saving).

Is this possible through some configuration?

1 Answer 1

3

Nope, this isn't possible.

Despite the fact that AOF has an (optional, configuration-based) RDB preamble, the save directive controls only the RDB snapshotting (which can also be triggered with the SAVE or preferably BGSAVE commands).

To rewrite the AOF file, you'll need call BGREWRITEAOF and/or tweak the 'auto-aof-rewrite-percentage' and 'auto-aof-rewrite-min-size' configuration directives.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.