1

What is difference between original and old conf file in redis and what is location of old file persisted in redis server.

I have read about that in config rewrite command in redis documentation.

URL :- https://redis.io/commands/config-rewrite

vishal
  • 71
  • 2
  • 7

1 Answers1

1

Redis has a single config file. But if you set few configs, using redis-cli> CONFIG SET command, then you need to either use CONFIG REWRITE to make sure all those changes reflect in redis.conf file or you manually update redis.conf file with the same changes. If you don't do anyone the steps, the next time when you restart redis, the old config would be picked up as redis.conf doesn't change automatically.

Make sure to also modify the redis.conf file accordingly to the configuration you set using CONFIG SET. You can do it manually, or starting with Redis 2.8, you can just use CONFIG REWRITE, which will automatically scan your redis.conf file and update the fields which don't match the current configuration value. Fields non existing but set to the default value are not added. Comments inside your configuration file are retained.

Reference - https://redis.io/topics/config

Also, the file location by default usually is /etc/redis.conf. When you install redis from source, you get default redis.conf as well in that pkg.

Vishal R
  • 1,026
  • 1
  • 7
  • 21
  • I am using redis as a cache server and not doing db persistance but redis server create dump.rdb file. Below is my redis.conf file – vishal Feb 08 '17 at 11:44
  • I am using redis as a cache server and not doing db persistance but redis server create dump.rdb file. Below is my redis.conf file port 6381 bind 0.0.0.0 loglevel notice logfile "/home/cache/redis/logs/6381.log" maxmemory 55gb maxmemory-policy volatile-lru maxclients 75000 # Generated by CONFIG REWRITE dir "/home/cache/redis/redis_cluster/6381" I have not given the save parameter in conf file but he still creates the dump.rdb. Please help to resolve. – vishal Feb 08 '17 at 11:52