After restoring a vector store from a week-old snapshot, which deletions and permission revocations come back, and how do you re-apply them before serving?
answer
- a snapshot forgets later removals
- erasures, takedowns and revoked access
- a journal kept outside the store
- replay before opening traffic
- prove it with deleted IDs
basics
~20 sEvery chunk deleted and every permission revoked after the snapshot comes back, along with stale versions of updated documents. Keep an ordered journal of changes outside the store, replay it from the snapshot time with traffic closed, verify, then serve.
solid answer
~50 sA snapshot is the store's state at one moment, so anything removed after that moment is back: chunks of documents deleted at their source, chunks removed for an erasure request or a takedown, and access lists as they stood a week ago, so users who lost access can retrieve those chunks again. Updated documents revert to old versions too, which is stale but not a leak. So I keep the restored store closed to traffic and replay, in order, a durable journal of writes, deletes and permission changes kept outside the vector store, starting slightly before the snapshot time. Then I check that a sample of journaled deletes returns nothing and only then open traffic. With no journal, I diff the restored chunk IDs and access lists against the systems of record and delete or fix whatever differs.
code
pseudocode · 11 linesstore = restore_snapshot(snapshot) # restored instance takes no queries yet
start = journal.position_at(snapshot.taken_at - margin)
for entry in journal.read(from = start): # strictly in sequence order
if entry.op == "upsert":
store.upsert(entry.chunk_id, stored_vectors.get(entry.chunk_id), entry.access_list)
else if entry.op == "delete":
store.delete(entry.chunk_id) # no-op when already absent
else if entry.op == "set_access":
store.set_access(entry.chunk_id, entry.access_list)
assert store.find_any(journal.sample_deleted_ids(from = start)) == none
open_traffic(store)go deeper
Remember that a restore undoes deletions as well as losing new writes: anything removed after the snapshot is searchable again until it is removed once more.
Explain why access lists copied onto chunks also roll back, why that is a leak rather than staleness, and why replay must happen before traffic.
Describe the journal outside the store, ordered idempotent replay from before the snapshot time, a verification sample of deleted IDs, and the fallback when no journal exists.
Treat every restore as a compliance event: set journal retention against snapshot retention, and agree with data-protection owners how long backups may hold erased data.
## What a restore brings back A **snapshot** records the store as it was at one moment. Restoring it does not just lose the week since; it actively **undoes** every change made in that week. For additions that means missing data. For removals it means data that should be gone is searchable again. | Change made after the snapshot | What the restore does | Risk | |---|---|---| | Document deleted at its source | Its chunks return | Answers cite content that no longer exists | | Chunks removed for an erasure request | Personal data is searchable again | A broken privacy commitment | | Takedown of harmful or wrong content | The content returns | The original incident repeats | | Access revoked on a document | The chunks' copied access lists revert | Users read what they may no longer see | | Access granted | The grant disappears | Users miss content they should see | | Document updated | The old version returns | Stale answers | | Document added | It is missing | Gaps | The first four rows are why a restore is a **security and compliance** event, not only an availability one. A vector store usually holds a copy of each chunk's access list as metadata so it can filter at query time; a restore rolls that copy back too, even though the source system's permissions are current. ## The change journal The reliable fix is a **durable, ordered journal** of every change, kept outside the vector store so the same loss cannot take it: - One entry per write, delete and access change, each with a sequence number, a timestamp and the chunk or document ID. - Written before, or atomically with, the store write, so a change the store accepted is never missing from the journal. - **Idempotent** to apply: deleting an absent ID is a no-op, and re-applying a write leaves the same state. - Retained for longer than the oldest snapshot you might restore. Deletes and access changes are the entries that must land before serving; writes can catch up a little later because a missing document is a gap, not a leak, as long as a catch-up write never re-adds a chunk the journal later deletes. The journal also answers the auditor's question after an incident: it is the record that every erasure, takedown and revocation made since the snapshot was applied again, with the time it landed. Without it, a team can only assert that the restored store is clean; with it, the replay and its verification sample are evidence. ## Restore order 1. Restore the snapshot into an instance that **accepts no query traffic**. 2. Find the journal position for the snapshot time, minus a safety margin; replaying a few already-applied entries is harmless because they are idempotent and in order. 3. Replay every entry from there in sequence order, so a delete followed by a re-add of the same document ends with the document present, and the reverse ends with it gone. 4. **Verify:** look up a sample of IDs deleted during the week and confirm none is returned; check access lists on a sample of revoked documents. 5. Only then open traffic. ## Without a journal If no journal exists, reconstruct the removals from the systems of record: - Diff the restored chunk IDs against the current set derived from the sources, and delete every chunk whose source document no longer exists. - Re-sync access lists for every restored chunk from the source systems' current permissions. - Ask whoever handles erasure requests and takedowns for every request dated after the snapshot, and re-apply each one. This is slower and leakier than a journal, because index-only removals (a takedown applied only to the index) leave no trace in the sources. ## What the restore does not settle - The snapshot file itself still holds the deleted data until it ages out of retention; how long backups may keep data subject to an erasure request is a policy question for whoever owns data protection. - A restored store may also keep deleted vectors on disk until compaction even after the replay; when a delete stops being searchable is a separate subject from the restore. - Which other systems an erasure must reach beyond the vector store is a separate question too.
- Why replay one ordered journal instead of applying all deletes first and writes afterwards?Because order decides the final state. If a document was deleted and then re-added, deletes-first followed by writes gets it right, but if it was added and then deleted, writes-afterwards brings it back. Replaying writes, deletes and access changes in sequence order makes every interleaving end correctly.
- The restored store must be back within minutes. Can you open traffic and replay deletes in the background?Not for deletes and revocations: until they land, erased or forbidden chunks can be retrieved and shown. Replay those first, usually quick because they are a small part of the journal, then open and catch up writes in order, skipping any write whose chunk the journal later deletes or revokes. If even that is too slow, serve a degraded fallback.
Restoring a week-old phone backup brings back every contact you deleted that week and unblocks every number you blocked; until you delete and block them again, they can reach you.
- A restore only loses recent writes; it cannot bring anything back.
- Permissions live in the source, so a restore cannot change who sees a chunk.
- Open traffic first and replay the deletes in the background.
- Re-applying deletes is optional when the snapshot is only a week old.
- A delete journal can live inside the vector store it protects.