Viddesh
Viddesh

Reputation: 441

Redis data lost after server restart

I have configured Redis to use RDB persistence method to save data every second if single write (save 1 1) but still after restart I see the key value as nil.

Upvotes: 2

Views: 3865

Answers (1)

Viddesh
Viddesh

Reputation: 441

Well I found that the Redis I used to start was with the command: redis-server &

This command is used to start every time with new key in database, so the data stored in snapshot and AOF files was ignored.

I changed the configuration to start the redis server with the correct path to database files and started the server with following command and its working fine now: /etc/init.d/redis_port start

Upvotes: 4

Related Questions