api: tape/restore: skip snapshot if owner check failed

instead of aborting the whole restore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2022-05-09 12:41:19 +02:00 committed by Thomas Lamprecht
parent c94d2867c1
commit 8915c1e74a
1 changed files with 3 additions and 1 deletions

View File

@ -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)) =