* [pbs-devel] [PATCH proxmox-backup] tape backup: mention groups that were empty
@ 2021-08-06 9:33 Dominik Csapak
2021-08-09 7:36 ` [pbs-devel] applied: " Dietmar Maurer
0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2021-08-06 9:33 UTC (permalink / raw)
To: pbs-devel
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>
---
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 {
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pbs-devel] applied: [PATCH proxmox-backup] tape backup: mention groups that were empty
2021-08-06 9:33 [pbs-devel] [PATCH proxmox-backup] tape backup: mention groups that were empty Dominik Csapak
@ 2021-08-09 7:36 ` Dietmar Maurer
0 siblings, 0 replies; 2+ messages in thread
From: Dietmar Maurer @ 2021-08-09 7:36 UTC (permalink / raw)
To: Proxmox Backup Server development discussion, Dominik Csapak
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@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 {
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-09 7:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06 9:33 [pbs-devel] [PATCH proxmox-backup] tape backup: mention groups that were empty Dominik Csapak
2021-08-09 7:36 ` [pbs-devel] applied: " Dietmar Maurer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal