Export/Import Saved objects

Hi all.
I have 2 elastic installed. one is 7.7 and the second one is 7.8.
Trying to export/import saved objects and specifically Visualizations but I got errors as per below when I do export

Your file is downloading in the background. Some related objects could not be found. Please see the last line in the exported file for a list of missing objects.

Do you know why?

Hello @alfredo.deluca

It sounds like you have visualizations with references to saved objects that no longer exist. Perhaps if you post the last line of that export I can help you resolve the missing references.

Thanks,
Matt

Thanks Matt.

I was looking into the json file and at the end I found the following

{"attributes":{"description":"Filebeat Icinga module dashboard for the main log files","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{"query":{"language":"kuery","query":""},"version":true,"filter":,"highlightAll":true}"},"optionsJSON":"{"darkTheme": false}","panelsJSON":"[{"panelIndex":"1","panelRefName":"panel_0","version":"7.3.0","gridData":{"x":24,"y":0,"w":24,"h":12,"i":"1"},"embeddableConfig":{}},{"panelIndex":"2","panelRefName":"panel_1","version":"7.3.0","gridData":{"x":0,"y":12,"w":48,"h":100,"i":"2"},"embeddableConfig":{"columns":["icinga.main.facility","log.level","message"],"sort":["@timestamp","desc"]}},{"panelIndex":"3","panelRefName":"panel_2","version":"7.3.0","gridData":{"x":0,"y":0,"w":24,"h":12,"i":"3"},"embeddableConfig":{}}]","timeRestore":false,"title":"[Filebeat Icinga] Main Log ECS","version":1},"id":"f693d260-2417-11e7-a83b-d5f4cebac9ff-ecs","migrationVersion":{"dashboard":"7.3.0"},"references":[{"id":"d8e5dc40-2417-11e7-a83b-d5f4cebac9ff-ecs","name":"panel_0","type":"visualization"},{"id":"ffaf5a30-2413-11e7-a0d9-39604d45ca7f-ecs","name":"panel_1","type":"search"},{"id":"2cf77780-2418-11e7-a83b-d5f4cebac9ff-ecs","name":"panel_2","type":"visualization"}],"type":"dashboard","updated_at":"2020-11-16T09:18:30.348Z","version":"WzIxOCwxXQ=="}
{"exportedCount":465,"missingRefCount":1,"missingReferences":[{"id":"674c44c0-1a8b-11eb-90aa-4f76e942edde","type":"visualization"}]}

Then I searched for that Id and it's in the file .....so should I remove that line then the json will be fine to be imported?

Thanks Matt

Alfredo

Are you certain that its in the file as a saved object definition?

I suspect you could ignore the error and replace the visualization as needed in dashboards where its used.

--Matt

Hi Matt.
yes the reference ID (674c44c0-1a8b-11eb-90aa-4f76e942edde) is in the same file as shown below:

{"attributes":{"description":"","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{"query":{"language":"kuery","query":""},"filter":}"},"optionsJSON":"{"hidePanelTitles":false,"useMargins":true}","panelsJSON":"[{"version":"7.4.2","gridData":{"h":12,"i":"fb6bbeaf-4cd1-4f80-ad1c-60a1d4a7323c","w":19,"x":0,"y":0},"panelIndex":"fb6bbeaf-4cd1-4f80-ad1c-60a1d4a7323c","embeddableConfig":{"vis":{"defaultColors":{"0 - 50":"rgb(0,104,55)","50 - 75":"rgb(255,255,190)","75 - 100":"rgb(165,0,38)"},"legendOpen":true},"defaultColors":{"0 - 50":"rgb(0,104,55)","50 - 75":"rgb(255,255,190)","75 - 100":"rgb(165,0,38)"},"legendOpen":false},"panelRefName":"panel_0"}]","timeRestore":false,"title":"Dashboard 1","version":1},"id":"1cff5050-1a8c-11eb-90aa-4f76e942edde","migrationVersion":{"dashboard":"7.3.0"},"references":[{"id":"674c44c0-1a8b-11eb-90aa-4f76e942edde","name":"panel_0","type":"visualization"}],"type":"dashboard","updated_at":"2020-11-18T14:44:35.274Z","version":"WzEwMjAsMV0="}

But if I ignored it I might not be able to import it in another instance.

Cheers