finish_backup: mark backup as finished only after checks have passed

Commit 9fa55e09 "finish_backup: test/verify manifest at server side"
moved the finished-marking above some checks, which means if those fail
the backup would still be marked as successful on the server.

Revert that part and comment the line for the future.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
This commit is contained in:
Stefan Reiter 2020-08-04 12:41:59 +02:00 committed by Dietmar Maurer
parent 2f57a433b1
commit d74edc3d89

View File

@ -477,8 +477,6 @@ impl BackupEnvironment {
bail!("backup does not contain valid files (file count == 0)");
}
state.finished = true;
// check manifest
let mut manifest = self.datastore.load_manifest_json(&self.backup_dir)
.map_err(|err| format_err!("unable to load manifest blob - {}", err))?;
@ -500,6 +498,8 @@ impl BackupEnvironment {
}
}
// marks the backup as successful
state.finished = true;
Ok(())
}