elasticsearchelasticsearch-5xpackelasticsearch-x-pack

How can I copy a machine learning model from one Elasticsearch server to another?


I'm using Elasticsearch with X-Pack's ML module installed.

I have a machine learning model created on one server, but now I want to transfer that model to another Elasticsearch instance, so that it can be used there without having to re-run the ML job to build to model (because the model was built from a large dataset).

Is it possible to export a generated ML model from one instance of Elasticsearch and import it into another instance?


Solution

  • If I'm not mistaken, all data are stored in indices named .ml-* which means that you can either do a snapshot and restore or use the reindex API (but beware of the mapping to use).