Migration from elastic to v1 to v2?

What exactly needs done to migrate from ES 6.8.10 to opensearch v1?

The documentation on this is very confusing, most everyone says to take a snapshot and restore and you are good to go. Thats very much not the case that I see.

If I need to use the re-index api is there no way to do a bunch of indexs at once via wildcard? I have 88 indexes that need re-indexed.

@hcker2000 According to the OpenSearch documentation reindex is only required when migrating from ES 5.x to ES 6.x.

its also required when moving from opensearch v1 to v2 as indexes created in es 6 only work with opensearch v1.

So far the migration process for opensearch/elastic search leaves a ton to be desired.

In my case we determined that the data we collect was easier to just throw away and start fresh rather than dealing with re-indexing.

@hcker2000 I think the first link doesn’t include version 2.x. The below link has an example of migration from 6.8 to 2.x
You’re correct, you’ll need to reindex your indices to version 1.x before migrating to 2.x.

Right so i guess my question is there a built in way to re-index 80+ index’s? Or do i have to use another scripting language to generate all the _reindex api calls?

@hcker2000 I’m not aware of any automated built-in reindex APIs.

Reindex from multiple sources - shell + curl.

for index in $(curl -k "https://localhost:9200/_cat/indices?h=index"); do
  echo "Index = $index"
  echo "Add redindex call"

  curl -k "https://localhost:9200/$index?pretty" \
    -H "Content-Type:application/json"
done