I've recently updated my node.js Redis package. Now my data seems to be gone. Does updating remove all my data?
Asked
Active
Viewed 375 times
0
-
Unless you've configured redis to store its data on disk, it only stores it in memory. – Dan D. Oct 16 '12 at 11:29
-
1@DanD. the default config does persist data to disk. – Mahn Oct 16 '12 at 11:35
-
@Mahn If that is so then the data the OP wants back is in the directory of the previous version of the redis module. – Dan D. Oct 16 '12 at 11:42
2 Answers
1
it is strange that updating a client library will destroy your data. I suggest looking at the following possible causes:
- Redis is not configured to persist data, or your configuration is to persist using RDB snapshots but not frequently enough and you killed Redis the hard way instead of using the SHUTDOWN command.
- The client library has some kind of unit test that if run agains an instance does not detect the instance is not empty and will destroy the data content. Did you ran any test?
Make also sure you don't have FLUSHALL / FLUSHDB commands in your code for some reason or that your keys did not simply expired because of a time to live set (with EXPIRE or SETEX or alike).

antirez
- 18,314
- 5
- 50
- 44
0
I do not know much about the Redis client for node, but I can bet on this that the upgrade of a DB client is not causing the clearing of the DB. This would be buggy behavior.
So either this was some kind of bug you run in to or you did something wrong that cleared the DB that is independent to the upgrade of the Redis client you are using.

Szymon Jeż
- 8,273
- 4
- 42
- 60