Skip to main content

oxibrain_cli/cmd/
backup.rs

1use std::path::{Path, PathBuf};
2
3pub async fn run_backup(
4    _dir: &Path,
5    _no_projection: bool,
6    _no_cache: bool,
7    _out: Option<PathBuf>,
8) -> anyhow::Result<()> {
9    // The CLI has not been wired through the facade's store-level
10    // `oxibrain_store::backup::online_backup` yet (facade work is post-M0).
11    // The previous raw-file copy skipped the WAL advisory lock and could
12    // produce a torn snapshot, so we fail visibly instead of silently writing
13    // a "backup" that may not be safe to restore.
14    anyhow::bail!(
15        "backup is not wired into the CLI in M0; the WAL-safe store API \
16         oxibrain_store::backup::online_backup is available but CLI \
17         integration is post-M0"
18    );
19}
20
21pub async fn run_restore(_dir: &Path, _backup: PathBuf) -> anyhow::Result<()> {
22    anyhow::bail!("restore is not implemented in M0");
23}