# Restore snapshot

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

SDK: `@zilliz/milvus2-sdk-node@3.0.10` · Tested with Milvus 3.0.6

Canonical documentation: https://milvus-io.github.io/milvus-sdk-node/rest-api/snapshots/restore/

## Section links

- [cURL command](https://milvus-io.github.io/milvus-sdk-node/rest-api/snapshots/restore/#curl-command)
- [Default request](https://milvus-io.github.io/milvus-sdk-node/rest-api/snapshots/restore/#default-request)
- [Sample response](https://milvus-io.github.io/milvus-sdk-node/rest-api/snapshots/restore/#sample-response)
- [Request fields](https://milvus-io.github.io/milvus-sdk-node/rest-api/snapshots/restore/#request-fields)

`POST /v2/vectordb/snapshots/restore`

Replace `https://your-cluster.example.com` with your Milvus endpoint. Set `MILVUS_TOKEN` for authentication or omit the Authorization header on an unauthenticated cluster.

## cURL command

```bash
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"
}'
```

## Default request

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

## Sample response

```json
{
  "code": 0,
  "data": {
    "jobId": 123456789
  }
}
```

## 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`](https://milvus-io.github.io/milvus-sdk-node/api-reference/http-client/#restoresnapshot) for the Node.js SDK method.
