@Override
  public int run(String[] args) throws Exception {
    if (args.length != 2) {
      System.err.println("Usage: bin/hbase " + NAME
        + " <SRC_REPLICATION_PEER_STORAGE> <DST_REPLICATION_PEER_STORAGE>");
      System.err.println("The possible values for replication storage type:");
      for (ReplicationPeerStorageType type : ReplicationPeerStorageType.values()) {
        System.err.println("  " + type.name().toLowerCase());
      }
      return -1;
    }
    FileSystem fs = FileSystem.get(getConf());
    try (ZKWatcher zk = createZKWatcher()) {
      ReplicationPeerStorage src = create(args[0], fs, zk);
      ReplicationPeerStorage dst = create(args[1], fs, zk);
      migrate(src, dst);
    }
    return 0;
  }
A tool for copying replication peer data across different replication peer storages.
<p/>
Notice that we will not delete the replication peer data from the source storage, as this tool
can also be used by online migration. See HBASE-27110 for the whole design.
hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/CopyReplicationPeers.java