Skip to main content

backup

Function backup 

Source
pub async fn backup(
    source_data_dir: impl AsRef<Path>,
    db: &str,
    destination: impl AsRef<Path>,
) -> Result<BackupReport, BackupError>
Expand description

Copies one offline database into destination.

source_data_dir is a transactor data directory. The transactor must be stopped so the root, metadata, and log form one stable snapshot. Reusing a destination performs an incremental backup and copies only absent blobs.

ยงErrors

Returns an error if the database is missing, the snapshot is inconsistent, or files cannot be read/written.