Dev Tools reindex command

I set up OS test env, version 2.9.0
Using Dev Tools, I want to reindex my log (send logs from one OS version to another) from the main OS env, version 2.14.0 to my test env, version 2.9.0

POST _reindex
{
  "source": {
    "remote": {
      "host": "https://opensearch.dev:443",
         "username": "xx",
         "password": "xx"
      },
    "index": "mylog-2024.07.22"
  },
  "dest": {
    "index": "mylog-2024.07.22"
  }
}

Received an error:

{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "Browser client is out of date, please refresh the page (\"osd-version\" header was \"2.9.0\" but should be \"2.14.0\")",
  "attributes": {
    "expected": "2.14.0",
    "got": "2.9.0"
  }
}

Is there any possibility to bypass this error? Since I want to downgrade my main cluster to version 2.9.0 as it doesn’t have those bugs that bother me.

@StanisLav Have you tried using curl command instead of Dev Tools?

Hey.
Sorry for my late reply.

I haven’t tried it yet. Do you have an example of how I can perform such a request?

@StanisLav Try this.

curl -X POST "https://localhost:9200/_reindex" -H "Content-Type: application/json" -u "your-username:your-password" -d '
{
  "source": {
    "remote": {
      "host": "https://opensearch.dev:443",
      "username": "xx",
      "password": "xx"
    },
    "index": "mylog-2024.07.22"
  },
  "dest": {
    "index": "mylog-2024.07.22"
  }
}'
1 Like