GetRestoreSnapshotState()

Retrieves the state and progress of a restore-snapshot job.

pub async fn get_restore_snapshot_state(&self, request: GetRestoreSnapshotStateRequest) -> Result<GetRestoreSnapshotStateResponse>

Request Syntax

let request = GetRestoreSnapshotStateRequest::builder()
    .job_id(job_id)
    .build()?;

REQUEST FIELDS:

  • job_id: i64

    Identifier of the restore job, as returned by RestoreSnapshot. Must be greater than zero.

RETURNS:

Result

GetRestoreSnapshotStateResponse exposes job_info() returning a RestoreSnapshotJobInfo with the job id, snapshot and collection names, RestoreSnapshotStateCode state, progress percentage, failure reason, start time, and time cost. Returns an Error on failure.

Example

let request = GetRestoreSnapshotStateRequest::builder()
    .job_id(job_id)
    .build()?;
let resp = client.get_restore_snapshot_state(request).await?;
println!("state: {:?}, progress: {}", resp.job_info().get_state(), resp.job_info().get_progress());

Try Managed Milvus for Free

Zilliz Cloud is hassle-free, powered by Milvus and 10x faster.

Get Started
Feedback

Was this page helpful?