ZooKeeper copy utililty
Branch: master
Clone or download
Latest commit 42666da Aug 9, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Adds initial testcontainers.org integration test Feb 5, 2018
.gitignore #1: Migrate to maven Sep 12, 2015
LICENSE Add license Sep 12, 2015
README.md Removes spurious defaults from readme Jun 17, 2018
checkstyle.xml Updates Jan 31, 2018
pom.xml Adds initial testcontainers.org integration test Feb 5, 2018



Tool for fast copying ZooKeeper data between different clusters. Originally it was developed for copying big volumes of configuration over WAN.


Requires apache maven 3.

mvn clean install


java -jar target/zkcopy.jar --source server:port/path --target server:port/path

With docker, use following commands:

docker pull ksprojects/zkcopy
docker run --rm -it ksprojects/zkcopy --source server:port/path --target server:port/path


Usage: zkcopy [-ci] [--help] [--timeout=<sessionTimeout>] [-b=<batchSize>]
              [-m=<mtime>] -s=server:port/path -t=server:port/path
      --help                  display this help and exit
                              Session timeout in milliseconds
                                Default: 40000
  -b, --batchSize=<batchSize> Batch write operations into transactions of this
                                many operations. Batch sizes are limited by the
                                jute.maxbuffer server-side config, usually
                                around 1 MB.
                                Default: 1000
  -c, --copyOnly[=<copyOnly>] set this flag if you do not want to remove nodes
                                that are removed on source
  -i, --ignoreEphemeralNodes[=<ignoreEphemeralNodes>]
                              set this flag to false if you do not want to copy
                                ephemeral ZNodes
  -m, --mtime=<mtime>         Ignore nodes older than mtime
                                Default: -1
  -s, --source=server:port/path
                              location of a source tree to copy

  -t, --target=server:port/path
                              target location

  -w, --workers=<workers>     number of concurrent workers to copy data
                                Default: 100