Import/Export elasticsearch users and roles

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 :slight_smile:

My Elasticsearch version is 7.6.2

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

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.