# Restore saved objects from a remote .kibana index

**URL:** <https://discuss.elastic.co/t/restore-saved-objects-from-a-remote-kibana-index/254933>\
**Category:** Kibana\
**Created:** [November 10, 2020, 3:22pm UTC](https://discuss.elastic.co/t/restore-saved-objects-from-a-remote-kibana-index/254933 "2020-11-10T15:22:01Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Angelos](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@Angelos](https://discuss.elastic.co/u/Angelos)\
**Post date:** [November 10, 2020, 3:22pm UTC](https://discuss.elastic.co/t/restore-saved-objects-from-a-remote-kibana-index/254933/1 "2020-11-10T15:22:02Z")

</div>

Hello,

I tried to reindex .kibana\_2(latest) of our production elastic to my local elastic. The problem is that Not all the saved objects have been transferred.

What kind of data .kibana\_2 includes? Shouldn't all saved objects be included in .kibana\_2?

Thank you in advance!

/Angelos

---

<div class="post-metadata">

**Author:** ![rudolf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rudolf/32/51200_2.png) [@rudolf](https://discuss.elastic.co/u/rudolf)\
**Post date:** [November 10, 2020, 5:10pm UTC](https://discuss.elastic.co/t/restore-saved-objects-from-a-remote-kibana-index/254933/2 "2020-11-10T17:10:54Z")

</div>

Hi Angelos,

Everything that's visible under "Saved Objects Management" is stored in the index the `.kibana` alias points to. So if `.kibana` points to `.kibana_3` you should reindex `.kibana_3` and after reindexing point your local `.kibana` to the reindexed index.

For more background see [https://www.elastic.co/guide/en/kibana/current/upgrade-migrations.html#upgrade-migrations-process](https://www.elastic.co/guide/en/kibana/current/upgrade-migrations.html#upgrade-migrations-process)

Note, you can also export all your saved objects from your production cluster as an NDJSON file and import this file locally: [https://www.elastic.co/guide/en/kibana/current/managing-saved-objects.html#managing-saved-objects-export-objects](https://www.elastic.co/guide/en/kibana/current/managing-saved-objects.html#managing-saved-objects-export-objects)

---

<div class="post-metadata">

**Author:** ![Angelos](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@Angelos](https://discuss.elastic.co/u/Angelos)\
**Post date:** [November 11, 2020, 8:08am UTC](https://discuss.elastic.co/t/restore-saved-objects-from-a-remote-kibana-index/254933/3 "2020-11-11T08:08:46Z")

</div>

Hello Rudolf,  
Thank you for you fast response!

> [@rudolf](#):
>
> So if `.kibana` points to `.kibana_3` you should reindex `.kibana_3` and after reindexing point your local `.kibana` to the reindexed index.

I did exactly that, **but I don't have all the saved objects locally.**

> [@rudolf](#):
>
> Note, you can also export all your saved objects from your production cluster as an NDJSON file and import this file locally

I am aware of that but since we have several spaces in production i have to do it for every space.

I should mention as well that after reindex I had 5 failures regarding canvas-workpad-template:

```auto
{
      "index" : ".kibana_16",
      "type" : "_doc",
      "id" : "canvas-workpad-template:workpad-template-11111111-qqqq-wwww-2222-333333333333",
      "cause" : {
        "type" : "illegal_argument_exception",
        "reason" : "mapper [canvas-workpad-template.template.pages.elements.position.left] cannot be changed from type [float] to [long]"
      },
      "status" : 400
    }

```

Could that be the problem and if yes how can I fix it?

/Angelos

---

<div class="post-metadata">

**Author:** ![rudolf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rudolf/32/51200_2.png) [@rudolf](https://discuss.elastic.co/u/rudolf)\
**Post date:** [November 11, 2020, 9:50am UTC](https://discuss.elastic.co/t/restore-saved-objects-from-a-remote-kibana-index/254933/4 "2020-11-11T09:50:55Z")

</div>

Yes, I should have mentioned that, but you will need to set the mappings of your local index so that it matches your remote `.kibana_N` index before you start reindexing.

Kibana's Saved Objects rely on fixed mappings for the `.kibana_N` index, so if you just create a new index and start reindexing the inferred mappings will be incorrect.

---

<div class="post-metadata">

**Author:** ![rudolf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rudolf/32/51200_2.png) [@rudolf](https://discuss.elastic.co/u/rudolf)\
**Post date:** [November 11, 2020, 9:53am UTC](https://discuss.elastic.co/t/restore-saved-objects-from-a-remote-kibana-index/254933/5 "2020-11-11T09:53:45Z")

</div>

Although a remote reindex should work, restoring from a snapshot will be simpler and less error prone, you'll get all the index settings, mappings and aliases from the snapshot instead of having to do this manually.

---

<div class="post-metadata">

**Author:** ![Angelos](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@Angelos](https://discuss.elastic.co/u/Angelos)\
**Post date:** [November 11, 2020, 10:05am UTC](https://discuss.elastic.co/t/restore-saved-objects-from-a-remote-kibana-index/254933/6 "2020-11-11T10:05:35Z")

</div>

Thank you I will try that!

> [@rudolf](#):
>
> Although a remote reindex should work, restoring from a snapshot will be simpler and less error prone, you'll get all the index settings, mappings and aliases from the snapshot instead of having to do this manually.

I tried restoring from snapshot but I had problem with the version since the production is 7.9.2 and I have to use 7.9.1 locally.

---

<div class="post-metadata">

**Author:** ![Angelos](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@Angelos](https://discuss.elastic.co/u/Angelos)\
**Post date:** [November 11, 2020, 10:18am UTC](https://discuss.elastic.co/t/restore-saved-objects-from-a-remote-kibana-index/254933/7 "2020-11-11T10:18:03Z")

</div>

> [@rudolf](#):
>
> Yes, I should have mentioned that, but you will need to set the mappings of **your local index** so that it matches your remote `.kibana_N` index before you start reindexing.

@rudolf So I should copy the mapping of `.kibana_N` and put the mapping in which "local index"?  
`.kibana`?  
Because before reindex I am deleting `.kibana` index from local elastic, shouldn't I?

---

<div class="post-metadata">

**Author:** ![rudolf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rudolf/32/51200_2.png) [@rudolf](https://discuss.elastic.co/u/rudolf)\
**Post date:** [November 11, 2020, 10:27am UTC](https://discuss.elastic.co/t/restore-saved-objects-from-a-remote-kibana-index/254933/8 "2020-11-11T10:27:44Z")

</div>

I didn't test these instructions, but hopefully this will help you get it right. The complete steps would be something like:

1. remote: `GET /.kibana/_mappings`
2. local: `POST /.kibana_1 {"mappings": <mappings from step 1>, "aliases": {".kibana": {}}`
3. local: reindex remote `.kibana` into local `.kibana` (using the aliases instead of concrete index will maybe be a little less error prone so you don't accidentally use the wrong index)

---

<div class="post-metadata">

**Author:** ![Angelos](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@Angelos](https://discuss.elastic.co/u/Angelos)\
**Post date:** [November 11, 2020, 12:00pm UTC](https://discuss.elastic.co/t/restore-saved-objects-from-a-remote-kibana-index/254933/9 "2020-11-11T12:00:33Z")

</div>

@rudolf It worked! Thank you very much!

---

<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:** [December 9, 2020, 12:00pm UTC](https://discuss.elastic.co/t/restore-saved-objects-from-a-remote-kibana-index/254933/10 "2020-12-09T12:00:33Z")

</div>

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