有一个好用的开源zkcopy,直接搞定。
git clone https://github.com/kshchepanovskyi/zkcopy.git

zkcopy

Tool for fast copying ZooKeeper data between different clusters.
Optimized for copying big volumes of data over WAN.

Build

Requires apache maven 3.

mvn clean install

Usage

java -Dsource="server:port/path" \
     -Ddestination="server:port/path" \
     -Dthreads=10 \
     -DremoveDeprecatedNodes=true \
     -jar target/zkcopy-*-jar-with-dependencies.jar

If using docker then:

docker pull kshchepanovskyi/zkcopy
docker run --rm -it kshchepanovskyi/zkcopy \
    -Dsource="server:port/path" \
    -Ddestination="server:port/path" \
    -Dthreads=10 \
    -DremoveDeprecatedNodes=true
  • source - set source cluster address and root node to be copied
  • destination - set target cluster address and root node location where to
    copy data
  • threads - specify number of parallel workers. If latency is
    high, then increasing this number might significantly improve performance
  • removeDeprecatedNodes - set it to true to remove nodes that are
    present on destination but missing on source

相关文章:

  • 2021-08-31
  • 2021-11-08
  • 2022-02-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-01
  • 2021-12-10
猜你喜欢
  • 2021-08-28
  • 2021-08-04
  • 2021-06-23
  • 2021-07-06
  • 2021-06-14
  • 2021-07-13
  • 2022-12-23
相关资源
相似解决方案