RDB Version History

RDB Version History

This document tracks the changes made to the dump file format over time.

An RDB file is forwards compatible. An older dump file format will always work with a newer version of Redis.

Version 7

Introduced 2014-01-08, integrated into Redis 2.9.x.

Relevant links:

Caution: This breaks backwards-compatibility. Redis 2.8 cannot load a RDB version 7 file.

Version 6

In previous versions, ziplists used a variable length encoding scheme for integers. Integers were stored in 16, 32 or 64 bits. In this version, this variable length encoding system has been extended.

The following additions have been made :

Issue ID: redis#469

To migrate to version 5:

Version 5

This version introduced an 8 byte checksum (CRC64) at the end of the file. If checksum is disabled in redis.conf, the last 8 bytes will be zeroes.

Issue ID: redis#366

To migrate to version 4:

Version 4

This version introduced a new encoding for hashmaps - “Hashmaps encoded as Zip Lists”. This version also deprecates the Zipmap encoding that was used in previous versions.

“Hashmaps encoded as ziplists” has encoding type = 13. The value is parsed like a ziplist, and adjacent entries in the list are considered key=value pairs in the hashmap.

Issue ID: redis#285

To migrate to version 3:

Version 3

This version introduced key expiry with millisecond precision.

Earlier versions stored key expiry in the format 0xFD <4 byte timestamp>. In version 3, key expiry is stored as 0xFC <8 byte timestamp>. Here, 0xFD and 0xFC are the opcodes to indicate key expiry in seconds and milliseconds respectively.

Issue ID: redis#169

To migrate to version 2:

Version 2

This version introduced special encoding for small hashmaps, lists and sets.

Specifically, it introduced the following encoding types:

REDIS_RDB_TYPE_HASH_ZIPMAP = 9
REDIS_RDB_TYPE_LIST_ZIPLIST = 10
REDIS_RDB_TYPE_SET_INTSET = 11
REDIS_RDB_TYPE_ZSET_ZIPLIST = 12

Commit: redis#6b52ad87

To migrate to version 1: