Skip to main content

restore_backup_to_dir

Function restore_backup_to_dir 

Source
fn restore_backup_to_dir(
    backup: &[u8],
    password: &str,
    data_dir: &Path,
) -> Result<RestoredGuardianConfig>
Expand description

Create a fresh restore staging directory under data_dir and unpack into it.

On success the caller receives a RestoredGuardianConfig whose files are still staged in restore.tmp. On failure the staging directory is removed so a later restore attempt can retry cleanly.