Skip to content

A simple python script to help you migrate indices from Elasticsearch v1.3 to v5.x while maintaining the same index name.

License

Notifications You must be signed in to change notification settings

dpavlos/elasticsearch_migration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Elasticsearch migration (v1.3 to v5.x)

A simple python script to help you migrate indices from Elasticsearch v1.3 to v5.x while maintaining the same index name. Since Elasticsearch v2.3.0 and later there is the very handy _reindex call which can be used to copy documents from one index to another or even recreate the whole index. However, this call doesn't support at the moment the usage of the same index name on the destination host. This script uses the _cat call to fetch the list of all indices and the _reindex call to copy them to the destination host. It also takes into account the indices that have already been migrated and may be closed.

usage: migrate.py [-h] -s SOURCE -d DESTINATION [-t TIMEOUT]

arguments:
  -h, --help            show this help message and exit
  -s SOURCE, --source SOURCE
                        Source host with port eg. "http://host:9200"
  -d DESTINATION, --destination DESTINATION
                        Destination host with port eg. "http://host:9200"
  -t TIMEOUT, --timeout TIMEOUT
                        Timeout in seconds - Default: 10

Prerequisites

License

The code is available under the MIT license.

About

A simple python script to help you migrate indices from Elasticsearch v1.3 to v5.x while maintaining the same index name.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages