tape backup: mention groups that were empty

otherwise a user might get a task log like this:

-----
...
found 7 groups
TASK OK
-----

which could confuse the users as why there were no snapshots backed up

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2021-08-06 11:33:45 +02:00 committed by Dietmar Maurer
parent bb14ed8cab
commit cffe0b81e3

View File

@ -486,11 +486,16 @@ fn backup_worker(
let snapshot_list = group.list_backups(&datastore.base_path())?;
// filter out unfinished backups
let mut snapshot_list = snapshot_list
let mut snapshot_list: Vec<_> = snapshot_list
.into_iter()
.filter(|item| item.is_finished())
.collect();
if snapshot_list.is_empty() {
task_log!(worker, "group {} was empty", group);
continue;
}
BackupInfo::sort_list(&mut snapshot_list, true); // oldest first
if latest_only {