Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDs inconsistent when importing on a new system #1

Open
mnp opened this issue Dec 12, 2017 · 2 comments
Open

IDs inconsistent when importing on a new system #1

mnp opened this issue Dec 12, 2017 · 2 comments

Comments

@mnp
Copy link

mnp commented Dec 12, 2017

I came here from elastic/kibana#11632 looking for a way to export from one Kibana and import to another. The import using this tool to an empty (ie, there are no .kibana/saved_objects) elasticsearch runs okay, however it leaves the interlinking IDs inconsistent. Dashboards should point to visualizations, which point to searches, which point to indexes. All of those pointers ought be hooked up in the new elasticsearch. I'm in 5.6.4 for both, if that matters.

Is this understanding about right?

If so I can work on a fix, which might go like this (if also sounding about right?)

  1. post all the saved searches from the loaded objects, recording their old and new IDs
  2. post all the visualizations from the loaded objects, doing the mapping from (1), and recording old and new IDs.
  3. post all the dashboards from the loaded objects, using the mapping from (2)
@mnp
Copy link
Author

mnp commented Dec 14, 2017

Update - I can correct my understanding - since kibana-importer is using &overwrite=true, the ID gap is limited to the imported objects pointing to the defaultIndex, which will probably have a different ID. My updated fix then involves asking kibana for its new defaultIndex ID and only touching the object fields that point to that. I'll do a PR in case it helps someone else.

@ilumos
Copy link

ilumos commented Jan 27, 2018

Thank you for contributing this @mnp - vey helpful. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants