English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Redis Dump Command

Redis key (key)

The Redis DUMP command is used to serialize the 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 Version

>= 2.6.0

Return Value

If the key does not exist, then return nil. Otherwise, return the serialized value.

Online Examples

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)

Redis key (key)