Skip to main content

unpack_database

Function unpack_database 

Source
pub fn unpack_database(
    archive: &Path,
    dir: &Path,
    options: &UnpackOptions,
) -> Result<RestoreResult, DatabaseError>
Expand description

Unpacks an archive made by pack_database into dir, replacing the database that is there, with the recoverable procedure of super::restore_database (stage, verify, swap, roll back).

The archive is judged before anything is written: size and entry-count limits, names (no .., absolute or drive paths, backslashes, control characters, device names, duplicates ignoring case), no symbolic links, no compressed or encrypted entries, declared sizes against the limits and against what each entry really holds. Entries the manifest does not list — the caller’s extras — are not extracted.