Open sgohl opened 2 years ago
Hi This is a good idea. But we need to consider more about how we handle master switch to replica. and how other CLI command add cluster support.
- provide a command to output the list of cluster masters in a cleaner approach, and possibly,
yes. we can add above command to get cluster masters and do more than that : provide a series commands to manage all cluster nodes.
implement this loop (i mean, the complete sync/migration) with rmt , like this: rmt -s redis://default:password@AnyClusterMember:Port -m redis://Target-Single-Redis:Port -r
if we provide that command can get cluster masters. users can wirte their own shell to loop masters.
Hi,
I am looking for the best way to export a full redis-cluster to a single redis instance.
I know:
rmt
is able to sync a (given) cluster node to a single redis. I also know thatrmt
is able to fetch the list ofCLUSTER NODES
and get only the masters with their IPs and Ports, because it's presumably what-m
does, otherwise it would not work without thecluster.conf
AFAIK, there is no good/short/clean way to get the cluster masters into a bash list.
look how ugly it would be, to sync all keys from all cluster masters into a single redis:
This works, but I'm curious if you could
1) provide a command to output the list of cluster masters in a cleaner approach, and possibly, 2) implement this loop (i mean, the complete sync/migration) with
rmt
, like this:I think,
rmt
should safely be able to always check if the source is a cluster or not and proceed to work as "expected" where in case source is a single, proceed as usual. in case its a cluster, fetch the masters, and loop over them repeating the usual bgsave and dump to target. This should seemlessly work, even if the target is also a cluster