[pbs-devel] [PATCH proxmox-backup 1/7] finish_backup: mark backup as finished only after checks have passed
Stefan Reiter
s.reiter at proxmox.com
Tue Aug 4 12:41:59 CEST 2020
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 at proxmox.com>
---
src/api2/backup/environment.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/api2/backup/environment.rs b/src/api2/backup/environment.rs
index 02aa0c40..bc780d20 100644
--- a/src/api2/backup/environment.rs
+++ b/src/api2/backup/environment.rs
@@ -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(())
}
--
2.20.1
More information about the pbs-devel
mailing list