[pbs-devel] applied: [PATCH proxmox-backup] tape backup: mention groups that were empty

Dietmar Maurer dietmar at proxmox.com
Mon Aug 9 09:36:21 CEST 2021


applied

On 8/6/21 11:33 AM, Dominik Csapak wrote:
> 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 at proxmox.com>
> ---
>   src/api2/tape/backup.rs | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/src/api2/tape/backup.rs b/src/api2/tape/backup.rs
> index 9f815cad..9d1ece40 100644
> --- a/src/api2/tape/backup.rs
> +++ b/src/api2/tape/backup.rs
> @@ -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 {





More information about the pbs-devel mailing list