# How to backup spaces and user,roles of elasticsearch

**URL:** <https://discuss.elastic.co/t/how-to-backup-spaces-and-user-roles-of-elasticsearch/231742>\
**Category:** Elasticsearch\
**Created:** [May 8, 2020, 2:08pm UTC](https://discuss.elastic.co/t/how-to-backup-spaces-and-user-roles-of-elasticsearch/231742 "2020-05-08T14:08:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dragon9](https://avatars.discourse-cdn.com/v4/letter/d/7bcc69/32.png) [@Dragon9](https://discuss.elastic.co/u/Dragon9)\
**Post date:** [May 8, 2020, 2:08pm UTC](https://discuss.elastic.co/t/how-to-backup-spaces-and-user-roles-of-elasticsearch/231742/1 "2020-05-08T14:08:48Z")

</div>

when i bounce elasticsearch and launch new application every time i need to create  
user,roles,and spaces in elasticsearch .  
i follow saved objects like dashboards using export ndjson file it is very helpful .  
so like this ndjson file, any solution for backup user,roles,and spaces .

---

<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:** [May 10, 2020, 11:21pm UTC](https://discuss.elastic.co/t/how-to-backup-spaces-and-user-roles-of-elasticsearch/231742/2 "2020-05-10T23:21:15Z")

</div>

You can snapshot the system indices - eg `.kibana` or `.security` - and then restore them like any other index.

---

<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:** [June 7, 2020, 11:21pm UTC](https://discuss.elastic.co/t/how-to-backup-spaces-and-user-roles-of-elasticsearch/231742/3 "2020-06-07T23:21:19Z")

</div>

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