> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mixpeek.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Storage, tiering and backups

> Move collections to cold or frozen storage, tier idle data automatically, snapshot and restore a namespace, and keep outputs in your own bucket.

Control what your stored data costs and how you get it back: move a rarely queried collection to cold storage, freeze one so it cannot change, let idle collections tier down on their own, and snapshot a namespace so you can restore it beside the source, in place, or to a point in time.

## Prerequisites

* An API key with `write` permission on the namespace.
* An Enterprise plan, for snapshots and restore.

## Move a collection between storage states

A collection's `lifecycle_state` decides where its vectors live and whether it accepts writes.

| State | Vector search | Writes | Storage |
| - | - | - | - |
| `active` (default) | From the vector store | Accepted | Vector store |
| `cold` | From object storage, slower | Accepted | Vectors backed up to object storage, then evicted from the vector store |
| `frozen` | From the vector store | Refused with `409` | Unchanged |
| `archived` | Excluded | None | Vectors deleted permanently; document metadata remains |

**1. Check the current state**

```bash cURL title="Get lifecycle status" theme={null}
curl "https://api.mixpeek.com/v1/collections/$COLLECTION_ID/lifecycle" \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" \
  -H "X-Namespace: $NAMESPACE_ID"
```

The response gives the state and the document counts in the vector store and in the object-storage backup, so you can confirm a transition finished.

**2. Transition it**

```bash cURL theme={null}
curl -X PATCH "https://api.mixpeek.com/v1/collections/$COLLECTION_ID/lifecycle" \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" \
  -H "X-Namespace: $NAMESPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{"lifecycle_state": "cold"}'
```

```python Python theme={null}
import os, requests

resp = requests.patch(
    f"https://api.mixpeek.com/v1/collections/{os.environ['COLLECTION_ID']}/lifecycle",
    headers={
        "Authorization": f"Bearer {os.environ['MIXPEEK_API_KEY']}",
        "X-Namespace": os.environ["NAMESPACE_ID"],
    },
    json={"lifecycle_state": "cold"},
)
print(resp.json())
```

```javascript JavaScript theme={null}
const resp = await fetch(
  `https://api.mixpeek.com/v1/collections/${process.env.COLLECTION_ID}/lifecycle`,
  {
    method: "PATCH",
    headers: {
      Authorization: `Bearer ${process.env.MIXPEEK_API_KEY}`,
      "X-Namespace": process.env.NAMESPACE_ID,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ lifecycle_state: "cold" }),
  },
);
console.log(await resp.json());
```

Transitions that move data run in the background. Send `"async_transition": false` to wait until it finishes.

| From | Allowed to |
| - | - |
| `active` | `cold`, `frozen`, `archived` |
| `cold` | `active`, `archived` |
| `frozen` | `active`, `archived` |
| `archived` | None |

Going from `cold` back to `active` restores vectors from the backup with no re-extraction. `frozen` cannot go straight to `cold`; move it to `active` first. A retriever over an archived collection skips it with a warning, and fails with `400` if every collection it searches is archived.

Use `cold` for finished campaigns you query rarely, `frozen` for a pinned evaluation set or labelled release, and `archived` only when metadata alone is enough. `archived` cannot be undone; rebuilding means re-processing the source objects.

## Tier idle collections automatically

Tiering is off by default for collections. Turn it on for a collection or a whole namespace with a `tiering` object; a daily pass then moves each `active` collection idle for `idle_days.cold` days (90 by default) to `cold`.

```bash cURL title="Demote a collection after 30 idle days" theme={null}
curl -X PATCH "https://api.mixpeek.com/v1/collections/$COLLECTION_ID" \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" \
  -H "X-Namespace: $NAMESPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{"tiering": {"enabled": true, "idle_days": {"cold": 30}}}'
```

| Field | What it does |
| - | - |
| `enabled` | On or off at this level. Unset inherits from the namespace, then the platform default |
| `idle_days.cold` | Days without use before cold, at least 1 |
| `idle_days.frozen` | Days before the deeper storage tier, more than `cold`. Unrelated to the `frozen` lifecycle state; tiering never makes a collection read-only |
| `exempt` | A reason, such as `"legal hold, matter 2026-014"`. The scope is never demoted. An empty reason is refused |

A collection counts as used when a query returns it, a document is read, a batch writes to it, or it is created or transitioned. A metadata change does not count. On a namespace, `"tiering": {}` clears the override. The older collection field `tiering_rules` is read-only; writes that set it are refused.

## Snapshot and restore a namespace

A snapshot captures a namespace's configuration, documents, vectors and a manifest of its bucket objects.

**1. Take a snapshot**

```bash cURL title="Snapshot with object copies" theme={null}
curl -X POST "https://api.mixpeek.com/v1/namespaces/$NAMESPACE_ID/snapshots" \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"copy_s3_objects": true}'
```

| Field | Default | Effect |
| - | - | - |
| `copy_s3_objects` | `false` | Copies bucket objects into the snapshot so a restore does not depend on them. Without it, a restore reads objects from the bucket |
| `include_vectors` | `true` | `false` takes a metadata-only snapshot, which is not a backup of your data |

The snapshot runs in the background. `GET /v1/namespaces/{namespace}/snapshots/{snapshot_id}` reports `status`: `pending`, `in_progress`, `completed`, `partial`, `failed` or `expired`. `completed` and `partial` snapshots can be restored. A snapshot expires 30 days after creation (`expires_at`). A namespace's snapshots are stored with it and are deleted when the namespace is deleted, so restore into a new namespace (`target_namespace_name`) before you delete the original.

**2. Verify it can restore**

```bash cURL title="Deep verify" theme={null}
curl "https://api.mixpeek.com/v1/namespaces/$NAMESPACE_ID/snapshots/$SNAPSHOT_ID/verify?deep=true" \
  -H "Authorization: Bearer $MIXPEEK_API_KEY"
```

Verify changes nothing. It lists what a restore would drop, such as a missing collection dump, unreachable vectors or objects that are gone. `deep=true` opens every collection dump. After a restore, verify also returns that restore's report.

**3. Restore beside the source**

```bash cURL theme={null}
curl -X POST "https://api.mixpeek.com/v1/namespaces/$NAMESPACE_ID/snapshots/$SNAPSHOT_ID/restore" \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"target_namespace_name": "video-search-restored"}'
```

```python Python theme={null}
task = requests.post(
    f"https://api.mixpeek.com/v1/namespaces/{os.environ['NAMESPACE_ID']}/snapshots/{os.environ['SNAPSHOT_ID']}/restore",
    headers={"Authorization": f"Bearer {os.environ['MIXPEEK_API_KEY']}"},
    json={"target_namespace_name": "video-search-restored"},
).json()
print(task["task_id"])
```

```javascript JavaScript theme={null}
const task = await (
  await fetch(
    `https://api.mixpeek.com/v1/namespaces/${process.env.NAMESPACE_ID}/snapshots/${process.env.SNAPSHOT_ID}/restore`,
    {
      method: "POST",
      headers: {
        Authorization: `Bearer ${process.env.MIXPEEK_API_KEY}`,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({ target_namespace_name: "video-search-restored" }),
    },
  )
).json();
console.log(task.task_id);
```

Poll `GET /v1/tasks/{task_id}` until it completes. The restored namespace gets new ids and the source is untouched. Tasks, retriever executions and interactions stay with the source.

### Other restore modes

| Mode | Body | Behavior |
| - | - | - |
| Point in time | `target_namespace_name` plus `restore_point` (RFC 3339) | Replays the write-ahead log from a snapshot taken at or before the instant. Reaches back 7 days at most; configuration history keeps 31 days |
| Isolated | `target_namespace_name` plus `"isolated": true` | Restores onto a temporary vector shard of its own, for checking or measuring a restore. Stops after 6 hours; one at a time |
| In place | `"confirm_in_place": true`, no target | Deletes the current data and replaces it. The namespace is read-only until the restore finishes; writes get `409` |

To switch over with no read-only window, restore beside the source and point your traffic at the new namespace.

> [accordion] List, download and automatic snapshots
>
> | Operation | Call |
> | - | - |
> | List, newest first | `POST /v1/namespaces/{namespace}/snapshots/list` with `skip` and `limit` (default 20, max 100) |
> | Download | `GET /v1/namespaces/{namespace}/snapshots/{snapshot_id}?download=true`: a signed URL and sha256 per artifact, valid 1 hour |
> | Delete | `DELETE /v1/namespaces/{namespace}/snapshots/{snapshot_id}` |
>
> `snapshot_type` is `manual` for yours, `daily` for the snapshot Mixpeek takes of each Enterprise namespace every day (an unchanged namespace shares the last export, named in `shares_export_of`), and `pre_delete` for the one taken before an Enterprise namespace is deleted. Snapshots are deleted with their namespace, so restore into a new namespace before deleting one you want to keep.

> [accordion] Point-in-time restore errors
>
> | Error | Meaning |
> | - | - |
> | `restore_point_beyond_retention` | The instant is more than 7 days back. The error names the oldest usable instant |
> | `restore_point_seq_unsupported` | A WAL sequence number was sent; pass an instant instead |
> | `below_config_window` | The instant is before the configuration history starts |
> | `config_history_gap` | A configuration change was not recorded. Instants after the next snapshot restore |

## Keep source files restorable

Mixpeek reads objects in your own storage by reference. A snapshot records which version of each object it saw, so a restore can point back at that version only if your bucket keeps it. Turn on object versioning and keep noncurrent versions at least as long as your snapshots (30 days): S3 `NoncurrentVersionExpiration`, GCS `daysSinceNoncurrentTime`, or an Azure lifecycle policy on previous versions. The cost is your overwrite volume times the retention. Alternatively, snapshot with `copy_s3_objects: true`.

## Write outputs to your own bucket

A bucket can name a `destination`: `destination.connection_id` is a [storage connection](https://docs.mixpeek.com/docs/ingest/object-storage.md) you own, with `write_enabled: true`, and `destination.prefix` is where outputs go. Extraction outputs and derived assets (segments, thumbnails, transcodes) are then written under your prefix with their lineage as object metadata, and Mixpeek keeps no copy. This works on every deployment.

```bash cURL title="Enable writes, then bind the destination" theme={null}
curl -X PATCH "https://api.mixpeek.com/v1/organizations/connections/$CONNECTION_ID" \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"write_enabled": true}'

curl -X PATCH "https://api.mixpeek.com/v1/buckets/$BUCKET_ID" \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" \
  -H "X-Namespace: $NAMESPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{"destination": {"connection_id": "'"$CONNECTION_ID"'", "prefix": "mixpeek-outputs/"}}'
```

The connection's credentials must also allow writes (`s3:PutObject`, or GCS `storage.objects.create`). A connection without `write_enabled` is refused by name. A bucket's `storage_class` (`standard`, `nearline`, `coldline`, `archive`) sets the storage tier for objects a sync writes.

## Storage format and your own object store

Each namespace is stored as a `.mvs` dataset: a documented tree of objects under one key prefix, with every object written once and listed with its size and an xxh3-64 digest. Vectors are stored as RaBitQ codes with float16 copies for reranking. Warm and cold tiers use the same layout at different storage classes, so moving data rewrites nothing. The v2 specification and `msf-read`, a standalone reader and validator, are open source under Apache-2.0 at [github.com/mixpeek/mvs-format](https://github.com/mixpeek/mvs-format). Writes go only through the Mixpeek API.

The same repository has a Python package that reads a namespace in place, at one commit, with no export:

```python theme={null}
import mvs

con = mvs.duckdb("gs://your-bucket/mvs", "ns_...")   # every collection is a DuckDB view
con.sql("SELECT brand, count(*) FROM products GROUP BY 1")
```

It also reads into pandas, Polars, PyArrow, Spark, Ray, PyTorch, Hugging Face datasets and DataFusion, serves a collection to LangChain as a vector store, and generates LookML for Looker. The list, and the check behind each one, is on the [integrations page](https://github.com/mixpeek/mvs-format/blob/main/docs/integrations.md). How MVS compares with Lance, Parquet, Iceberg and Vortex is in [docs/compare](https://github.com/mixpeek/mvs-format/blob/main/docs/compare/README.md).

On dedicated and self-hosted deployments, the vector store can keep its write-ahead log, snapshots and cold tier in your own S3-compatible or GCS bucket. This is a deployment setting, not a per-namespace one.

> [accordion] Deployment variables for your own object store
>
> | Variable | Default | Notes |
> | - | - | - |
> | `MVS_OBJECT_STORE_PROVIDER` | `gcs` | `s3`, `gcs`, `r2`, `tigris`, `wasabi`, `b2`, `minio`, `spaces`, `ceph` or `localstack` |
> | `MVS_BUCKET` | None | The bucket for all vector-store data. The API, coordinator and shard must name the same bucket |
> | `MVS_OBJECT_STORE_ENDPOINT` | None | Required for R2, Tigris and Wasabi |
> | `MVS_REGION`, `MVS_PREFIX` | None, `mvs/` | |
> | `MVS_ENCRYPTION_KEY` | None | Base64 32-byte key. Encrypts every object with AES-256-GCM, bound to its path; existing objects stay readable |
>
> On the shard, set `MVS_STORE_BACKEND` to `s3` or `gcs` explicitly, or with the Helm chart set `mvs.objectStore` (`backend`, `bucket`, `endpoint`, `region`, `secretRef`). A shard with `MVS_STORE_BACKEND` unset starts with an empty index and persists nothing. Credentials come from the environment: the AWS credential chain or an IAM role for S3-compatible stores, Application Default Credentials for GCS. Path-style addressing is applied for B2, MinIO, Ceph and LocalStack. See [Deployment options](https://docs.mixpeek.com/docs/production/deployment.md).

## What goes wrong

| Symptom | Cause and fix |
| - | - |
| `409` on a write | The collection is `frozen`, or an in-place restore is running |
| Transition from `frozen` to `cold` refused | Move it to `active` first |
| Retriever warns about a skipped collection | The collection is `archived`. Its vectors are gone; re-process to rebuild |
| Restored documents point at changed files | Bucket versioning was off. Turn it on, or snapshot with `copy_s3_objects` |
| Restore refused | In place without `confirm_in_place`, or a point in time without `target_namespace_name` |
| Snapshot calls refused | Snapshots need an Enterprise plan |

## Related

* [Namespaces and branches](https://docs.mixpeek.com/docs/manage/namespaces.md): clones, holds and budgets
* [Bring your own vectors](https://docs.mixpeek.com/docs/manage/vector-store.md): documents, deletes and cascades
* [Collections and features](https://docs.mixpeek.com/docs/extract/collections.md)
* [Lifecycle API](https://docs.mixpeek.com/docs/api-reference/collection-lifecycle/transition-lifecycle.md), [Snapshot API](https://docs.mixpeek.com/docs/api-reference/namespace-snapshots/create-namespace-snapshot.md) and [Restore API](https://docs.mixpeek.com/docs/api-reference/namespace-snapshots/restore-from-snapshot.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.