# Python script for reindex

**URL:** <https://discuss.elastic.co/t/python-script-for-reindex/173040>\
**Category:** Elasticsearch\
**Created:** [March 19, 2019, 7:15pm UTC](https://discuss.elastic.co/t/python-script-for-reindex/173040 "2019-03-19T19:15:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![He\_Pamela](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/he_pamela/32/42370_2.png) [@He\_Pamela](https://discuss.elastic.co/u/He_Pamela)\
**Post date:** [March 19, 2019, 7:15pm UTC](https://discuss.elastic.co/t/python-script-for-reindex/173040/1 "2019-03-19T19:15:05Z")

</div>

Hi, I want to make a python script to reindex the data from nodeA to nodeB. I want to send the credentials through the request.  
Somebody nows how to do this? I've seen a elasticsearch-py library but I don`t know If this is possible to make a reindex using python.

Thanks.

---

<div class="post-metadata">

**Author:** ![pjanzen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pjanzen/32/13756_2.png) [@pjanzen](https://discuss.elastic.co/u/pjanzen)\
**Post date:** [March 19, 2019, 7:27pm UTC](https://discuss.elastic.co/t/python-script-for-reindex/173040/2 "2019-03-19T19:27:35Z")

</div>

The awnser is not python but it might point you to a solution.

[reindex-from-remote](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html#reindex-from-remote)

---

<div class="post-metadata">

**Author:** ![pjanzen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pjanzen/32/13756_2.png) [@pjanzen](https://discuss.elastic.co/u/pjanzen)\
**Post date:** [March 19, 2019, 7:31pm UTC](https://discuss.elastic.co/t/python-script-for-reindex/173040/3 "2019-03-19T19:31:52Z")

</div>

I did came across this [https://gist.github.com/EikeDehling/c1c81d89ec92597de3d3db49e99f5a1f](https://gist.github.com/EikeDehling/c1c81d89ec92597de3d3db49e99f5a1f) which might help aswell.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 16, 2019, 7:31pm UTC](https://discuss.elastic.co/t/python-script-for-reindex/173040/4 "2019-04-16T19:31:54Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
