# Backup and restore

**URL:** <https://discuss.elastic.co/t/backup-and-restore/338872>\
**Category:** Elasticsearch\
**Tags:** snapshot-and-restore\
**Created:** [July 20, 2023, 11:18am UTC](https://discuss.elastic.co/t/backup-and-restore/338872 "2023-07-20T11:18:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stephane\_chan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephane_chan/32/122193_2.png) [@stephane\_chan](https://discuss.elastic.co/u/stephane_chan)\
**Post date:** [July 20, 2023, 11:18am UTC](https://discuss.elastic.co/t/backup-and-restore/338872/1 "2023-07-20T11:18:30Z")

</div>

Hi ,

I need to make a backup of elasticsearch data, due to maintenance, and restore it afterwards,

My question is:  
Does elasticsearch save the configurations of each indices, I'm talking about **the number of shards, the analyzers created**. If not, Is there a way of saving this or can it be specified when restoring data? When I make a backup I run this on kibana dev tools:

```auto
PUT /_snapshot/<referentiel_name>/<snapshot_name>
{
  "indices": "<indices_name>",
  "ignore_unavailable": true,
  "include_global_state": false
}

```

And when I go to restore the data, I do this:

```auto
POST /_snapshot/<referentiel_name>/<snapshot_name>/_restore
{
  "indices": "<indices_name>",
  "ignore_unavailable": true,
  "include_global_state": true
}

```

Thanks.

---

<div class="post-metadata">

**Author:** ![coezdemir](https://avatars.discourse-cdn.com/v4/letter/c/7c8e57/32.png) [@coezdemir](https://discuss.elastic.co/u/coezdemir)\
**Post date:** [July 20, 2023, 1:47pm UTC](https://discuss.elastic.co/t/backup-and-restore/338872/2 "2023-07-20T13:47:26Z")

</div>

Hello,

I haven't tested this myself but, I believe the snapshot API backs up all the index settings, mappings and aliases. Since analyzers are a part of the \_settings they should be backed up as well.

If you have a specific cluster level setting tho, that should be included with the "include\_global\_state" on the creation time of the snapshot.

Regards.

---

<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:** [August 17, 2023, 1:47pm UTC](https://discuss.elastic.co/t/backup-and-restore/338872/3 "2023-08-17T13:47:49Z")

</div>

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