Skip to main content

backup

Function backup 

Source
pub async fn backup(
    conn: &Connection,
    output: Option<PathBuf>,
    keep: usize,
) -> Result<PathBuf>
Expand description

Snapshot the live database to output (or a timestamped default in the managed directory) via VACUUM INTO, verify its integrity, and — when using the default location — prune to the newest keep snapshots. Returns the path written. Refuses to overwrite an existing file.