For example:
redis-cli --cluster import my-cluster-host-1:6379 --cluster-from 127.0.0.1:6379
>>> Importing data from 127.0.0.1:6379 to cluster my-cluster-host-1:6379
>>> Performing Cluster Check (using node my-cluster-host-1:6379)
M: 1066d6372b79a084c408de9a463dec0ce805750e my-cluster-host-1:6379
slots:[0-5460] (5461 slots) master
1 additional replica(s)
S: f7e6348607aae9f054948366393e393c13879ddb 10.199.42.23:6379
slots: (0 slots) slave
replicates 470827cd4b5772f27c7340b0f5653921a8fb38d9
M: 470827cd4b5772f27c7340b0f5653921a8fb38d9 10.199.42.52:6379
slots:[5461-10922] (5462 slots) master
1 additional replica(s)
S: 0786ca5ea420827b64fdfdc6a070925b18fd545f 10.199.42.15:6379
slots: (0 slots) slave
replicates 1066d6372b79a084c408de9a463dec0ce805750e
M: 59d8695522ab85fbe4e69b39059ab36e6a3f77a4 10.199.42.13:6379
slots:[10923-16383] (5461 slots) master
1 additional replica(s)
S: b4b5bc85cbbee9dee0cef9b18138947fb69d7507 10.199.42.49:6379
slots: (0 slots) slave
replicates 59d8695522ab85fbe4e69b39059ab36e6a3f77a4
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All 16384 slots covered.
*** Importing 16919 keys from DB 0
Migrating my_key to 10.199.42.52:6379: Source 127.0.0.1:6379 replied with error:
ERR Target instance replied with error: NOAUTH Authentication required
It looks like we need some how pass the password of cluster to the source instance so the migrate process can work well.
Please advice if we can do it somehow. I've been searching through the docs quite a lot but couldn't find one. ( Only found the AUTH for migrate command )
Thanks in advance
Comment From: tungdam
Note that i stored the password for cluster in REDISCLI_AUTH env so redis-cli still authenticates well with cluster My local source instance doesn't have auth set.
Comment From: artix75
Hello @tungdam, AUTH is currently used only to authenticate on the cluster nodes and, actually, it's not used to authenticate on the source instance specified in the --cluster-from option of the migrate command.
Comment From: tungdam
Thank you @artix75 for your prompt response.
Then could you please show me how to solve the error that i posted in the description ?
Source 127.0.0.1:6379 replied with error: ERR Target instance replied with error: NOAUTH Authentication required
I believe that it's the problem with authentication from the source instance specified in the --cluster-from to cluster but don't know how to tell it to use our password.
Comment From: oranagra
This seems trivial to fix in case someone wants to pick this up.