Search code examples
redisamazon-elasticacheredis-cli

unknown command 'MIGRATE', with args beginning with


I have an existing source redis instance running on redis version 6.0.5 cache.m6g.large

I have a target redis instance running on redis version 7.1.0

I want to migrate keys from the source to the target. using the redis-cli command https://redis.io/commands/migrate/

redis-cli --version
redis-cli 6.0.16

However im receiving the following error:

(error) ERR unknown command 'MIGRATE', with args beginning with: 'redis.redacted.com' '6379' '' '0' '5000' 'KEYS' 'namespace:data-api,key:jsonapi:http://data.api.redacted.com/redacted/redacted?end_d'

source_host=""
source_port=6379
source_db=0

target_host=""
target_port=6379
target_db=0

redis-cli -h $source_host -p $source_port -n $source_db --scan | xargs redis-cli -h $target_host -p $target_port -n $target_db MIGRATE $source_host $source_port "" 0 5000 KEYS

Even if i try individually without the script

MIGRATE redis.acme.com 6379 "" 0 5000 KEYS "some_key"

(error) ERR unknown command 'MIGRATE', with args beginning with: 'redis.acme.com' '6379' '' '0' '5000' 'KEYS' 'some_key'strong text

Whaat am i doing wrong?


Solution

  • AWS's elasticache redis has made the migrate command unavialable.

    https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SupportedCommands.html