Snapshot - Restore AWS

Hi!
We need to migrate data from cluster A to cluster B on AWS. I found this mistake when I do restore:
{“error”:{“root_cause”:[{“type”:“security_exception”,“reason”:“Unexpected exception cluster:admin/snapshot/restore”}],“type”:“security_exception”,“reason”:“Unexpected exception cluster:admin/snapshot/restore”},“status”:500}

I’ve granted this role to the user but error persist. The steps to replicate is:
1: create repository with python Creating index snapshots in Amazon OpenSearch Service - Amazon OpenSearch Service
https://vpc-cloud-es-logs-test-cv3dsepi3r3hnvrkwdprwcfydu.eu-west-1.es.amazonaws.com/ -r ‘prueba_final_noenc’

2:Verificate repo: curl -XGET https://vpc-cloud-es-logs-test-cv3dsepi3r3hnvrkwdprwcfydu.eu-west-1.es.amazonaws.com/_snapshot/_all?pretty

  1. create snapshot: curl -XPUT ‘https://vpc-cloud-es-logs-test-cv3dsepi3r3hnvrkwdprwcfydu.eu-west-1.es.amazonaws.com/_snapshot/prueba_final_noenc/snapshot_final_noenc
  2. Verificate snapshot :curl -XGET https://vpc-cloud-es-logs-test-cv3dsepi3r3hnvrkwdprwcfydu.eu-west-1.es.amazonaws.com/_snapshot/prueba_final_noenc/_all?pretty

5: I try restore the snapshot to another cluster:curl -XPOST https://vpc-cloud-es-logs-encrypted-bc46tbw2ikgbyemsf4pxwpjqjq.eu-west-1.es.amazonaws.com/_snapshot/prueba_final_noenc/snapshot_final_noenc/_restore -d ‘{“indices”: “movies”,“ignore_unavailable”: true, “include_global_state”: false}’ -H ‘Content-Type: application/json’ -u xxxx:xxxxx
I found ERROR: {“error”:{“root_cause”:[{“type”:“security_exception”,“reason”:“Unexpected exception cluster:admin/snapshot/restore”}],“type”:“security_exception”,“reason”:“Unexpected exception cluster:admin/snapshot/restore”},“status”:500}

@Nat have you tried doing the restore with admin user with full access? Do you get the same error? Also what version are you using?

Hi Nat, have you found a solution here? Am struggling with the same issue.
Best - Gunnar

@gunnar can you elaborate on your issue, which user is being used, which indices are being restored? What version of odfe are you using?

@Anthony Hi!

  • opendistro 1.12.0
  • user w/ backend_role “admin”
  • one test index: “test-snapshots”

BUT: I found the my mistake: a typo in the parameter “rename_pattern” (or better: I wrote the full index name instead of a regex): “test-snapshots” instead of “test-(.+)”

Of course, the error message I got here is misleading:
{
“error” : {
“root_cause” : [
{
“type” : “security_exception”,
“reason” : “Unexpected exception cluster:admin/snapshot/restore”
}
],
“type” : “security_exception”,
“reason” : “Unexpected exception cluster:admin/snapshot/restore”
},
“status” : 500
}

Ok, Glad it’s resolved then

Yes, resolved. TNX, Anthony for asking!