# Snapshot and restore source only feature

**URL:** https://discuss.elastic.co/t/snapshot-and-restore-source-only-feature/240881
**Category:** Elasticsearch
**Created:** [July 13, 2020, 2:11am UTC](https://discuss.elastic.co/t/snapshot-and-restore-source-only-feature/240881 "2020-07-13T02:11:48Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![lusynda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lusynda/32/53557_2.png) [@lusynda](https://discuss.elastic.co/u/lusynda)
#### Post date: [July 13, 2020, 2:11am UTC](https://discuss.elastic.co/t/snapshot-and-restore-source-only-feature/240881/1 "2020-07-13T02:11:48Z")

</div>

Hi all  
i recently trying the snapshot feature in elastic and i noticed the feature source only button there, according to what i have read the source only will only save the metadata and the field of the index and nothing else. I dont really understand what is the point of having that feature in the snapshot when they will only save really nothing that we need.

I have try reindexing like the doc told me and they do in fact get the data back but i do have to ask where is that data comming from since none of the data is saved during the snapshot.

---

<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 13, 2020, 3:13am UTC](https://discuss.elastic.co/t/snapshot-and-restore-source-only-feature/240881/2 "2020-07-13T03:13:27Z")

</div>

> [@lusynda](#):
>
> I dont really understand what is the point of having that feature in the snapshot when they will only save really nothing that we need.

That would be the mappings, which are important.

> [@lusynda](#):
>
> I have try reindexing like the doc told me and they do in fact get the data back but i do have to ask where is that data comming from since none of the data is saved during the snapshot.

It's not clear what you mean by this. Which doc are you referring to?

---

<div class="post-metadata">

### Author: ![lusynda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lusynda/32/53557_2.png) [@lusynda](https://discuss.elastic.co/u/lusynda)
#### Post date: [July 13, 2020, 3:26am UTC](https://discuss.elastic.co/t/snapshot-and-restore-source-only-feature/240881/3 "2020-07-13T03:26:10Z")

</div>

i dont really remember where i read it but i once read that after i restore the snapshot i need to reindex, they dont really explain why.

---

<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 13, 2020, 3:27am UTC](https://discuss.elastic.co/t/snapshot-and-restore-source-only-feature/240881/4 "2020-07-13T03:27:03Z")

</div>

Maybe if it's from an older version of Elasticsearch, yes.

---

<div class="post-metadata">

### Author: ![lusynda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lusynda/32/53557_2.png) [@lusynda](https://discuss.elastic.co/u/lusynda)
#### Post date: [July 13, 2020, 3:38am UTC](https://discuss.elastic.co/t/snapshot-and-restore-source-only-feature/240881/5 "2020-07-13T03:38:57Z")

</div>

So can you please spend some time to explain to me how the source only snapshot work and how the data from the source only snapshot when reindex can get back all the data when that feature only backup the metadata and the mapping.

---

<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 13, 2020, 3:40am UTC](https://discuss.elastic.co/t/snapshot-and-restore-source-only-feature/240881/6 "2020-07-13T03:40:24Z")

</div>

It cannot, that is why I mentioned it's not clear.

How do you know it's a source only snapshot? When you restore it, what does the index look like, is there docs in there?

---

<div class="post-metadata">

### Author: ![lusynda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lusynda/32/53557_2.png) [@lusynda](https://discuss.elastic.co/u/lusynda)
#### Post date: [July 13, 2020, 3:48am UTC](https://discuss.elastic.co/t/snapshot-and-restore-source-only-feature/240881/7 "2020-07-13T03:48:20Z")

</div>

i know that because i set the snapshot repository to source only.  
Then when i restore the snapshot the index is empty. there is nothing inside of it. Normally even when i have an index that doesnot have any doc they still display the number of doc is 0 and the size of the indices is 500KB for example. But the index that got restored doesnot even have those information.

I thinks i read the doc on the elastic guide page.

---

<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 13, 2020, 3:49am UTC](https://discuss.elastic.co/t/snapshot-and-restore-source-only-feature/240881/8 "2020-07-13T03:49:25Z")

</div>

Yep, an empty index does have a size.

So are you then running a reindex from that restored, empty index into a new one?  
If so what does the reindex request look like? Can you show the output of `_cat/indices?v` for the restored index?

---

<div class="post-metadata">

### Author: ![lusynda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lusynda/32/53557_2.png) [@lusynda](https://discuss.elastic.co/u/lusynda)
#### Post date: [July 13, 2020, 3:57am UTC](https://discuss.elastic.co/t/snapshot-and-restore-source-only-feature/240881/9 "2020-07-13T03:57:57Z")

</div>

I have viewed the indices and it is just like all other indices. The reindexing process is also the same. And since i have already delete the original indices that before the snapshot so i cant really compare the number of doc and the size.

---

<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 13, 2020, 4:01am UTC](https://discuss.elastic.co/t/snapshot-and-restore-source-only-feature/240881/10 "2020-07-13T04:01:26Z")

</div>

Without some more information, as asked for above, it's really hard to identify what is happening.

But ultimately, you cannot reindex an empty index.

---

<div class="post-metadata">

### Author: ![lusynda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lusynda/32/53557_2.png) [@lusynda](https://discuss.elastic.co/u/lusynda)
#### Post date: [July 13, 2020, 4:14am UTC](https://discuss.elastic.co/t/snapshot-and-restore-source-only-feature/240881/11 "2020-07-13T04:14:30Z")

</div>

So really what is really the point of the source only snapshot then, since i can only backup the mapping. And like what you said we cant reindex an empty index.

Also i will do some more testing with this and try to identify the problems.

---

<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 13, 2020, 4:17am UTC](https://discuss.elastic.co/t/snapshot-and-restore-source-only-feature/240881/12 "2020-07-13T04:17:53Z")

</div>

Ah ok, so you are talking about [source only snapshots](https://www.elastic.co/guide/en/elasticsearch/reference/6.8/modules-snapshots.html#_source_only_repository). That explains things then.

> A source repository enables you to create minimal, source-only snapshots that take up to 50% less space on disk. **Source only snapshots contain stored fields and index metadata**. They do not include index or doc values structures and are not searchable when restored. After restoring a source-only snapshot, you must [reindex](https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-reindex.html) the data into a new index.

I bolded the appropriate part that explains how that process works.

---

<div class="post-metadata">

### Author: ![lusynda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lusynda/32/53557_2.png) [@lusynda](https://discuss.elastic.co/u/lusynda)
#### Post date: [July 13, 2020, 4:30am UTC](https://discuss.elastic.co/t/snapshot-and-restore-source-only-feature/240881/13 "2020-07-13T04:30:05Z")

</div>

Yes that is the part that i read from the doc. So according to that text if i reindex those indices then i can get the data back right.

---

<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 13, 2020, 4:30am UTC](https://discuss.elastic.co/t/snapshot-and-restore-source-only-feature/240881/14 "2020-07-13T04:30:47Z")

</div>

Yes.

---

<div class="post-metadata">

### Author: ![lusynda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lusynda/32/53557_2.png) [@lusynda](https://discuss.elastic.co/u/lusynda)
#### Post date: [July 13, 2020, 4:34am UTC](https://discuss.elastic.co/t/snapshot-and-restore-source-only-feature/240881/15 "2020-07-13T04:34:19Z")

</div>

So if i have an index that have 100 doc in them, take the snapshot data that i got then move them to another cluster, then i restore them and reindex them. Will i get back full 100 doc with all the normal function like search and aggregate ability from elastic with full information?

---

<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 13, 2020, 4:38am UTC](https://discuss.elastic.co/t/snapshot-and-restore-source-only-feature/240881/16 "2020-07-13T04:38:55Z")

</div>

It would depend on your actual reindex, but that's the idea, yes.

---

<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 10, 2020, 4:38am UTC](https://discuss.elastic.co/t/snapshot-and-restore-source-only-feature/240881/17 "2020-08-10T04:38:59Z")

</div>

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