pub fn dump_database(
data_dir: &Path,
dump_dir: &Path,
storage: &CsafStorage,
pool: &DbPool,
settings: &Settings,
) -> Result<DumpResult>Expand description
Take a consistent snapshot of the live redb + sqlite databases
into dump_dir and emit hash sidecars based on the settings.
§Arguments
data_dir— where the livecsaf.redb/csaf.sqlitefiles live (the samedata_dirconfigured in [csaf-core::config::AppConfig]).dump_dir— target directory. Created if missing.pool— live sqlite pool (used for the backup-API snapshot).settings— read for thesidecar_sha256/sidecar_sha3_512toggles. No other fields are consulted.
§Errors
CsafError::Ioif the target directory can’t be created, or the on-disk redb file can’t be copied.CsafError::Storageif redb refuses to open the source or the freshly-written copy.CsafError::Databaseon any sqlite backup error.