---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://mixpeek.com/.well-known/search?q={query}"
  method: GET
  documentation: "https://mixpeek.com/llms.txt"
---

[Back to MVS](/mvs)

# Migrate to MVS in one script

Copy-pastable Python scripts to move every vector from your current database to MVS. Pick your source, run the script, done.

[Get started: 1M vectors](https://studio.mixpeek.com/namespaces/create?mode=standalone&utm_source=homepage&utm_medium=migrations_page&utm_campaign=mvs_onramp) [Scripts on GitHub](https://github.com/mixpeek/mvs-migrate)

Reading first? [MVS docs](https://mixpeek.com/docs/vector-store/overview)

## Choose your source database

Each script handles pagination, metadata mapping, and batch upserts. Install `pip install mixpeek` plus the source SDK, then run.

PineconeQdrantWeaviateMilvus / ZillizElasticsearchChromaDBpgvectorLanceDBTurbopuffer

migrate\_pinecone\_to\_mvs.py [Source on GitHub](https://github.com/mixpeek/mvs-migrate)

"""Migrate from Pinecone to MVS."""
from pinecone import Pinecone
from mixpeek import Mixpeek

# ── Connect to both ──────────────────────────────────────
pc = Pinecone(api\_key="PINECONE\_API\_KEY")
index = pc.Index("my-index")

mvs = Mixpeek(api\_key="MIXPEEK\_API\_KEY")
NAMESPACE = "ns\_migrated"

# ── Paginate through all vectors ─────────────────────────
batch, cursor = \[\], None
while True:
    resp = index.list(namespace="", limit=100, pagination\_token=cursor)
    ids = resp.get("vectors", resp.get("ids", \[\]))
    if not ids:
        break

    # Fetch full vectors + metadata
    fetched = index.fetch(ids=\[v if isinstance(v, str) else v\["id"\] for v in ids\])
    docs = \[\]
    for vid, vec in fetched\["vectors"\].items():
        docs.append({
            "id": vid,
            "dense\_embedding": vec\["values"\],
            "metadata": vec.get("metadata", {}),
        })

    # Upsert to MVS in batches
    mvs.namespaces.documents.upsert(
        namespace=NAMESPACE,
        documents=docs,
    )
    print(f"Migrated {len(docs)} vectors")

    cursor = resp.get("pagination", {}).get("next")
    if not cursor:
        break

print("Migration complete.")

### Prerequisites

1\. Install the Mixpeek SDK

`pip install mixpeek`

2\. Get your API key

Sign up at [studio.mixpeek.com](https://studio.mixpeek.com/namespaces/create?mode=standalone&utm_source=homepage&utm_medium=migrations_prereq&utm_campaign=mvs_onramp) : Build starts at $25/mo for up to 1M vectors.

3\. Install the source SDK

`pip install pinecone`

4\. Run the script

`python migrate_pinecone_to_mvs.py`

## Why teams migrate to MVS

### 50x cheaper at scale

Vectors live on object storage instead of RAM, at $1.56 per million vectors a month plus $0.08/GB.

### Zero vendor lock-in

BYO embeddings, BYO object storage. Your data stays in your cloud account.

### Upgrade when ready

Start standalone, flip a switch to get extraction, indexing, and pipeline orchestration.

[Get started: 1M vectors](https://studio.mixpeek.com/namespaces/create?mode=standalone&utm_source=homepage&utm_medium=migrations_bottom&utm_campaign=mvs_onramp)