[Rspamd-Users] question about bayes and redis

Tim Harman tim at muppetz.com
Mon Dec 31 20:00:49 UTC 2018


On 01/01/2019 3:28 am, Christos Chatzaras wrote:

> If I store the bayes keywords in redis with autolearn enabled when I restart redis or rspamd then what happens to the database? Is the data lost?

[Apologies for previous reply sent top-posted!!] 

If you are using redis then all the bayes data is stored using it. 

Depending on how you have configured redis, it is probably set to
automatically dump (backup) it's data to /var/lib/redis/dump.rdb on a
regular basis. 

You can restart rspamd without any issues, you _should_ be able to
restart redis without any issues ASSUMING you have set it correctly to
save it's data to the dump file.  If you haven't, restarting redis will
result in an empty redis database and you'll have no bayes (or anything
else stored in redis such as greylisting triplets) data. 

The fact you have to ask this question though leads me to believe you
wouldn't have changed the redis config from default and, at least on
Debian Linux, the default is to save data to the file, so you can
restart without worry.


More information about the Users mailing list