Commit c4c79b70 by Max Rothman

Move copy-index.sh to configuration repo

It will be used for several elasticsearch migrations, so it's not
specific to forums. Also it'll be updated to use logstash since
stream2es is unmaintained.
parent 71f046b1
#!/usr/bin/env bash
#
# Thin wrapper around stream2es.
#
# https://github.com/elasticsearch/stream2es
#
# Copies an index from an elasticsearch source server to a target server.
# The target server can be the same as the source.
#
# Example:
#
# ./copy-index.sh http://localhost:9200 source_index http://localhost:9200 target_index
#
SOURCE_SERVER=$1
SOURCE_INDEX=$2
TARGET_SERVER=$3
TARGET_INDEX=$4
WORKERS="6"
stream2es es -w ${WORKERS} --source "${SOURCE_SERVER}/${SOURCE_INDEX}" --target "${TARGET_SERVER}/${TARGET_INDEX}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment