English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The Redis DUMP command is used to serialize the given key and return the serialized value.
The basic syntax of the redis DUMP command is as follows:
redis 127.0.0.1:6379> DUMP KEY_NAME
>= 2.6.0
If the key does not exist, then return nil. Otherwise, return the serialized value.
Firstly, we create a key and set its value in redis.
redis> SET greeting "hello, dumping world!" OK
Now using the DUMP serialization to serialize the key-value.
redis> DUMP greeting "\x00\x15hello, dumping world!\x06\x00E\xa0Z\x82\xd8r\xc1\xde" redis> DUMP not-exists-key (nil)