]> git.proxmox.com Git - proxmox-backup.git/commitdiff
tape: improve backup task logging
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 23 Feb 2021 11:58:44 +0000 (12:58 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 23 Feb 2021 11:58:44 +0000 (12:58 +0100)
src/tape/drive/mod.rs
src/tape/pool_writer.rs

index a7e0b2c68d19c315b49c388ed940cfb8e3c88251..ba63f4d4789c39f90758b146d24ecd15a1e98964 100644 (file)
@@ -363,6 +363,8 @@ pub fn request_and_load_media(
 
                     if drive_config.changer.is_some() {
 
+                        task_log!(worker, "loading media '{}' into drive '{}'", label_text, drive);
+
                         let mut changer = MtxMediaChanger::with_drive_config(&drive_config)?;
                         changer.load_media(&label_text)?;
 
index a15273f13489c6eb9b1a5f618045040e3e3b6adc..307ace5f94a9eeb8a580fd3d6a4db7bf75d77052 100644 (file)
@@ -7,6 +7,7 @@ use anyhow::{bail, Error};
 use proxmox::tools::Uuid;
 
 use crate::{
+    task_log,
     backup::{
         DataStore,
     },
@@ -203,11 +204,14 @@ impl PoolWriter {
             return Ok(media_uuid);
         }
 
+        task_log!(worker, "allocated new writable media '{}'", media.label_text());
+
         // remove read-only catalog (we store a writable version in status)
         self.media_set_catalog.remove_catalog(&media_uuid);
 
         if let Some(PoolWriterState {mut drive, catalog, .. }) = self.status.take() {
             self.media_set_catalog.append_catalog(catalog)?;
+            task_log!(worker, "eject current media");
             drive.eject_media()?;
         }