Does node.js Redis package updating clear the Redis database?


I've recently updated my node.js Redis package. Now my data seems to be gone. Does updating remove all my data?

Problem courtesy of: Richard


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).

Solution courtesy of: antirez


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.

Discussion courtesy of: Szymon Je┼╝

This recipe can be found in it's original form on Stack Over Flow.