Documentation Index
Fetch the complete documentation index at: https://hexxladb.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Files on disk
HexxlaDB creates two files:- Primary database — path passed to
Open(e.g.,/var/lib/app/data.db) - Write-ahead log —
{primary}-wal(same directory)
Open replays pending WAL records into the primary.
Backup strategies
Preferred: Close and copy
Close the database so files are consistent, then copy both primary and WAL:Filesystem snapshots
Snapshot the volume containing both files at the same logical point in time. This is safe for hot backups. Warning: Copying only the primary without the WAL (or mixing files from different times) can yield corruption or lost data.Live copy
Live copy without application cooperation is not documented as safe. Use application-level export if you need hot backup.Restore procedures
From backup
- Stop the application
- Restore both primary and WAL files from the same backup instant
- Start the application
- Verify with read probes (
GetCell,StatsMVCC)
After crash
HexxlaDB automatically recovers from crash onOpen by replaying the WAL. No manual intervention needed unless files are corrupted.
Compaction
The engine uses an extend-only page allocator: deleted or pruned records reclaim logical space inside the B+ tree, but the primary file length does not shrink automatically. Expect monotonic file growth under churn until you compact.Compact to new file
Standalone compaction
Stripping old MVCC versions
Compact copies tombstones and old versions verbatim. To reclaim that space, prune first:
Compaction notes
- Destination inherits format version, MVCC flag,
MaxValueBytes, and encryption from source - Encryption credentials must be supplied via
optsfor encrypted sources - Context cancellation removes partial destination on abort
- Destination does not carry over the source changelog file
Backup drill
Closethe database (or stop the sole writer)- Copy primary and
{primary}-waltogether from the same instant - Restore on a staging host,
Open, run read probes (GetCell,StatsMVCC)
Crash recovery drill
- Kill the embedding process during an active
Update(SIGKILL) Openthe same path; verify WAL replay succeeds andViewreads match expectations- If
ErrCorruptDatabase: restore from last known-good primary + WAL pair
See also
- Encryption — At-rest encryption
- Retention — MVCC retention and pruning
- Changelog — Logical changefeed for audit trails