Programmatically backup existing index pattern

I have 2 index patterns that are named exactly the same. One of them must be deleted to reduce confusion. When I get the json of them (through dev tools), I can see slight differences between them. I want to back them up through dev tools or curl, before deleting them.

All of the examples I'm seeing for writing an index pattern through curl does not contain all the fields that I see in the json for the existing index patterns. What am I doing wrong here?

I thought all that field mapping info was needed to be kept, but it's not. To recreate an index pattern you only need the following:
index pattern
id (should have index pattern pasted in here instead of a guid)
timestamp field

This is fine to do within the UI, instead of dev tools or curl.

Make sure to examine the relationships of all saved objects (dashboards/visualizations) to make sure the ID of the referenced index pattern is what you want, otherwise they will need to be migrated to use the correct index pattern.

My problem is solved.

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