# Why snapshot API requires shared file system?

**URL:** <https://discuss.elastic.co/t/why-snapshot-api-requires-shared-file-system/192612>\
**Category:** Elasticsearch\
**Created:** [July 29, 2019, 6:58am UTC](https://discuss.elastic.co/t/why-snapshot-api-requires-shared-file-system/192612 "2019-07-29T06:58:50Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmk1995](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@mmk1995](https://discuss.elastic.co/u/mmk1995)\
**Post date:** [July 29, 2019, 6:58am UTC](https://discuss.elastic.co/t/why-snapshot-api-requires-shared-file-system/192612/1 "2019-07-29T06:58:50Z")

</div>

My case wanted to backup only one node of a cluster, I know it is good practice to backup the whole cluster, but my ELK infrastructure do not have a shared file system, if there is no other choice, of course I will create the shared file system, but I just wonder why I can't put my backup on local disk, what is difference between backing up in local disk and shared disk? Thanks.

---

<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:** [July 29, 2019, 7:10am UTC](https://discuss.elastic.co/t/why-snapshot-api-requires-shared-file-system/192612/2 "2019-07-29T07:10:05Z")

</div>

If it's a single node then the local FS will be fine, as there are no other nodes to write from.

---

<div class="post-metadata">

**Author:** ![mmk1995](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@mmk1995](https://discuss.elastic.co/u/mmk1995)\
**Post date:** [July 29, 2019, 7:37am UTC](https://discuss.elastic.co/t/why-snapshot-api-requires-shared-file-system/192612/3 "2019-07-29T07:37:05Z")

</div>

So I actually can snapshot 1 node in a cluster if I specify a path pointing a local FS?  
Since I cannot find any prove on Elasticsearch official document or Google search.  
Thanks.

---

<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:** [July 29, 2019, 7:59am UTC](https://discuss.elastic.co/t/why-snapshot-api-requires-shared-file-system/192612/4 "2019-07-29T07:59:24Z")

</div>

Yep, only for a one node cluster though.

It's not documented as we recommend clusters being 3 or more nodes.

---

<div class="post-metadata">

**Author:** ![mmk1995](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@mmk1995](https://discuss.elastic.co/u/mmk1995)\
**Post date:** [July 29, 2019, 8:13am UTC](https://discuss.elastic.co/t/why-snapshot-api-requires-shared-file-system/192612/5 "2019-07-29T08:13:47Z")

</div>

Thanks for answering.  
How about 1 out of 3 node cluster? Is it possible to snapshot 1 node in the cluster if I specify a path pointing a local FS of 1 node?  
Another question is what would be the "type" for the API request? (Official site only suggest "fs" for shared FS)

> PUT /\_snapshot/my\_fs\_backup  
> {  
> "type": "fs",  
> "settings": {  
> "location": "/mount/backups/my\_fs\_backup\_location",  
> "compress": true  
> }  
> }

---

<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:** [July 29, 2019, 8:24am UTC](https://discuss.elastic.co/t/why-snapshot-api-requires-shared-file-system/192612/6 "2019-07-29T08:24:00Z")

</div>

> [@mmk1995](#):
>
> How about 1 out of 3 node cluster? Is it possible to snapshot 1 node in the cluster if I specify a path pointing a local FS of 1 node?

Nope, **all** nodes need to be able to write data to the storage location.

> [@mmk1995](#):
>
> Another question is what would be the "type" for the API request? (Official site only suggest "fs" for shared FS)

Just use `fs`.

---

<div class="post-metadata">

**Author:** ![mmk1995](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@mmk1995](https://discuss.elastic.co/u/mmk1995)\
**Post date:** [July 29, 2019, 9:14am UTC](https://discuss.elastic.co/t/why-snapshot-api-requires-shared-file-system/192612/7 "2019-07-29T09:14:39Z")

</div>

thanks for answering,  
one more further question  
How much size would the backup be if my index is 10G in size? Or how large I should assume the size for the backup be?

---

<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:** [July 29, 2019, 9:16am UTC](https://discuss.elastic.co/t/why-snapshot-api-requires-shared-file-system/192612/8 "2019-07-29T09:16:51Z")

</div>

It'd be a similar size.

---

<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 26, 2019, 9:30am UTC](https://discuss.elastic.co/t/why-snapshot-api-requires-shared-file-system/192612/9 "2019-08-26T09:30:09Z")

</div>

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