Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Data lost after redis server restart

Tags:

redis

Im using redis 2.8.3 server to store key value pairs in redis.

redis.conf

port 6378
bind 127.0.0.1
databases 16

After restarting the redis-server

  redis-server /home/redis.conf

Im loosing all the keys which i have already stored in redis.Can anyone help me to solve this.

like image 247
sachin Avatar asked Jan 03 '14 08:01

sachin


People also ask

Does Redis lose data on restart?

You can save snapshot to disk and read from that file, if you don't do it your redis database will be empty when reboot.

Can Redis lost data?

Redis will lose data if a master shard is lost when the workload is high enough that the “partial sync” stops.

What if Redis server goes down?

When Redis goes down, you have to deal with it. It is the same as if your file system is gone or your SQL Server is down. A lot of those systems disable all writes and set their cluster in maintenance state.

Does Redis keep everything memory?

All Redis data resides in memory, which enables low latency and high throughput data access. Unlike traditional databases, In-memory data stores don't require a trip to disk, reducing engine latency to microseconds.


Video Answer


1 Answers

If you run a 'BGSAVE' before you shut down the server does that help?

The shutdown script should always run that....

like image 190
chrislovecnm Avatar answered Oct 05 '22 00:10

chrislovecnm