How to read updated redis configuration file with running redis server - redis

I made a change to redis.conf, but I don't see the changes applied to the running instance. Do I need to restart redis is order to pick up changes?

Yes you have to restart the server to get changes from redis.conf file. Alternatively you can do it in run time using config set command.
Read more about them on the following links
http://redis.io/topics/config
http://redis.io/commands/config-set

Related

Force reload the clickhouse config?

How can I forcefully reload the clickhouse configuration? I need to make changes to /etc/clickhouse-server/config.xml (remote_servers). Can I force clickhouse to re-read the file without restarting the service?
The server tracks changes to config files and files that were used for substitutions and overrides and reloads users and clusters configurations in runtime. That is, you can add or change users, clusters and their settings without relaunching the server. For remote_servers server read config immediately after the request
Restart the ClickHouse Database to apply the configuration changes: in Ubuntu:
sudo service clickhouse-server restart

Where does dump.rdb belong?

I remember playing around with some settings and I believe it changed the location of dump.rdb. Now, dump.rdb auto-magically appears at the root of my projects.
Where does it belong, and how would I return it there? Also, how does this location change when in a production environment?
Where does it belong?
Wherever you want.
The default directory is ./, meaning the directory where the Redis server got started from.
Edit:
* I am modifying your second question (asked in comment) a little bit.
Is it possible to change to location of dump.rdb? How?
Yes, it is possible. There two possible ways I can think of.
1.
Modify redis configuration file (e.g. redis.conf) and restart redis server. This way, every restart after this one will use the new directory. But redis will not reload any previous data at first restart (because there will not be anything to reload from).
To reload previous data, previous dump.rdb would have to be moved to new location manually before restarting the server.
2.
Set new directory by CONFIG SET command. E.g.
CONFIG SET dir path/to/new/directory
* Note that the path has to be a directory.
That's it! But this way is not permanent because server restart will use the old directory.
To make new directory permanent, execute CONFIG REWRITE to rewrite the configuration file. Remember, redis server has to have write permission to that file.
dir path/to/dorectory has to be set in the redis config file.

Change redis db location

To change the location of redis on ubuntu 14 is just copy the db to another path and create a symlink or need another aproach to this?
dir /var/lib/redis
You can do it by sending Redis CONFIG SET dir /new/path, and making the same change in the configuration file or issuing CONFIG REWRITE. The next dump file, e.g. created with BGSAVE, will use the new path.
You solution is valid if you can afford downtime on your system during this change in order to maintain data consistency.
Another solution is to setup second Redis instance on different port on the same machine that will replicate from the first instance and you application will working with second instance. After a while you will delete your first instance.

Redis Server after loading from dump.rdb deleting all keys

I have my redis server in my local and when i copy those contents with dump.rdb bgsave and put it in my other machine .Every thing works fine but after some inactivity my keys keep getting deleted and I'm ending up with 433KB of dump file and my dump file being replaced.What am i doing wrong?I have 3.0.3 in local and 2.8.4 in my other machine.I am following steps from this [link][1]. I couldn't able to figure out this issue.I checked the server logs and there's no error there just only those bgsaves for every 900,300 seconds.Please Help me
Most commonly this is probably because
Your Redis instance is open to a public network and isn't using password authentication - crackers can do anything for deleting your keys to compromising the server.
All your keys are set to expire
You are using an eviction policy such as all-keys, your maxmemory is set and you've reached it.
You have a rogue piece of code that deletes them.

Redis clears data itself..!

I am using Redis since last 12 months without any issue, But from last 30 days unknowingly the database getting empty and we couldn't find any logs regarding this. Even it is flushing all the data out randomly after restoration.
We tried following steps to resolve this but result was zero.
We have checked redis logs
Monitored the redis using MONITOR command
We are trying to renaming the critical commands through config but redis is dump after the config change below is example command
rename-command FLUSHDB e0cc96ad2eab73c2c347011806a76b73
We gone made without knowing anything. Helps are appreciated.
Redis Version : 2.8.17
Running under Debian Linux
Renaming the command through config file will work in this case.
Same rename command you have to place inside the config file.
rename-command FLUSHDB e0cc96ad2eab73c2c347011806a76b73