Copying all keys in Redis database using MIGRATE

前端 未结 5 2289
Happy的楠姐
Happy的楠姐 2021-02-20 08:13

Is it possible to copy all keys from one Redis instance to another remote instance using MIGRATE? I\'ve tried COPY, REPLACE and KEYS

5条回答
  •  难免孤独
    2021-02-20 08:39

    try run in your shell

    redis-cli keys '*' | xargs -I '{}' redis-cli migrate my.redis 6379 "" 0 5000 KEYS '{}'
    

提交回复
热议问题