Duplicate/Copy a redis database

Recently I needed to copy a Redis database. After a bit of confusion it’s actually quite easy: redis-cli –raw KEYS ‘*’ | xargs redis-cli MIGRATE 127.0.0.1 6379 “” 1 5000 KEYS Explanation: “Get * (all) KEYS and pipe them as argument for the redis MIGRATE command onto the server on localhost listening on port 6379… Continue Reading Duplicate/Copy a redis database