Redis mixed RDB+AOF

124 views
Skip to first unread message

George Chilumbu

unread,
Feb 5, 2018, 10:56:34 PM2/5/18
to Redis DB
I was reading the Redis change notes for Redis 4.0 where it mentioned about mixed RDB+AOF:


* Mixed RDB-AOF format. If enabled the new format is used when rewriting the AOF file: the rewrite uses the more compact and faster to generate RDB format, and an AOF stream is appended to the file. This allows faster rewrites and reloads when using the AOF persistence.


 I was wondering how to set in the config file this new mixed RDB+AOF. I know for RDB, you can do with SAVE "1 10" for example, or using appendonly yes for AOF. But not sure how to setup one for mixed RDB+OAF. 

How do you set it up in the config file?

George Chilumbu

unread,
Feb 6, 2018, 2:03:31 AM2/6/18
to Redis DB
I found the answer [1]:

    aof-use-rdb-preamble yes

REFENERANCE

段好学

unread,
Feb 6, 2018, 11:33:12 PM2/6/18
to Redis DB
to see the default config file of Redis 4.0 and search the key word,it may help you

在 2018年2月6日星期二 UTC+8上午11:56:34,George Chilumbu写道:

George Chilumbu

unread,
Feb 7, 2018, 3:34:50 AM2/7/18
to Redis DB
As a matter of fact, i did just that and the 4.0 config file does not include any config for mixed RDB+AOF, or even mentioning  anything about it. Thats why i had to ask. 

Salvatore Sanfilippo

unread,
Feb 7, 2018, 4:15:27 AM2/7/18
to redi...@googlegroups.com
You probably have a non-4.0 redis.conf, because in 4.0 that line
exists. Or maybe your distribution's redis.conf is different because
was altered by the maintainers.
> --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to redis-db+u...@googlegroups.com.
> To post to this group, send email to redi...@googlegroups.com.
> Visit this group at https://groups.google.com/group/redis-db.
> For more options, visit https://groups.google.com/d/optout.



--
Salvatore 'antirez' Sanfilippo
open source developer - Redis Labs https://redislabs.com

"If a system is to have conceptual integrity, someone must control the
concepts."
— Fred Brooks, "The Mythical Man-Month", 1975.

George Chilumbu

unread,
Feb 9, 2018, 9:03:21 PM2/9/18
to Redis DB
We run our redis in Docker containers, and it seems that our Redis image is designed to replace the new redis.conf with a customized version we used for redis 3.2.8. So this answers why the variable does not appear in the config file even after doing an upgrade.

However, i added this variable, as well as enabled RDB with the save = 60 10000, and AOF with appendonly = yes. I can see the dump.db and appendonly.aof files, but do not see any files for the mixed RDB+AOF?

Itamar Haber

unread,
Feb 10, 2018, 12:12:02 PM2/10/18
to Redis DB
The proof is in the pudding, or in this case the mix is in the appendonly.aof file :)

To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+unsubscribe@googlegroups.com.

To post to this group, send email to redi...@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.



--

Itamar Haber | Technology Evangelist
Redis Labs ~/redis

Mobile: +972 (54) 567 9692
Twitter: @itamarhaber
Skype: itamar.haber

George Chilumbu

unread,
Feb 11, 2018, 6:31:05 AM2/11/18
to redi...@googlegroups.com
I looked at the appendonly.aof file, and it only contains redis commands just like a regular appendonly.aof file with appendonly yes (without aof-use-rdb-preamble) enabled. Can you have aof-use-rdb-preamble and appendonly enabled in the config file, or appendonly will always override aof-use-rdb-preamble if both are enabled?

--
You received this message because you are subscribed to a topic in the Google Groups "Redis DB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/redis-db/kodmKeLL0lU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to redis-db+unsubscribe@googlegroups.com.

To post to this group, send email to redi...@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.



--
Purpose is the key to success. You can easily be successful in the wrong things. 

Itamar Haber

unread,
Feb 17, 2018, 12:43:04 PM2/17/18
to Redis DB
You must have not issued a `BGREWRITEAOF` in that case - when you set `aof-use-rdb-preamble` and `appendonly` to 'yes', you get the mix.
Reply all
Reply to author
Forward
0 new messages