Restore taskId

Currently the restore operation (speaking about backup/restore) is not returning a taskId while the backup operation does.

This makes it currently impossible to track when the restore operation will be finished.

Are there other mechanisms how I could track the state?

I’ve noticed the same (restore doesn’t have a task ID). @aman-bansal @Naman Is this expected?

Yeah, this is expected. Restore operations can be tracked uisng the /health endpoint. So if you see opRestore in the ongoing task list, then restore is in progress. Else, it completed.

[
  {
    "instance": "alpha",
    ...
    "ongoing": [
      "opRestore"
    ],
    "max_assigned": 30001
  }
]
2 Likes

Thank you!

1 Like

Should I see opRestore in /health? I only see the draining message when running a restore.

the server is in draining mode and client requests will only be allowed after exiting the mode by sending a GraphQL draining(enable: false) mutation to /admin

Thanks, @dmai for correcting. Yeah, the alpha goes into draining mode when a restore is in progress. Hence, /health endpoint shows up draining message.

Though we can know the status of restore from the health API provided via /admin endpoint. https://dgraph.io/docs/deploy/dgraph-alpha/#querying-health

Marking this as solution. Thanks again.