Skip to content
MilvusNode SDK
Sections

Restore snapshot

Markdown

Copy for agent

Connection and CORS help

Use HTTPS for remote clusters or HTTP on loopback. Requests go directly from your browser to the endpoint. When copying an authenticated cURL command, set MILVUS_TOKEN in your shell.

For cross-origin requests, configure the endpoint to answer OPTIONS and allow the docs origin, POST, Content-Type, and Authorization if you use a token. Try the copied cURL command to troubleshoot outside the browser.

POST/v2/vectordb/snapshots/restore

{
  "sourceCollectionName": "books",
  "targetCollectionName": "books_restored",
  "snapshotName": "books_backup",
  "sourceDbName": "default",
  "targetDbName": "default"
}

Example response

{
  "code": 0,
  "data": {
    "jobId": 123456789
  }
}
cURL command
curl --request POST --url 'https://your-cluster.example.com/v2/vectordb/snapshots/restore' \
  --header 'Content-Type: application/json' \
  --header "Authorization: Bearer ${MILVUS_TOKEN}" \
  --data-raw '{
  "sourceCollectionName": "books",
  "targetCollectionName": "books_restored",
  "snapshotName": "books_backup",
  "sourceDbName": "default",
  "targetDbName": "default"
}'

Start a restore from a named collection snapshot into a target collection.

Request fields

sourceDbName string
Database holding the source snapshot.
sourceCollectionName string (required)
Collection holding the source snapshot.
targetDbName string
Database for the restored collection.
targetCollectionName string (required)
Collection name to use for the restored data.
snapshotName string (required)
Name of the collection snapshot.

See HttpClient.restoreSnapshot for the Node.js SDK method.