3

Is there a way to copy an aws opensearch manual snapshot to a different s3 bucket and restore it to a different cluster?

I have tf deployment that installs aws opensearch cluster with manual snapshots pointing to s3 configured. These work and i can restore to the same cluster that the snapshot was taken. However I cant find a solution to restore to a different cluster. Do you have to share the original s3 bucket or is it possible to copy the files to a new s3 (which would be ideal!)

When i do a copy of the snapshots from source to destination and then run a restore i get an error:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "security_exception",
        "reason" : "no permissions for [] and User [name=admin, backend_roles=[], requestedTenant=]"
      }
    ],
    "type" : "security_exception",
    "reason" : "no permissions for [] and User [name=admin, backend_roles=[], requestedTenant=]"
  },
  "status" : 403
}

This is based on:

1: run the below on the source cluster and find the last snapshot

GET /_snapshot/snapshot_repo/_all

2: copy the snapshot files from source cluster s3 to destination cluster s3

3: run a restore of the snapshot in the destination cluster

POST _snapshot/snapshot_repo/snapshot-2022-11-15-11-01-59/_restore

note: when i run a get snapshots i do not get the list of copied snapshots (which i was hoping i would!).

Any ideas of solution?

Staggerlee011
  • 847
  • 2
  • 13
  • 23

0 Answers0