项目作者: frankill
项目描述 :
Elasticsearch transfer tool for Elasticsearch (Golang)
高级语言: Go
项目地址: git://github.com/frankill/es_transfer.git
es_transfer
go build -ldflags "-s -w" -o es_transfer .
# Copy all source data + map to destination
./es_transfer -fi="source ip" -ti="dest ip"
# Do not use source index mapping
./es_transfer -fi="source ip" -ti="dest ip" -km=true
# Specify a single or multiple index, Multiple indexes separated by commas
./es_transfer -fi="source ip" -ti="dest ip" -i="index1,index2,index3"
# Copy source index mapping only, do not import data
./es_transfer -fi="source ip" -ti="dest ip" -num=-99
# Single shard copy 3000 ,No data will be copied if -num is less than - bnum
./es_transfer -fi="source ip" -ti="dest ip" -num=3000
# Read 2 indexes in parallel
./es_transfer -fi="source ip" -ti="dest ip" -p=2
# The data is processed by specifying the preprocessing pipeline ID of the target es
./es_transfer -fi="source ip" -ti="dest ip" -pid=test1
# use wildcards* Include test_ do not include test_id_
./es_transfer -fi="source ip" -ti="dest ip" -i=test_* -v=test_id_*
PUT _ingest/pipeline/test1
{
"description": "this is test pipeline",
"processors": [
{
"drop": {
"if": " ctx?.tags == null "
}
},
{
"set": {
"field": "_index",
"value": "test_{{tags}}"
}
}
]
}