--- title: "Back up a collection with Qdrant snapshots" description: "Create, list, download, restore and delete a snapshot of one collection on one node of a Qdrant vector database with the Qdrant API." content_type: "how-to" product: "vector-database" platform: "TIR" url: "/tir/vector-database/how-to/back-up-a-collection-with-qdrant-snapshots/" topic: ["snapshots"] --- # Back up a collection with Qdrant snapshots Qdrant can take a snapshot of one collection on one node. These snapshots are stored on that node's disk, separate from the snapshots in the **Snapshot** tab. Use them when you need to download a collection. ## Before you begin You need a **Running** database, its **Endpoint URL**, and its **API Key**; see [Connect to a vector database](/tir/vector-database/how-to/connect-to-a-vector-database/). Each call goes to one node and one collection, so repeat it for every node. Nodes are numbered from 0 to the node count minus 1. Add `node-` to the address, where `` is the node's number. `` is the **Endpoint URL**, `` is your API key, and `` is the collection. ## Create a snapshot ```python from qdrant_client import QdrantClient client = QdrantClient( host="", port=6333, prefix="node-", api_key="" ) client.create_snapshot(collection_name="") ``` With cURL: ```bash curl -X POST \ -H "api-key: " \ https://:6333/node-/collections//snapshots ``` ## List snapshots ```python client.list_snapshots(collection_name="") ``` ```bash curl -X GET \ -H "api-key: " \ https://:6333/node-/collections//snapshots ``` ## Download a snapshot file `` is a name from the list. ```bash curl -X GET \ -H "api-key: " \ https://:6333/node-/collections//snapshots/ ``` ## Restore a snapshot `` is where the snapshot file is. ```python client.recover_snapshot( "", "" ) ``` ```bash curl -X PUT \ -H "api-key: " \ -d '{ "location": "" }' \ https://:6333/node-/collections//snapshots/recover ``` To restore from a file on your computer, upload it. `` is the snapshot file. ```bash curl -X POST \ 'https://:6333/node-/collections//snapshots/upload?priority=snapshot' \ -H 'api-key: ' \ -H 'Content-Type: multipart/form-data' \ -F 'snapshot=@/path/to/.snapshot' ``` A restore takes a priority that decides which data wins when both exist. Pass one of these as the `priority` value of the upload address: ```text replica (default) Keeps existing data over snapshot data. snapshot Keeps snapshot data over existing data. no_sync Restores without any extra synchronization. ``` ## Delete a snapshot ```python client.delete_snapshot( collection_name="", snapshot_name="" ) ``` ```bash curl -X DELETE \ -H "api-key: " \ https://:6333/node-/collections//snapshots/ ``` ## What to do next For a backup of the whole database in one step, [take a snapshot](/tir/vector-database/how-to/take-a-snapshot/) in the portal. For help, see [Troubleshooting Vector Database](/tir/vector-database/troubleshooting/vector-database/).