Skip to main content

backup

Function backup 

Source
pub async fn backup(config: &Config, dir: &Path) -> Result<BackupSummary>
Expand description

Writes a backup of the configured database and vault into dir.

Every vault object is checked against its name while it is copied, and every file content the database refers to must be in the vault: a corrupt or missing object refuses the backup. A failed backup removes what it wrote (the directory, if it created it), so nothing is left that looks like a backup; the manifest is written last and renamed into place.