# Backup and store data in Elastic search

**URL:** <https://discuss.elastic.co/t/backup-and-store-data-in-elastic-search/103307>\
**Category:** Elasticsearch\
**Created:** [October 10, 2017, 7:35am UTC](https://discuss.elastic.co/t/backup-and-store-data-in-elastic-search/103307 "2017-10-10T07:35:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramesh205](https://avatars.discourse-cdn.com/v4/letter/r/5f8ce5/32.png) [@ramesh205](https://discuss.elastic.co/u/ramesh205)\
**Post date:** [October 10, 2017, 7:35am UTC](https://discuss.elastic.co/t/backup-and-store-data-in-elastic-search/103307/1 "2017-10-10T07:35:59Z")

</div>

Hi team,We are using ELK 5.5.2 stack in our organization in a windows machine had free space of 250 GB,please let me know how to take backup and restore data in Elastic search 5.5.2.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 10, 2017, 8:14am UTC](https://discuss.elastic.co/t/backup-and-store-data-in-elastic-search/103307/2 "2017-10-10T08:14:17Z")

</div>

Here we go: [https://www.elastic.co/guide/en/elasticsearch/reference/5.6/modules-snapshots.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/modules-snapshots.html)

---

<div class="post-metadata">

**Author:** ![ramesh205](https://avatars.discourse-cdn.com/v4/letter/r/5f8ce5/32.png) [@ramesh205](https://discuss.elastic.co/u/ramesh205)\
**Post date:** [October 16, 2017, 11:44am UTC](https://discuss.elastic.co/t/backup-and-store-data-in-elastic-search/103307/3 "2017-10-16T11:44:14Z")

</div>

Step1: created local folder and updated that path in es.yml file  
Step2:created repository  
PUT /\_snapshot/ESBackup  
{ "type": "fs",  
"settings": {  
"location": "jupiterindex3",  
"compress": "true"  
}}  
step3:backup start  
PUT /\_snapshot/ESBackup  
{  
"indices": "jupiterindex3",  
"ignore\_unavailable": true,  
"include\_global\_state": false  
}  
error as shown below:

"error": {  
"root\_cause": [  
{  
"type": "action\_request\_validation\_exception",  
"reason": "Validation Failed: 1: type is missing;"  
}  
]  
Step4: added type of index  
PUT /\_snapshot/ESBackup  
{ "type": "fs",  
"settings": {  
"location": "jupiterindex3",  
"compress": "true",  
"type":"logs"  
}}

PUT /\_snapshot/ESBackup  
{  
"indices": "jupiterindex3",  
"type":"logs",  
"ignore\_unavailable": true,  
"include\_global\_state": false  
}  
Again another error came:  
"error": {  
"root\_cause": [  
{  
"type": "repository\_exception",  
"reason": "[ESBackup] repository type [logs] does not exist"  
}

Please let me know what to do.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 16, 2017, 12:43pm UTC](https://discuss.elastic.co/t/backup-and-store-data-in-elastic-search/103307/4 "2017-10-16T12:43:05Z")

</div>

When running the snapshot you need to give it an id:

```
PUT /_snapshot/my_backup/snapshot_1?wait_for_completion=true
```

---

<div class="post-metadata">

**Author:** ![ramesh205](https://avatars.discourse-cdn.com/v4/letter/r/5f8ce5/32.png) [@ramesh205](https://discuss.elastic.co/u/ramesh205)\
**Post date:** [October 16, 2017, 12:49pm UTC](https://discuss.elastic.co/t/backup-and-store-data-in-elastic-search/103307/5 "2017-10-16T12:49:34Z")

</div>

> [@dadoonet](#):
>
> PUT /\_snapshot/my\_backup/snapshot\_1?wait\_for\_completion=true

superb, its working.thanks alot.

---

<div class="post-metadata">

**Author:** ![ramesh205](https://avatars.discourse-cdn.com/v4/letter/r/5f8ce5/32.png) [@ramesh205](https://discuss.elastic.co/u/ramesh205)\
**Post date:** [October 23, 2017, 11:07am UTC](https://discuss.elastic.co/t/backup-and-store-data-in-elastic-search/103307/6 "2017-10-23T11:07:31Z")

</div>

hi,  
in es.yml file i mentioned path.repo: ["D:\Temp\ESBackup"] so it created new repositoy i can able to take backup to d drive but my requirement is to take backup to remote location as below  
path.repo: ["\10.13.44.80:\Temp\ESBackup"]  
Please suggest how to point remote path as backup location

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 23, 2017, 2:20pm UTC](https://discuss.elastic.co/t/backup-and-store-data-in-elastic-search/103307/7 "2017-10-23T14:20:04Z")

</div>

The path needs to be a shared folder.  
The way you mount it locally is up to you and not something elasticsearch specific.

If you can run `ls \10.13.44.80:\Temp\ESBackup` from all nodes, then that should 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:** [November 20, 2017, 2:20pm UTC](https://discuss.elastic.co/t/backup-and-store-data-in-elastic-search/103307/8 "2017-11-20T14:20:39Z")

</div>

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