How to copy keys from production redis to local

How to copy keys from production redis to local


remoteRedis> dump keyName
can get a serialized string, similar to: "\x00\x04test\a\x00~\xa2zSd;e_"

localRedis> restore keyName 0 "\x00\x04test\a\x00~\xa2zSd ;e_"

In this way, the specified key of remoteRedis is copied to the local.

Reference documentation:
https://redis.io/commands/restore

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326903302&siteId=291194637