Quick Start
Table of Contents
If you only need to synchronize existing data, you can follow these steps to complete the data migration for specified indices.
Download Ela Data Migration Tool
- Windows
Invoke-WebRequest -Uri "https://github.com/CharellKing/ela/releases/download/v1.2.5/ela.exe" -OutFile "ela.exe"
- Linux
wget https://github.com/CharellKing/ela/releases/download/v1.2.5/ela.linux.amd64 -O ela
chmod +x ela
- MacOS
wget https://github.com/CharellKing/ela/releases/download/v1.2.5/ela.darwin.amd64 -O ela
chmod +x ela
Configuration File
level: "info"
elastics:
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"
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: false
slice_size: 5
scroll_size: 5000
buffer_count: 3000
action_parallelism: 5
action_size: 5
scroll_time: 10
parallelism: 12
action: sync
-
According to your actual situation, you need to modify the elastics configuration parameters, setting the addresses, usernames, and passwords for both source and target ES clusters.
-
Based on the elastics configuration, modify source_es and target_es to match the names of your source and target ES clusters.
-
According to your requirements, modify the source_index and target_index in index_pairs to match your source and target index names, or modify the index_pattern regex to match the indices you want to migrate.
Execute Migration Task
- Execute a single task
ela.exe -c config.yaml --task stock-sync-task
–task the parameter should be followed by the task name defined in the tasks section.
- Execute all tasks
ela.exe -c config.yaml --tasks
–tasks executes all tasks defined in the configuration file.