English | 简体中文
A tool to migrate data between elasticsearch without loss.
- copy index settings between elasticsearch.
- batch create index template according elasticsearch index.
- sync stock data from source elasticsearch.
- compare data between elasticsearch.
- compare & sync data between elasticsearch.
- import data from file to elasticsearch.
- export data from elasticsearch to file.
- sync incremental data without service loss.
go mod tidy
go build -o ela
level: "info"
elastics:
source-es5:
addresses:
- "http://192.168.1.55:9200"
- "http://192.168.1.56:9200"
- "http://192.168.1.56:9200"
user: "es-user"
password: "123456"
source-es8:
addresses:
- "http://192.168.1.67:9200"
- "http://192.168.1.68:9200"
- "http://192.168.1.69:9200"
user: "es-user2"
password: "123456"
tasks:
- name: stock-sync-task
source_es: es5
target_es: es8
index_pairs:
-
source_index: "hello_sample"
target_index: "sample_123"
index_pattern: "test_.*"
force: true
slice_size: 5
scroll_size: 5000
buffer_count: 3000
action_parallelism: 5
action_size: 5
scroll_time: 10
parallelism: 12
action: sync
gateway:
address: "0.0.0.0:8080"
user: "user"
password: "123456"
source_es: "source-es5"
target_es: "target-es8"
master: "source-es5"
./ela --config ./config.yaml --gateway
./ela --config ./config.yaml --task "stock-sync-task"
You should read the following articles in order to understand how the whole scheme works.