# Import/Export elasticsearch users and roles

**URL:** <https://discuss.elastic.co/t/import-export-elasticsearch-users-and-roles/248805>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [September 16, 2020, 9:33am UTC](https://discuss.elastic.co/t/import-export-elasticsearch-users-and-roles/248805 "2020-09-16T09:33:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![atharvak](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@atharvak](https://discuss.elastic.co/u/atharvak)\
**Post date:** [September 16, 2020, 9:33am UTC](https://discuss.elastic.co/t/import-export-elasticsearch-users-and-roles/248805/1 "2020-09-16T09:33:34Z")

</div>

Greetings,  
I have to backup user and roles from one server to another server. I am following the given method to achieve this.

- Take JSON dump of `.security-7` index from source server.
- Re-index `.security-7` index on destination server.
- Point alias `.security` to newly re-indexed `.security-7` index.
- Restart service.

The re-indexing is done by third party-tool `elasticdump`. The indexing is successful and alias pointing is also successful. Still, the users are not imported on source server. What could be the possible the reasons behind this. Please suggest an alternative way is possible _(Not snapshot and restore though!)_ or report any issue with current method.

Any help is appreciated! Thanks in advance 🙂

My Elasticsearch version is `7.6.2`

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 17, 2020, 12:17am UTC](https://discuss.elastic.co/t/import-export-elasticsearch-users-and-roles/248805/2 "2020-09-17T00:17:02Z")

</div>

If the reindex worked, then there must be data in the new index?

---

<div class="post-metadata">

**Author:** ![atharvak](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@atharvak](https://discuss.elastic.co/u/atharvak)\
**Post date:** [September 17, 2020, 5:55am UTC](https://discuss.elastic.co/t/import-export-elasticsearch-users-and-roles/248805/3 "2020-09-17T05:55:56Z")

</div>

Yes @warkolm, The reindexing worked and when I checked the `.security-7` index's content, it also had users, passwords and other stuff. But authentication with newly imported users did not work.

---

<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:** [October 15, 2020, 5:56am UTC](https://discuss.elastic.co/t/import-export-elasticsearch-users-and-roles/248805/4 "2020-10-15T05:56:16Z")

</div>

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