DescribeSnapshot()
This operation retrieves detailed metadata about a specific snapshot, including the source collection, partition names, creation timestamp, and storage location.
func (c *Client) DescribeSnapshot(ctx context.Context, opt DescribeSnapshotOption, callOptions ...grpc.CallOption) (*milvuspb.DescribeSnapshotResponse, error)
Request Syntax
Creates the request for DescribeSnapshot().
option := client.NewDescribeSnapshotOption(snapshotName, collectionName).
WithDbName(dbName string)
result, err := client.DescribeSnapshot(option)
PARAMETERS:
-
name (string) -
[REQUIRED]
The name of the snapshot to describe.
-
collectionName (string) -
[REQUIRED]
The name of the collection the snapshot belongs to.
BUILDER METHODS:
WithDbName(dbName string)
RETURN TYPE:
milvuspb.DescribeSnapshotResponse, error
RETURNS:
A DescribeSnapshotResponse object containing detailed snapshot metadata.
type DescribeSnapshotResponse struct {
Name string
Description string
CollectionName string
CreateTs int64
S3Location string
PartitionNames []string
}
PARAMETERS:
-
result (milvuspb.DescribeSnapshotResponse) -
The DescribeSnapshotResponse object containing detailed snapshot metadata.
ERROR HANDLING:
-
error
The operation fails. Check err != nil for failure details.
Example
Demonstrates DescribeSnapshot() usage.
import (
"log"
"context"
"fmt"
"github.com/milvus-io/milvus/client/v3/milvusclient"
)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
milvusAddr := "YOUR_CLUSTER_ENDPOINT"
cli, err := milvusclient.New(ctx, &milvusclient.ClientConfig{
Address: milvusAddr,
})
if err != nil {
log.Fatal(err)
}
defer cli.Close(ctx)
option := milvusclient.NewDescribeSnapshotOption("backup_20260418", "my_collection")
resp, err := cli.DescribeSnapshot(ctx, option)
if err != nil {
// handle error
}
fmt.Println(resp.GetName())
fmt.Println(resp.GetCollectionName())
fmt.Println(resp.GetPartitionNames())
fmt.Println(resp.GetCreateTs())
fmt.Println(resp.GetS3Location())