Hi,
The
etcdctl make-mirror command watches one cluster, and writes the watch response to another etcd cluster. It's just a simple tool, not a production ready solution. I would suggest to implement a similar tool/service, and I think there are a couple of caveats to implement such a tool/service,
1. To ensure there is no duplication, no loss of data. The only way is to depend on the revision. If the tool/service somehow crashes or interrupts, you will need to watch starting from the previous last revision + 1.
2. The etcd watcher only watches the key space. It means you can only sync the key/value data, but not include changes in any other space/buckets, i.e. membership data, lease, alarm etc.
If you just want to transfer data from one cluster to another cluster one time, then backup and restore is still the simplest and robust way. If you want to do it online, i.e. transfer cluster from one region or AZ to another region or AZ (of the same region), one solution that I can think of (also I did several years ago) is to transfer the member/node one by one. For example, add a member in the target region or AZ into the source cluster, once its local data is in sync with the leader, remove a member from the source cluster; repeat the step until all members are transferred to the target region or AZ.
Hope this helps.
Benjamin