Keys Dump
# Redis DUMP Command
[!(#) Redis Key](#)
The Redis DUMP command is used to serialize a given key and return the serialized value.
### Syntax
The basic syntax of the Redis DUMP command is as follows:
redis 127.0.0.1:6379> DUMP KEY_NAME
### Available Versions
>= 2.6.0
### Return Value
If the key does not exist, it returns nil. Otherwise, it returns the serialized value.
### Example
First, let's create a key in Redis and set its value.
redis> SET greeting "hello, dumping world!" OK
Now use the DUMP command to serialize the key-value pair.
redis> DUMP greeting "x00x15hello, dumping world!x06x00Exa0Zx82xd8rxc1xde" redis> DUMP not-exists-key (nil)
[!(#) Redis Key](#)
AI is thinking...
[](#)(#)
(#)[](#)
[The Byte Ark Coding Plan supports mainstream large models such as Doubao, GLM, DeepSeek, Kimi, MiniMax, etc., with official direct supply that is stable and reliable. Configuration guide Β₯9.9/month Activate now](https://www.volcengine.com/activity/codingplan?utm_campaign=hw&utm_content=hw&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=run)
YouTip