diff --git a/CHANGELOG.md b/CHANGELOG.md index 9dcecd4..ad9840a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ All notable changes to Craqle are documented here. - Full-text search also matches indexed words that start with a query word of at least three characters, so `SAMD` finds `SAMD00012345`. Exact word matches rank above such prefix matches. A very broad prefix keeps the prefix matches that fit the query budget instead of failing. +- `CraqleNode::store_database` returns the graph store's Fjall database for live backups. ### Changed diff --git a/src/lib.rs b/src/lib.rs index 0a50715..af05462 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4699,6 +4699,12 @@ impl CraqleNode { Ok(self.store.persist()?) } + /// The graph store's Fjall database. Its snapshots give a consistent copy of the + /// authoritative graph data while the node keeps running, for example for backups. + pub fn store_database(&self) -> fjall::Database { + self.store.database().clone() + } + /// Apply each replicated compare-and-set under the graph write lock. /// This preserves tombstone, policy, and context ordering across peers. #[cfg(test)]