Vector Backup and Recovery
Servers fail, people delete the wrong collection, and software updates go wrong. A backup plan decides whether those events cost minutes or months. Vector data needs special care because rebuilding millions of embeddings takes time and money.
Replication Is Not Backup
Replication copies every change to a second server instantly. A mistaken deletion copies too, and both servers lose the data. A backup preserves a separate snapshot from an earlier moment in time.
REPLICATION BACKUP
Primary ---copy---> Replica Primary ---snapshot---> Storage
Delete mistake? Delete mistake?
Both lose data Restore yesterday's snapshot
Replication protects against hardware failure.
Backup protects against human error and corruption.
Two Numbers That Guide Your Plan
| Term | Meaning | Example |
|---|---|---|
| Recovery Point Objective (RPO) | The most data you accept losing, measured in time | Up to 1 hour of new vectors |
| Recovery Time Objective (RTO) | The longest outage you accept | Back online within 2 hours |
A short RPO requires frequent backups. A short RTO requires fast restore tools and a rehearsed process.
What to Back Up
- Vectors and metadata: The core collection data.
- Collection settings: Dimension size, distance metric, and index parameters.
- Source documents: The original text, images, and files used to create embeddings.
- Pipeline code: The chunking and embedding scripts, including the model name and version.
- Access configuration: Roles and keys, stored in a secure secret manager.
Backup Methods
Snapshots
Most vector databases offer a snapshot command that captures a collection at a single point in time. Snapshots restore quickly because they include the built index.
Exports
An export writes vectors and metadata to portable files. Exports travel between database products and survive upgrades, though restoring requires rebuilding the index.
Rebuild From Source
Regeneration from original documents works when you keep the source files and the embedding pipeline. This method costs the most time and embedding fees, so treat it as the last line of defense.
A Practical Schedule
BACKUP SCHEDULE EXAMPLE
Hourly incremental snapshot keep 24
Daily full snapshot keep 14
Weekly full export to cold storage keep 8
Monthly restore test (see below)
Follow the 3-2-1 Rule
- Keep 3 copies of your data.
- Store them on 2 different types of storage.
- Place 1 copy in a different location or region.
Test Your Restores
A backup that fails to restore has no value. Schedule a restore drill every month.
RESTORE DRILL
1. Create a temporary test environment.
2. Restore the latest snapshot into it.
3. Run your standard test questions.
4. Compare recall and result counts with production.
5. Record how long the restore took.
6. Delete the test environment.
Track Embedding Versions
Store the embedding model name and version beside each collection. A restored collection built with Model A needs queries embedded by Model A. Mixed versions produce meaningless matches.
Protect the Backups
- Encrypt backups at rest and in transit.
- Limit access to a small group of people.
- Follow data retention rules, including deletion requests from users.
- Store backup credentials separately from production credentials.
Backup planning feels dull until the day it matters. Set clear RPO and RTO goals, automate snapshots, keep source data safe, and practice the restore.
