Copy/Migrate old zookeeper znode/data to new zookeeper

雨燕双飞 提交于 2019-12-10 09:26:37

问题


We have an old zookeeper 3-cluster quorum, with some permanent routing info stored in znodes/data. Now we are setting up another brand new 3-cluster quorum on a different data center, and we want to migrate the routing info to it. What's the best reliable way to do this?

Will simply copy the transaction log do? Or better with snapshot? Or if there are some tools to extract data from old znodes and replay creation onto the new ones?

Similar question found, but not answered best way to copy data across 2 zookeeper cluster?


回答1:


I know a couple of ways,

One is the backup-restore, i.e. you copy the zookeeper data dir from one cluster to the other, (every nodes data dir). The transaction log is constantly being written to, so that might depend if you can stop your old cluster or not. Backup wise it think the snapshots are the way to go. The snapshots are point in time copies if your node's data when the transaction log grows to large. I myself backup the epoch files and snapshot files.

Another way is to use zkcopy to copy data between two zookeeper clusters.

Another way is to use exhibitor, but it might be a bit more complicated to setup than two other methods.



来源:https://stackoverflow.com/questions/31861659/copy-migrate-old-zookeeper-znode-data-to-new-zookeeper

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!