Search code examples
redisiotstackexchange.redisbufferingdisk-io

What is the mechanism of snapshotting in Redis?


We can define in Redis configuration file about snapshotting to happen after certain interval of time. I want to clear out that whether that snapshotting process in differential or it creates complete new dump of the Redis db that resides in RAM and deletes the older one.

Also, if there is no differential snapshotting mechanism in Redis, then it means that if I am taking snapshot of Redis db at a interval of 5 minutes, then my disk I/O will not reduce and will be constant depending upon the size of db even if I had only changed one key. Correct?


Solution

  • Snapshot of redis is full snapshot of the db not incremental, redis by default stores the snapshot in file name dump.rdb and everytime snapshot is successful redis will overwrite the resultant file to dump.rdb.

    You can read more details on redis website [https://redis.io/topics/persistence]