]> git.proxmox.com Git - proxmox-backup.git/commitdiff
api2: tape: restore: add warning for list restore
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 13 Jul 2021 09:11:25 +0000 (11:11 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 13 Jul 2021 10:02:01 +0000 (12:02 +0200)
if an error occurs, the snapshot dirs will already be created, and we
do not clean them up (some might already be finished).

Warn the user that they are not cleaned up.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/api2/tape/restore.rs

index 68033c4ab142201ea2f367dd6bb50f37bc4d893b..f959a8566544796975b5add17c15cfe02dd1ace2 100644 (file)
@@ -647,6 +647,10 @@ fn restore_list_worker(
         Ok(())
     });
 
+    if res.is_err() {
+        task_warn!(worker, "Error during restore, partially restored snapshots will NOT be cleaned up");
+    }
+
     match std::fs::remove_dir_all(&base_path) {
         Ok(()) => {}
         Err(err) => task_warn!(worker, "error cleaning up: {}", err),