Data protection and durability
A shard is a full embedded engine running in-process against a local file, so FluxDB's durability story starts where the engine's does and then adds the distributed layers around it: replication, protection policy, backup, and restore. This page is the under-the-covers view of each, and it is deliberate about marking what is shipped and what is a backend without a consumer wired to it.
For where these files physically live and the two-plane split they sit in, read storage and performance first. This page is about protecting what lives on those planes.
Durability inside a shard
The transactional core is SQLite in WAL mode, and the durability properties are the ones SQLite is most heavily exercised for, taken deliberately rather than by default. See how the engines are tuned for the full pragma set; the ones that decide durability are these:
| Setting | Durability consequence |
|---|---|
| WAL journal mode | A write lands in the write-ahead log before the database file is updated, so a crash recovers to the last committed transaction rather than a torn page |
NORMAL synchronous | The durability-throughput point paired with WAL: committed transactions survive an application crash, and a full checkpoint survives an OS crash |
| A journal size limit | Caps WAL growth so a write burst cannot grow the log without returning the space |
A transaction rests on a pinned-connection invariant, so a unit of work is genuinely one connection's commit or rollback rather than a best effort across several. That is the per-shard floor every access method inherits, because a document write, a graph edge, a vector upsert and a row all commit through the same engine.
An optional durable write journal
Beyond the engine's own WAL, FluxDB can keep a durable per-shard logical write journal: a table in the shard's own SQLite file that records every captured write, ordered by log sequence number, in the same transaction as the data mutation. Because it rides the data write's existing commit, there is no second store to tear against the data and no extra sync on the write path. A consumer can re-read the stream since a given sequence number, which is what an archiver, a point-in-time replay, or an anti-entropy repair would drain.
The write journal is a deploy-time opt-in, and a deployment that leaves it off writes nothing extra and pays a single boolean check on the write path. It is the backend a fine-grained replay would need; the point-in-time section below is exact about what consumes it and what does not.
Encryption at rest
This is the claim most often over-stated, so it is worth stating the true posture flatly. FluxDB carries two real encryption mechanisms, and whole-file encryption of the live shard is not one of them.
| Mechanism | What it covers | Where it applies |
|---|---|---|
| Column-level sealing | The values of columns an operator marks sensitive, sealed with AES-256-GCM | Live shard files, on both the transactional and analytical engines |
| Object-plane encryption | Flushed Parquet and the shard-file backups written to object storage | The object plane, where it can be made mandatory |
Column-level sealing derives a per-column key through a key hierarchy: a node-scoped key-encryption key, to a per-workspace key, to a deterministic per-column data-encryption key, so a sealed value differs across workspaces and an attacker cannot move ciphertext between rows. Sealing and opening are engine functions registered on every shard connection, and each refuses any call without a server-minted, expiring grant for that workspace, column and operation, so user SQL sharing the connection cannot open a value it has no grant for. A column is sealed only once an operator marks it sensitive; a column that is never marked stays in the clear in the shard file.
A live .sqlite or .duckdb shard file is not encrypted as a whole file at
rest. There is no page-level or file-level cipher on the shard path. What is
protected inside that file is the set of columns explicitly sealed; everything
else is stored as the engine stores it.
Protection for the bulk file at rest comes from two places instead: the object plane, which encrypts the flushed Parquet and the shard backups it holds and can be set to refuse a plaintext write rather than warn and proceed; and whatever full-disk or volume encryption the host provides underneath the local path. Whole-file encryption of the live local shard is not a FluxDB-provided mechanism, so treat it as owed rather than assumed when a requirement names it.
The consequence is specific: a column marked sensitive is sealed everywhere it comes to rest, including inside a backup copied to the object store, while an unmarked column depends on the object plane and the host disk for its at-rest protection once it leaves memory.
Replication and protection policy
Durability across machines is governed by a data protection policy, which coordinates three layers in one object rather than leaving them as separate knobs:
| Layer | What it sets |
|---|---|
| Shard replication | The number of full shard copies placed across cells (1 means no mirroring) |
| Block protection | How blocks are stored within a cell, from mirroring to Reed-Solomon erasure coding |
| Per-tier override | A different replication mode per storage tier, so hot tiers mirror for latency while cold and archive tiers erasure-code for efficiency |
Four presets cover the common profiles, and each declares the minimum cell count it requires, so a policy a deployment cannot satisfy refuses rather than silently running under-protected:
| Preset | Shard copies | Synchronous writes | Default read consistency |
|---|---|---|---|
| Standard | 2 | No | Session |
| High durability | 3 | Yes | Strong |
| Cost optimized | 1 | No | Eventual |
| Development | 1 | No | Strong |
Synchronous writes are the durability-latency decision inside a policy: when set, a write waits for replica acknowledgment before returning, so an acknowledged write is on more than one cell; when unset, replication is fire-and-forget off the hot path.
WAL and snapshot shipping
A primary ships its write-ahead log to its standbys. The shipper supports an asynchronous mode (fire-and-forget) and a synchronous mode that holds the write until a quorum of standbys acknowledges, and a quorum that cannot be met raises rather than reporting a durable write that is not. When protection rebuild adds a brand-new replica, the placement metadata converges before the new cell holds any data, so a snapshot shipper exports the whole shard and ships it to the new cell, which imports it and is usable immediately rather than waiting for the next anti-entropy cycle to backfill it row by row.
Backup and restore
The backup model follows directly from a shard being a full engine against a file: a backup is the shard file, and a restore is a file rather than a replay.
A per-shard backup worker uses SQLite's own online backup to take a consistent
snapshot while writes continue, optionally compresses it, and uploads it into
the owning database's object-store namespace under backups/{shard_id}/. An
orchestrator sits above the per-shard workers and turns this into a
database-level operation: it backs up every shard, aggregates per-shard
results into one record, and reports the overall state as completed, failed, or
partially completed when some shards succeed and others do not, so a partial
result is a first-class outcome rather than a hidden one.
A restore reverses it shard by shard from a chosen backup record, counting shards restored and failed, and succeeding only when every shard that had a completed backup is restored. Because the unit is a file, a restore does not replay a log forward; it puts the engine's file back.
Point-in-time restore, stated exactly
Point-in-time restore is the second claim most likely to be over-stated, so here is precisely what exists.
| Capability | Granularity | Status |
|---|---|---|
| Database restore to a target time | Snaps to the nearest backup at or before the target | Shipped, backup-granularity |
| Lakehouse table time-travel | A specific committed table snapshot or version | Shipped, on the flushed columnar tier through Iceberg |
| Native continuous replay to an arbitrary instant | Any committed write | Owed: the backend exists, a consumer does not |
Database restore to a target time selects the most recent completed backup at or before the requested timestamp and restores that. It is real, and it is backup-granularity: the recovery point is the last backup before the target, not an arbitrary instant, so its resolution is the backup interval.
Table time-travel is a property of the lakehouse, not the transactional shard. A flushed table in open Iceberg format can be read as of a specific snapshot or version, and restored to an earlier one, because the columnar tier keeps its commit history. So table-level point-in-time reads exist, and they exist through Iceberg time-travel on the lakehouse, at snapshot granularity.
There is no native path that replays the transactional log forward to an arbitrary committed instant on a shard. The durable write journal described above is the backend such a path would drain, but it is off by default, its re-read cursor is keyed by log sequence number rather than by wall-clock time, and no archiver or replay driver consumes it. Fine-grained, native point-in-time restore is therefore owed, not shipped. What a deployment has is backup-granularity database restore and Iceberg snapshot time-travel on the flushed tables, and a claim that names continuous replay should say so.
Across the deployment matrix
- Single cell. Per-shard WAL durability and file backups to the cell's own object store work with nothing else installed. Replication presets that require more than one cell refuse rather than run under-protected.
- Multi-cell. Shard copies place across cells by topology, WAL ships to standbys, and block protection erasure-codes across them per the policy's per-tier overrides.
- Sovereign and air-gapped. Every mechanism on this page is local to the estate. Backups, replication and object-plane encryption need no external service.
- Cloud-enabled. External object storage can back the backup and flush namespaces where a deployment prefers it, as an option rather than a requirement.
Related
- Storage and performance, the two planes these protections sit on and the storage internals beneath them.
- Scale-out and elasticity, the distributed transactions, failover and resiliency this rests on.
- Execution cores and access methods, the WAL mode and pragma tuning behind per-shard durability.
- Object storage, the encrypted, erasure-coded plane that holds flushes and backups.
- Replication, DR and federation, the replication scopes and disaster-recovery posture across cells.