Issue in restoring an Elastic Snapshot

Hello there, I'm having issues restoring an elasticsearch snapshot.
I've tried:

POST _snapshot/snapshot_repo/snap-EIHidJXeQWuHpnGfzR04Uw/_restore
{
"indices": "target_indicies"
}

but I've got:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "snapshot_restore_exception",
        "reason" : "[snapshot_repo:snap-EIHidJXeQWuHpnGfzR04Uw] snapshot does not exist"
      }
    ],
    "type" : "snapshot_restore_exception",
    "reason" : "[snapshot_repo:snap-EIHidJXeQWuHpnGfzR04Uw] snapshot does not exist"
  },
  "status" : 500
}

Yet the .dat file is on my directory.

The snapshot was created with this CURL:
FILE_TM=$(date +%Y%m%d)
curl -X PUT "http://$ELASTIC_URL/snapshot/myproject_repository/snapshot$FILE_TM?wait_for_completion=true"

searching for the snapshot's uuid in the repository bucket, I've found two files
named as such: snap-UUID.dat and meta-UUID.dat
those are the file that I'm trying to restore.

Welcome!

You must use the same snapshot name you used when you created the snaphot. snapshot$FILE_TM.
You can't use the UUID of the snapshot.

You can list your snapshots with:

GET /_cat/snapshots/snapshot_repo?v

Hello David and thank you for the swift reply.

My issue here is that I must run locally an instance that is running as a stateful set on a gke instance that I can't yet access.
I do only have access to the bucket where the snapshots are stored and to the log of the job that runs the snapshot.

Therefore: running

GET /_cat/snapshots/snapshot_repo?v

will not return the snapshot I'm trying to restore.

Is there a way to restore an instance based only to its indexes and snapshots?
Along with the .dat files (meta-UUID.dat and snap-UUID.dat) I do have access to those files:

index.latest
index-1007
indices

But from which machine did you try to run this?

POST _snapshot/snapshot_repo/snap-EIHidJXeQWuHpnGfzR04Uw/_restore
{
   "indices": "target_indicies"
}

My local machine

Solved, I had to import all indexes and snapshot data into a local repository. From there, snapshot started to appear.

I've written a post about this issue. Don't know if it would be useful.

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