Back to Blog
A person connecting an external hard drive to a card reader, representing a versioned backup of a vector index

Vector Database Backup and Restore for RAG Disaster Recovery

10 min read

A vector database backup can restore successfully and still leave a RAG system unsafe to serve. The index may be missing recent documents, contain revoked permissions, use the wrong embedding configuration, or point citations at stale source revisions. A green restore command proves that storage accepted the snapshot. It does not prove that retrieval works. The fix is a recovery contract that covers every store, records the pipeline version, restores into isolation, replays post-snapshot changes, and tests evidence and access before traffic returns.

This guide gives AI, data, and platform engineers a provider-neutral runbook for recovering an internal-document RAG system after deletion, corruption, operator error, or infrastructure loss.

Start with the data recovery boundary

A RAG system rarely lives in one database. Source files may sit in object storage. Parsed document elements may live in another store. The vector database holds chunks and embeddings. A relational database may hold tenants, permissions, ingestion jobs, and document revisions. A queue or event log tracks changes that occurred after the last snapshot.

List each store and label it either authoritative or derived. Authoritative data cannot be recreated from another retained store. Derived data can be rebuilt deterministically when its inputs and pipeline version survive. A vector index is often derived, but only if the team still has the exact source revision, parser output, chunking rules, embedding contract, metadata schema, and access-control mapping used to build it.

Use a recovery inventory like this:

store: vector_index
role: derived
source_of_truth: parsed_document_store
rebuild_contract: rag-index-v17
backup_method: managed_snapshot
recovery_owner: search-platform
maximum_data_loss: 15 minutes
maximum_outage: 2 hours
validation_suite: retrieval-recovery-v8

Do not assume a managed service backs up every dependency. Weaviate documents backup configuration and supported storage backends, while Elasticsearch snapshots can include selected data streams, indices, and cluster state. Product scopes differ. Record exactly what one backup operation includes and what it leaves outside.

Set recovery targets from business impact

Define a recovery point objective, or RPO, as the maximum acceptable data loss. Define a recovery time objective, or RTO, as the maximum acceptable time before the service returns. Avoid choosing both from whatever the provider offers by default.

A policy assistant that changes a few times per week may tolerate a four-hour recovery point. A support assistant indexing active incidents may need fifteen minutes. An index that can be rebuilt in thirty minutes from a canonical parsed store has a different recovery plan from one that takes two days to reprocess scanned archives.

Tie each target to a consequence. If an RPO breach could restore a revoked employee handbook, permission changes need a shorter recovery path than ordinary content additions. If the system supports regulated decisions, reopening with incomplete evidence may be worse than extending the outage.

The practitioner plan in persistence and recovery issue 157 calls for explicit RPO and RTO, automated backups, restore testing, integrity validation, and recovery reporting across transactional, object, and vector stores. Treat it as an author report, not a product guarantee. Its useful lesson is operational: backup completion and service recovery require separate evidence.

Capture a complete recovery manifest

Every backup needs a manifest stored outside the system it protects. The manifest identifies the snapshot and the logical state required to interpret it.

Record these fields:

  • snapshot or backup ID, provider, region, and completion time
  • encryption key reference and restore role
  • collection, namespace, tenant, and shard scope
  • last included document-event offset
  • document and current-revision counts by tenant
  • embedding model, dimensions, and distance metric
  • parser, chunking, metadata, and ACL schema versions
  • application and indexer release versions
  • checksums for configuration and fixture sets
  • retention and deletion deadline

Qdrant documents collection snapshots and full-storage snapshots. Those two scopes serve different failure cases. A collection snapshot may recover one damaged corpus. A full snapshot may help rebuild a node, but it can also restore unrelated collections and operational state. Put the selected scope in the manifest rather than relying on a filename.

Keep credentials out of the manifest. Store references to keys and secret-manager entries. Recovery operators need enough information to obtain approved access without copying reusable secrets into tickets or backup metadata.

Make backups internally consistent

A snapshot taken while ingestion continues can represent different moments across stores. The vector database may contain document revision 42 while the metadata database still records revision 41, or the snapshot may include new chunks before their ACL transaction commits.

Create a logical recovery point. Pause ingestion briefly, or record a durable event-stream high-water mark and require each participating store to checkpoint through it. Write the offset to the manifest. Resume ingestion only after every required snapshot starts from an accepted state.

If a provider offers asynchronous backup creation, monitor it to a terminal state. Pinecone's index backup guide documents a managed backup operation for an index. Your controller should still record the requested scope, completion status, source index configuration, and post-backup verification result. An accepted API request is not a completed recovery point.

Encrypt backups with a recoverable key, restrict restore permission separately from ordinary read permission, and keep at least one copy outside the primary failure domain. A backup that shares the deleted account, unavailable region, or lost key with production is not an independent recovery path.

Choose snapshot restore or deterministic rebuild

Snapshot restore is usually faster for a large, healthy index. Deterministic rebuild is safer when the index itself may be corrupt, its schema is obsolete, or the snapshot is incompatible with the target service version.

Use snapshot restore when all of these conditions hold:

  1. The snapshot completed before the incident and has a verified manifest.
  2. Its format is compatible with the isolated target environment.
  3. The embedding and metadata contracts match the application you will run.
  4. The backup contains the required tenants and namespaces.
  5. Encryption keys and restore credentials are available.

Choose rebuild when source documents and canonical parsed artifacts survive, but no trusted compatible snapshot does. Rebuild into a new physical index. Pin every pipeline component named in the manifest. If you change the parser, chunking strategy, embedding model, or ACL schema during recovery, treat that work as a migration and run broader quality tests. An incident is a bad time to combine restoration with an unplanned retrieval redesign.

Neither path should overwrite the damaged production index. Preserve it for investigation when policy allows, revoke serving access, and create an isolated destination with a new immutable ID.

Restore through an explicit state machine

A durable state machine keeps operators from skipping checks under pressure.

requested -> authorized -> restoring -> restored
restored -> catching_up -> validating -> ready
ready -> active -> closed
any state before active -> failed
active -> rolled_back

Each transition needs evidence. restoring becomes restored only when the provider operation reaches a successful terminal state and the destination contract matches the manifest. catching_up completes only after changes after the recovery offset have been replayed. validating becomes ready only after corpus, permission, retrieval, citation, and capacity gates pass.

Save the operator, timestamp, command or API operation ID, input manifest, output, and reason for every transition. If a step fails, create a typed failure record. Operators should know whether they can retry the same operation, need a fresh destination, or must switch to a rebuild.

Replay changes after the recovery point

A snapshot freezes an earlier state. Recovery is incomplete until additions, edits, deletions, and permission changes after its high-water mark reach the destination.

Consume the durable document event stream from the manifest offset. Use idempotent keys based on tenant, document, revision, and chunk. Apply deletes and ACL changes with the same priority as content additions. Missing a new document lowers recall. Missing a revocation can disclose data.

If no durable change log exists, compare the restored corpus with the current authoritative source. Enumerate current document revisions and ACL versions, then reconcile additions, replacements, and removals. This is slower and makes the real RPO harder to prove, but it is safer than treating the snapshot time as current.

Quarantine records that fail parsing or embedding. Record the source revision, pipeline version, error class, and owner. Do not lower the expected corpus count until it matches the damaged result. A partial recovery needs an explicit business decision, not a changed denominator.

Validate data before retrieval quality

Start with structural checks. Compare current document identities and revisions by tenant, connector, content type, and sensitivity class. Verify the embedding dimensions and metric. Sample chunk checksums and citation coordinates. Confirm that deleted documents and revoked principals return no records.

Then test access control through the same query path the application uses. For each fixture, pair an allowed user with a denied user. A direct database inspection cannot catch an application that forgot to pass the tenant filter after recovery.

Run representative retrieval queries next. The set should include exact identifiers, paraphrases, policy exceptions, recent changes, deleted content, sparse entities, and documents near permission boundaries. Check whether supporting evidence appears in the retrieval budget, whether citations resolve to the expected source revision, and whether forbidden evidence remains absent.

A recovered index need not return byte-for-byte identical scores when infrastructure changed. It must meet the task's acceptance criteria. Keep the generator and prompt fixed while validating retrieval so fluent output cannot hide missing evidence.

Finish with capacity checks. Measure indexing lag, query latency, error rates, storage headroom, and replica health under a bounded load. A correct index that collapses under normal traffic is not ready.

Switch traffic without destroying the fallback

Expose the destination through one logical pointer, such as an application routing record or a database alias. Keep production reads on the old path until the recovered destination reaches ready. If the incident destroyed that path, keep the application unavailable or in a clearly restricted mode rather than serving the unvalidated destination.

Before cutover, require the approved manifest, zero unexplained corpus gaps, successful ACL negatives, passing retrieval fixtures, caught-up event offset, acceptable latency, and a tested reversal command. Switch a small internal cohort first when routing allows. Watch no-result rate, permission denials, citation failures, latency, and indexing lag.

Do not delete the damaged or previous index when traffic moves. Retain a fallback through a defined observation period. A rollback completes only after reads resolve to the fallback and smoke queries prove that it remains usable.

Plan for partial recovery failures

If the snapshot is incompatible, stop and create a clean destination for a deterministic rebuild. Do not repeatedly mutate the same failed restore in place.

If replay stalls on one document, quarantine that revision and continue only when the business owner accepts the resulting coverage gap. High-risk documents may require the whole recovery to stop.

If ACL tests fail, block cutover. Reapplying content filters at the UI is not a substitute for fixing query-time authorization. If retrieval fails while structural checks pass, compare parser, chunking, embedding, metadata, and reranker versions against the manifest one at a time.

If the RTO will be missed, report the revised estimate and the exact blocking stage. Do not reopen early by weakening acceptance criteria without an accountable risk decision.

Run restore drills on a schedule

Backup monitoring answers whether jobs ran. A restore drill answers whether the organization can recover. Schedule drills often enough to catch provider, schema, key, staffing, and runbook drift before an incident does.

Restore a selected backup into an isolated environment with ordinary on-call permissions. Measure time from declaration to a validated ready state. Record the achieved recovery point, total recovery time, manual steps, failed commands, missing access, corpus differences, ACL results, retrieval results, and cleanup confirmation.

Rotate scenarios. Test an accidentally deleted collection, corrupted metadata, lost region, unavailable encryption key, incompatible service version, and missing event-log segment. A tabletop exercise can test escalation, but at least some drills must execute the real restore and query paths.

After each drill, turn every manual correction into a runbook change or automated check. Retest failed stages. The next action is to inventory every store that contributes to one production RAG answer and label each as authoritative or derived. If the team cannot name the rebuild inputs and owner for the vector index, no snapshot schedule can make recovery predictable.

References

  1. Qdrant snapshots documentation supports collection and full-storage snapshot and recovery operations.
  2. Weaviate backups documentation supports configured backup backends, creation, restoration, and operational scope.
  3. Pinecone index backup guide supports managed index backup operations.
  4. Elasticsearch snapshot and restore supports repository snapshots, selected contents, restore operations, and compatibility constraints.
  5. Persistence and recovery issue 157 supplies a practitioner-authored recovery plan covering vector persistence, RPO, RTO, restore tests, and integrity validation.

About Fire In Belly: Independent senior engineering from Tallinn, Estonia. We design and build AI workflow automation, internal tools, and custom software with the backup and restore drills described above, at published fixed prices. Schedule a call to discuss your next project.