I realize that all my data is gone when I log in... KEYS *
shows nothing.
Luckily, I'm doing this in dev server.
What am I supposed to do if this happens in the future on production?
Am I supposed to back it up every second?
I realize that all my data is gone when I log in... KEYS *
shows nothing.
Luckily, I'm doing this in dev server.
What am I supposed to do if this happens in the future on production?
Am I supposed to back it up every second?
You can find a number of answers/options here:
http://redis.io/topics/persistence
From what I could gather, you should:
Redis is not the most durable way to store your data. With journaling mode your data is written to disk but you could still lose some data in the event of a crash.
Are you sure you have picked up the right solution for your service? Seems like you need something else than redis?
See also this; Is redis a durable datastore?