项目作者: frankill

项目描述 :
Elasticsearch transfer tool for Elasticsearch (Golang)
高级语言: Go
项目地址: git://github.com/frankill/es_transfer.git
创建时间: 2020-03-26T13:50:10Z
项目社区:https://github.com/frankill/es_transfer

开源协议:

下载


es_transfer

  1. go build -ldflags "-s -w" -o es_transfer .
  2. # Copy all source data + map to destination
  3. ./es_transfer -fi="source ip" -ti="dest ip"
  4. # Do not use source index mapping
  5. ./es_transfer -fi="source ip" -ti="dest ip" -km=true
  6. # Specify a single or multiple index, Multiple indexes separated by commas
  7. ./es_transfer -fi="source ip" -ti="dest ip" -i="index1,index2,index3"
  8. # Copy source index mapping only, do not import data
  9. ./es_transfer -fi="source ip" -ti="dest ip" -num=-99
  10. # Single shard copy 3000 ,No data will be copied if -num is less than - bnum
  11. ./es_transfer -fi="source ip" -ti="dest ip" -num=3000
  12. # Read 2 indexes in parallel
  13. ./es_transfer -fi="source ip" -ti="dest ip" -p=2
  14. # The data is processed by specifying the preprocessing pipeline ID of the target es
  15. ./es_transfer -fi="source ip" -ti="dest ip" -pid=test1
  16. # use wildcards* Include test_ do not include test_id_
  17. ./es_transfer -fi="source ip" -ti="dest ip" -i=test_* -v=test_id_*
  1. PUT _ingest/pipeline/test1
  2. {
  3. "description": "this is test pipeline",
  4. "processors": [
  5. {
  6. "drop": {
  7. "if": " ctx?.tags == null "
  8. }
  9. },
  10. {
  11. "set": {
  12. "field": "_index",
  13. "value": "test_{{tags}}"
  14. }
  15. }
  16. ]
  17. }