content/commands/dump.md
Serialize the value stored at key in a Redis-specific format and return it to
the user.
The returned value can be synthesized back into a Redis key using the [RESTORE]({{< relref "/commands/restore" >}})
command.
The serialization format is opaque and non-standard, however it has a few semantic characteristics:
RESTORE]({{< relref "/commands/restore" >}}) command makes sure to check the checksum before synthesizing a
key using the serialized value.The serialized value does NOT contain expire information.
In order to capture the time to live of the current value the [PTTL]({{< relref "/commands/pttl" >}}) command
should be used.
If key does not exist a nil bulk reply is returned.
> SET mykey 10
OK
> DUMP mykey
"\x00\xc0\n\n\x00n\x9fWE\x0e\xaec\xbb"
| Redis Software | Redis Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> | |:----------------------|:-----------------|:------| | <span title="Supported">✅ Standard</span> <span title="Supported"><nobr>✅ Active-Active</nobr></span> | <span title="Supported">✅ Standard</span> <span title="Supported"><nobr>✅ Active-Active</nobr></span> | |
{{< multitabs id="dump-return-info" tab1="RESP2" tab2="RESP3" >}}
One of the following:
-tab-sep-
One of the following:
{{< /multitabs >}}