[pbs-devel] [PATCH proxmox-backup 2/2] api: tape/restore: skip snapshot if owner check failed

Dominik Csapak d.csapak at proxmox.com
Mon May 9 12:41:19 CEST 2022


instead of aborting the whole restore

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/api2/tape/restore.rs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/api2/tape/restore.rs b/src/api2/tape/restore.rs
index f24ae23c..a7ed119a 100644
--- a/src/api2/tape/restore.rs
+++ b/src/api2/tape/restore.rs
@@ -433,12 +433,14 @@ fn restore_list_worker(
                 datastore.create_locked_backup_group(backup_dir.as_ref(), restore_owner)?;
             if restore_owner != &owner {
                 // only the owner is allowed to create additional snapshots
-                bail!(
+                task_warn!(
+                    worker,
                     "restore '{}' failed - owner check failed ({} != {})",
                     snapshot,
                     restore_owner,
                     owner
                 );
+                continue;
             }
 
             let (media_id, file_num) = if let Some((media_uuid, file_num)) =
-- 
2.30.2






More information about the pbs-devel mailing list