将旧的Zookeeper znode/数据复制/迁移到新的Zookeeper [英] Copy/Migrate old zookeeper znode/data to new zookeeper

查看:62
本文介绍了将旧的Zookeeper znode/数据复制/迁移到新的Zookeeper的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个旧的Zookeeper 3集群定额,其中一些永久路由信息存储在znodes/data中.现在,我们在不同的数据中心上设置另一个全新的3群集仲裁,我们希望将路由信息迁移到该仲裁中心.最好的可靠方法是什么?

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?

会简单地复制事务日志吗?还是快照更好?还是如果有一些工具可以从旧的znode提取数据并将创建的内容重播到新的znode上?

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?

发现了类似的问题,但未得到回答最佳复制方法跨两个Zookeeper集群的数据?

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

推荐答案

我知道几种方法,

一个是备份还原,即,将zookeeper数据目录从一个群集复制到另一个群集(每个节点的数据目录).事务日志不断被写入,因此这取决于您是否可以停止旧群集.明智的备份是,快照是必经之路.如果事务日志变大时节点的数据,则快照是时间点副本.我自己备份了纪元文件和快照文件.

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.

另一种方法是使用 zkcopy 在两个Zookeeper集群之间复制数据.

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

另一种方法是使用 exhibitor ,但设置起来可能比其他两个要复杂一些方法.

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

这篇关于将旧的Zookeeper znode/数据复制/迁移到新的Zookeeper的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆