# Snapshot questions

**URL:** <https://discuss.elastic.co/t/snapshot-questions/162253>\
**Category:** Elasticsearch\
**Created:** [December 27, 2018, 3:13pm UTC](https://discuss.elastic.co/t/snapshot-questions/162253 "2018-12-27T15:13:55Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ludovic9](https://avatars.discourse-cdn.com/v4/letter/l/977dab/32.png) [@Ludovic9](https://discuss.elastic.co/u/Ludovic9)\
**Post date:** [December 27, 2018, 3:13pm UTC](https://discuss.elastic.co/t/snapshot-questions/162253/1 "2018-12-27T15:13:55Z")

</div>

Hi,  
I would like to implement a snapshot policy but I have a question.

Snapshots are incremental, so the first snapshot contains all datas, then the following contains the difference.  
If I delete the first snapshot, how I can restore the full datas ?

I'm using curator for the snapshots.

Thank you for your answers.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [December 27, 2018, 3:38pm UTC](https://discuss.elastic.co/t/snapshot-questions/162253/2 "2018-12-27T15:38:27Z")

</div>

> [@Ludovic9](#):
>
> If I delete the first snapshot, how I can restore the full datas ?

If you delete a snapshot, but it contains data that is needed for other snapshots, then that data is not deleted. Data is only deleted from the repository once it is not needed for any remaining snapshots.

---

<div class="post-metadata">

**Author:** ![Ludovic9](https://avatars.discourse-cdn.com/v4/letter/l/977dab/32.png) [@Ludovic9](https://discuss.elastic.co/u/Ludovic9)\
**Post date:** [December 31, 2018, 11:15am UTC](https://discuss.elastic.co/t/snapshot-questions/162253/3 "2018-12-31T11:15:13Z")

</div>

Thank you for your reply.

I have another question about restoring in one other cluster.

I have two clusters, one for production, another for test.  
I want to do a snapshot af the production indices, and restore in the test cluster.

On both clusters, I have the same path.repo, is that OK ?  
But the id user and id group are not the same between the clusters environnement, is it OK ?

Or I have to create 2 shared path for the snapshot and copy all files in one path to another path ?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [December 31, 2018, 12:02pm UTC](https://discuss.elastic.co/t/snapshot-questions/162253/4 "2018-12-31T12:02:54Z")

</div>

Yes, it should work to allow your test and production clusters to access the same repository, as long as only one of them has read-write access. If the two clusters run as different users then your production user will need read-write access to the repository and your test user will need read-only access. Also, you should set `"readonly": true` when setting up the repository in your test cluster.

The [docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html) say:

> If you register same snapshot repository with multiple clusters, only one cluster should have write access to the repository. All other clusters connected to that repository should set the repository to `readonly` mode.

---

<div class="post-metadata">

**Author:** ![Ludovic9](https://avatars.discourse-cdn.com/v4/letter/l/977dab/32.png) [@Ludovic9](https://discuss.elastic.co/u/Ludovic9)\
**Post date:** [January 2, 2019, 4:11pm UTC](https://discuss.elastic.co/t/snapshot-questions/162253/5 "2019-01-02T16:11:43Z")

</div>

Thank you David, it works.

I have now the same shared folder on both environnments.  
I have done a snapshot of the .kibana-6 index on production, I can see it in the test environnement.

But when I run a restore action on my test server, I see 2 indices : .kibana in green status and .kibana-6 in yellow status.

the .kibana is from the test server, the .kibana-6 commes from the production server and I have 1 unassigned shard.

How I can do a "perfect" restoration of this indice (the goal is to have the saved searches, dashboard from the production in the test server) ?

And why I have .kibana-6 ? Is it because we have migrate from kibana 5 to kibana 6 8 months ago ?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [January 2, 2019, 4:24pm UTC](https://discuss.elastic.co/t/snapshot-questions/162253/6 "2019-01-02T16:24:12Z")

</div>

> [@Ludovic9](#):
>
> I have 1 unassigned shard.

What does [the cluster allocation explain API](https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html) (`GET _cluster/allocation/explain`) say?

> [@Ludovic9](#):
>
> And why I have .kibana-6 ? Is it because we have migrate from kibana 5 to kibana 6 8 months ago ?

Yes, newer versions of the `.kibana` index have a version number in their names.

---

<div class="post-metadata">

**Author:** ![Ludovic9](https://avatars.discourse-cdn.com/v4/letter/l/977dab/32.png) [@Ludovic9](https://discuss.elastic.co/u/Ludovic9)\
**Post date:** [January 3, 2019, 8:30am UTC](https://discuss.elastic.co/t/snapshot-questions/162253/7 "2019-01-03T08:30:54Z")

</div>

Sorry fot the late answer.  
Now I have no error or warning messages, I have the .kibana index (with 1 document from the test server) and the .kibana-6 index (with 449 documents from the prod server) in green status.  
I was thinking the restore action will erase the indices already present because the .kibana is creating itself when I delete him.

Maybe I have to restore in a blank environnment or I have to rename the .kibana-6 in .kibana when I do the restore action.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [January 3, 2019, 9:06am UTC](https://discuss.elastic.co/t/snapshot-questions/162253/8 "2019-01-03T09:06:50Z")

</div>

> [@Ludovic9](#):
>
> I was thinking the restore action will erase the indices already present

No, a restore will not delete indices that are already present.

---

<div class="post-metadata">

**Author:** ![Ludovic9](https://avatars.discourse-cdn.com/v4/letter/l/977dab/32.png) [@Ludovic9](https://discuss.elastic.co/u/Ludovic9)\
**Post date:** [January 3, 2019, 10:37am UTC](https://discuss.elastic.co/t/snapshot-questions/162253/9 "2019-01-03T10:37:16Z")

</div>

> [@DavidTurner](#):
>
> I was thinking the restore action will erase the indices already present

OK, so what is the best way to save and restore the .kibana index ?  
Because this indice, if I well understood, contains all saved searches, dahsboard etc...

I do a snapshot of this index in production, but when I want to restore it in test environnement, it's not working, I don't see my dashboard, visualisation etc....  
I think it's because in my test environnment, the default name is .kibana and in production, it's .kibana-6.

How I can do ?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [January 3, 2019, 12:05pm UTC](https://discuss.elastic.co/t/snapshot-questions/162253/10 "2019-01-03T12:05:45Z")

</div>

> [@Ludovic9](#):
>
> OK, so what is the best way to save and restore the .kibana index ?

Sorry, I don't know a lot about Kibana so I'd rather not guess how this is normally done. I suggest asking in the [Kibana forum](https://discuss.elastic.co/c/kibana) as there will be better-informed people there.

---

<div class="post-metadata">

**Author:** ![Ludovic9](https://avatars.discourse-cdn.com/v4/letter/l/977dab/32.png) [@Ludovic9](https://discuss.elastic.co/u/Ludovic9)\
**Post date:** [January 3, 2019, 12:43pm UTC](https://discuss.elastic.co/t/snapshot-questions/162253/11 "2019-01-03T12:43:32Z")

</div>

thank you David, your answers helped me a lot !  
I will ask in Kibana forum my questions.

---

<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:** [January 31, 2019, 12:43pm UTC](https://discuss.elastic.co/t/snapshot-questions/162253/12 "2019-01-31T12:43:32Z")

</div>

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