first of all, you should indicate your ES version.
anyway, you can follow the guide here
basically, you have to create an Elasticsearch connection object (i.e. es) and then you can use the standard function es.snapshot.create and es.snapshot.restore
to restore it, you can work in a similar way.
Remember that before to work with Python, you have to configure the path.repo key value in your elasticsearch.yml and create your repository (maybe using Kibana if you prefer).
elasticsearch.exceptions.TransportError: TransportError(500, 'repository_exception', "[test] file url [http://download.elasticsearch.org/definitiveguide/sigterms_demo/] doesn't match any of the locations specified by path.repo or repositories.url.allowed_urls")
Am I creating the snapshot correctly?
I want to store the data from index1,index2 into a path /home/usr1/indexes/
I know that I can manually scroll through the index data and then save it but I also read somewhere that it is not recommended. Can someone please give me a small working example which they tested on their side?
Snapshots in Elasticsearch require shared storage which all the nodes in the cluster have access to on the same path. Local storage can only be used if you only have a single nodes/host.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.