Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

DUMP

Last updated
DUMP key
Group
Keys
Complexity
O(N) where N is the size of the value
Arity
2 (exactly, counting the command name)
Flags
read-only
Keys
first 1, last 1, step 1
HotKV Cloud
All plans
On-Premise
no license needed

DUMP returns the value at key as an opaque binary payload that RESTORE turns back into a key, on this server or another one. The payload carries a version and a checksum, so a damaged payload is refused on restore. The time to live is not part of the payload: pass it to RESTORE separately.

Strings, lists, sets, hashes (including hash field expiry), sorted sets and streams are written in the same serialization format Redis uses, so their payloads can also be restored on Redis and Valkey. Bloom filters, count-min sketches and Top-K values use a HotKV format that only HotKV can restore.

Case RESP2 RESP3
The key exists Bulk string: the payload Bulk string
The key does not exist Nil bulk string Null
127.0.0.1:6379> SET greeting "hello"
OK
127.0.0.1:6379> DUMP greeting
"\x00\x05hello\t\x00\xb3\x80\x8e\xba1\xb2C\xbb"
127.0.0.1:6379> DUMP missing
(nil)

Same as Redis 7 and Valkey 8 for the core data types. Payloads of hashes with field expiry need Redis 7.4 or later to restore on Redis.

RESTORE, COPY, MIGRATE