Snapshot restore -- How to check how long the restore took?

I was able to restore a snapshot recently.
Is there a way for Elastic / Kibana to show how long the restore took (Full time)? There does not appear to be a definitive way.

I seemed to find two ways to find this data:

  1. Use this URL path for an api call
    https://<host>/search/_snapshot/<snapshot repository>/<specific Snapshot>/_status? pretty
    
    I see this data in the payload. Its not clear what snapshot[1].stats.time_in_millis is ? Is this the total time it took the restore to run? If so its not accurate:
    {
      "snapshots": [
        {
          "snapshot": <snapshot name>,
          "repository": <snapshot repository>,
          "uuid": "dBCFEdE_RwCf9kg1234567",
          "state": "SUCCESS",
          "include_global_state": true,
          "shards_stats": {
            "initializing": 0,
            "started": 0,
            "finalizing": 0,
            "done": 551,
            "failed": 0,
            "total": 551
          },
          "stats": {
            "incremental": {
              "file_count": 587,
              "size_in_bytes": 92046051
            },
            "total": {
              "file_count": 10662,
              "size_in_bytes": 483829905011
            },
            "start_time_in_millis": 1727123399856,
            "time_in_millis": 4602
          },
    
  2. If I go into Kibana. I can go to Hamburger Menu > Stack Management > Snapshot and Restore > Restore Status from here I can see all the indexes that were restored. There does not appear to be a place I can check how long all of the restore took. But I can surmise how long it took by sorting the Last activity column. Then I can go to the first page and last page to determine how long it took.

Are these the only two ways? I really don't want to have to use Kibana to look up this info. Mainly because our snapshots back up ALL indexes (*), which means I cannot run Kibana while I do the restore, I have to turn it off.

I need a way to check if the restore completed and how long it took from the API. Is there a way to check this?

Hi @Dave_Houser

Have you tried it?

Thanks for the reply. Is there a specific part of this guide you are referring for me to try? Because my post details how I am checking the status of a specific snapshot with the API. It does give a bunch of stats but does not detail how long the snapshot took to restore. Can you be more specific what I should be looking at in the guide?

I don't know much here, but does not the restored indices go into open state at end of successful restore? And is that not logged in the elasticsearch log itself (which seems to be pretty verbose in general)

@DavidTurner , @Christian_Dahlqvist
Can you please have a look !!

Hi @Dave_Houser did you found any resolution/fix for your queries ?
I have similar issue, but in my research I did not found any fix for me.
If you can share your fix, that will help me!!

@DavidTurner need your inputs here..

This is a community forum manned by volunteers. It is considered quite rude to just ping people not already involved in the thread.

It is generally recommended that you open your own new topic rather than just add to an existing one as your sitation may not be exactly what was described and you may be using a different version. In order to enhance the chance of someone being able to help you, please provide as much details as possible.

2 Likes