3

I got snapshot rdb file from server. At the point of snapshoting there was keys with defined ttl using EXPIRE command . After starting server locally with the key --dbfilename dump.rdb all keys with defined ttl expired. For me it seems that there should be keys in binary file anyway.

If it can help: the snapshot was created in AWS elasticache environment.

Is it possible to start server from backup and restore keys?

Oleksandr
  • 2,346
  • 4
  • 22
  • 34

2 Answers2

2

Nope. From the docs (emphasis mine):

Keys expiring information is stored as absolute Unix timestamps (in milliseconds in case of Redis version 2.6 or greater). This means that the time is flowing even when the Redis instance is not active.

https://redis.io/commands/expire

If you want backups to exist indefinitely, all keys must be persisted.

dizzyf
  • 3,263
  • 19
  • 29
1

The free RedisInsight tool from Redis Labs has a restore from RDB file feature with an "Ignore Expiry" option. Look under "BULK ACTIONS".

https://redislabs.com/redis-enterprise/redis-insight/

PDP
  • 111
  • 1
  • 4