# Is export/import of Saved Objects broken?

**URL:** https://discuss.elastic.co/t/is-export-import-of-saved-objects-broken/100958
**Category:** Kibana
**Created:** [September 19, 2017, 5:33am UTC](https://discuss.elastic.co/t/is-export-import-of-saved-objects-broken/100958 "2017-09-19T05:33:00Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Nikhil\_Utane](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikhil_utane/32/27547_2.png) [@Nikhil\_Utane](https://discuss.elastic.co/u/Nikhil_Utane)
#### Post date: [September 19, 2017, 5:33am UTC](https://discuss.elastic.co/t/is-export-import-of-saved-objects-broken/100958/1 "2017-09-19T05:33:01Z")

</div>

Hi,  
I have Saved Searches, Visualizations, Dashboards created on older Elastic + Kibana version 5.5.0.  
I have brought up another setup with latest version 5.6.0.  
I want to export all the Saved Objects from 5.5.0 to 5.6.0.  
I thought this will be a trivial step to just export it on older setup and import on the new one, but its turning out to be anything but that.  
So here it goes:  
From 5.5.0 to 5.6.0:

1. Looks like in 5.5.0 the index pattern was saved as is whereas in 5.6.0 the associated index pattern ID is being saved.
2. So when I try to import any Saved object, I get an error that index pattern ID not found and click to recreate it.
3. If I try to recreate it, it fails as it is not able to find the index pattern ID.

Next I wanted to see export/import on same kibana versions.  
From 5.6.0 to 5.6.0:

1. Here I have seen such varying observations, that I am totally confused. Yesterday when I exported a query, I saw index pattern ID in the index field name,

> ```
> "kibanaSavedObjectMeta": {
> "searchSourceJSON": "{\"index\":\"AV6D_KbeoINw6SffgU8f\",
> 
> ```

And today when I exported new but similar query, I see the index (which is an alias) name

> ```
> "kibanaSavedObjectMeta": {
> "searchSourceJSON": "{\"index\":\"debug-indices-alias\",
> 
> ```

When i try to import this in another kibana running 5.6.0, it failed as the index alias was already present there (it should not have failed, I am only importing a query).  
Anyways to move forward, I deleted the index pattern and tried to import again. It again gave the index pattern ID not found so I re-create the index pattern with the same name. It seemed to succeed but I don't see the query being imported.  
Just to add, one or two times in this whole attempt, I was able to get the query imported but I don't really remember with which combination and what precise steps.

So my question is, am I doing anything wrong in exporting/importing Saved Objects or are there issues in this functionality that others have also faced?

-Thanks  
Nikhil

---

<div class="post-metadata">

### Author: ![Nikhil\_Utane](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikhil_utane/32/27547_2.png) [@Nikhil\_Utane](https://discuss.elastic.co/u/Nikhil_Utane)
#### Post date: [September 19, 2017, 9:13am UTC](https://discuss.elastic.co/t/is-export-import-of-saved-objects-broken/100958/2 "2017-09-19T09:13:47Z")

</div>

So after quite a bit of struggle I finally managed to import my Saved searches, Visualizations and Dashboards.  
However there seems to be some issue esp. when you are using index aliases. Few suggestions I can give from my experience is to delete the index pattern, try the operation multiple times if it fails and also wait for some time after any operation.

-Nikhil

---

<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: [September 19, 2017, 9:30am UTC](https://discuss.elastic.co/t/is-export-import-of-saved-objects-broken/100958/3 "2017-09-19T09:30:44Z")

</div>

Looks like you ran into [https://github.com/elastic/kibana/issues/13359](https://github.com/elastic/kibana/issues/13359)

---

<div class="post-metadata">

### Author: ![Nikhil\_Utane](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikhil_utane/32/27547_2.png) [@Nikhil\_Utane](https://discuss.elastic.co/u/Nikhil_Utane)
#### Post date: [September 19, 2017, 10:58am UTC](https://discuss.elastic.co/t/is-export-import-of-saved-objects-broken/100958/4 "2017-09-19T10:58:52Z")

</div>

Thanks Mark. Yes, that's what it looks like.  
Couple of questions I had though:

1. Why did I get different pattern IDs (alias name vs auto generated ID) when I exported the same object twice?
2. How to view the auto-generated pattern ID? I couldn't find any way for this. If I could then i would have edited the json to use that instead.

-Thanks  
Nikhil

---

<div class="post-metadata">

### Author: ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)
#### Post date: [September 19, 2017, 9:24pm UTC](https://discuss.elastic.co/t/is-export-import-of-saved-objects-broken/100958/5 "2017-09-19T21:24:08Z")

</div>

Export/Import is not meant to be used as a backup/restore or for upgrades. There is quite a bit of data stored in the Kibana index which is not included in the exports. One of these happens to be index patterns.

1.) Since the exports don't include index patterns, you would have had to create a new index pattern in 5.6 which would have used an auto-generated ID. This now does not match your export. You can either update the export and replaces the instances of the other ID, or you can create the index pattern and set the ID to the pattern previously used (click advanced options on the index pattern creation page).

2.) Mangement \> Index Patterns, then select the index pattern. The URL should contain the index-pattern ID.

---

<div class="post-metadata">

### Author: ![Nikhil\_Utane](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikhil_utane/32/27547_2.png) [@Nikhil\_Utane](https://discuss.elastic.co/u/Nikhil_Utane)
#### Post date: [September 20, 2017, 4:27am UTC](https://discuss.elastic.co/t/is-export-import-of-saved-objects-broken/100958/6 "2017-09-20T04:27:46Z")

</div>

> [@tsmalley](#):
>
> ports don

Thanks. I wish I had known this before. Perhaps we can display the auto-generated index pattern ID somewhere on the page itself.

-Regards  
Nikhil

---

<div class="post-metadata">

### Author: ![Nikhil\_Utane](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikhil_utane/32/27547_2.png) [@Nikhil\_Utane](https://discuss.elastic.co/u/Nikhil_Utane)
#### Post date: [September 20, 2017, 4:29am UTC](https://discuss.elastic.co/t/is-export-import-of-saved-objects-broken/100958/7 "2017-09-20T04:29:18Z")

</div>

Just one last question. If I bring up another setup and want to move all my saved objects there, what is the best way for that? Thanks.

---

<div class="post-metadata">

### Author: ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)
#### Post date: [October 10, 2017, 4:46pm UTC](https://discuss.elastic.co/t/is-export-import-of-saved-objects-broken/100958/8 "2017-10-10T16:46:28Z")

</div>

Kibana 5.6.3 has been released which allows for the index pattern to be selected upon import.

---

<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 7, 2017, 4:46pm UTC](https://discuss.elastic.co/t/is-export-import-of-saved-objects-broken/100958/9 "2017-11-07T16:46:41Z")

</div>

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