Skip to content

feat(storage): consistent database backup via VACUUM INTO - #51

Merged
Patel230 merged 3 commits into
mainfrom
feat/storage-backup
Aug 15, 2026
Merged

feat(storage): consistent database backup via VACUUM INTO#51
Patel230 merged 3 commits into
mainfrom
feat/storage-backup

Conversation

@Patel230

Copy link
Copy Markdown
Contributor

Phase 1 SQLite hardening (5/5). Merges after #50.

  • Store.Backup(ctx, path) snapshots the live database without blocking writers using SQLite's VACUUM INTO (compact, standalone file)
  • Atomic write via temp file + rename; owner-only (0600) permissions
  • Rejected inside transactions; txStore/MockStorage/test mocks updated for the new interface method
  • Tests cover snapshot consistency (restore read-back), permissions, and tx rejection

Merge order: last in the sequence (after HNSW, #50).

- Store.Backup snapshots the live database without blocking writers,
  using SQLite's VACUUM INTO for a compact, standalone backup file
- Atomic write (temp file + rename) with owner-only permissions
- Backup is rejected inside transactions; mocks implement the new
  interface method
- Add tests covering snapshot consistency, permissions, and tx rejection
@Patel230
Patel230 merged commit 6a5fd23 into main Aug 15, 2026
12 checks passed
@Patel230
Patel230 deleted the feat/storage-backup branch August 15, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant