https://github.com/medcl/esm-abandoned
下载esm.exe
在cmd中执行以下命令
"E:\esm.exe" -s http://192.168.1.7:9200 -d http://192.168.1.9:9200 -x 0920_full -w=5 -b=10 -c 10000 --refresh
-s, --source= source elasticsearch instance
-d, --dest= destination elasticsearch instance
-q, --query= query against source elasticsearch instance, filter data before migrate, ie: name:medcl
-m, --source_auth basic auth of source elasticsearch instance, ie: user:pass
-n, --dest_auth basic auth of target elasticsearch instance, ie: user:pass
-c, --count= number of documents at a time: ie "size" in the scroll request (10000)
--sliced_scroll_size= size of sliced scroll, to make it work, the size should be > 1, default:"1"
-t, --time= scroll time (1m)
--shards= set a number of shards on newly created indexes
--copy_settings copy index settings from source
--copy_mappings copy mappings mappings from source
-f, --force delete destination index before copying, default:false
-x, --src_indexes= list of indexes to copy, comma separated (_all), support wildcard match(*)
-y, --dest_index= indexes name to save, allow only one indexname, original indexname will be used if not specified
-a, --all copy indexes starting with . and _ (false)
-w, --workers= concurrency number for bulk workers, default is: "1"
-b --bulk_size bulk size in MB" default:5
-v --log setting log level,options:trace,debug,info,warn,error
-i --input_file indexing from local dump file, file format: {"_id":"xxx","_index":"xxx","_source":{"xxx":"xxx"},"_type":"xxx" }
-o --output_file output documents of source index into local file, file format same as input_file.
--source_proxy set proxy to source http connections, ie: http://127.0.0.1:8080
--dest_proxy set proxy to destination http connections, ie: http://127.0.0.1:8080
--refresh refresh after migration finished
网友评论