public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] server: push: log encountered empty backup groups during sync
@ 2024-11-22 17:39 Christian Ebner
  0 siblings, 0 replies; only message in thread
From: Christian Ebner @ 2024-11-22 17:39 UTC (permalink / raw)
  To: pbs-devel

Log also empty backup groups with no snapshots encountered during the
sync so the log output contains this additional information as well,
reducing possible confusion.

Nevertheless, continue with the regular logic, so that pruning of
vanished snapshot is honored.

Examplary output in the sync jobs task log:
```
2024-11-22T18:32:40+01:00: Syncing datastore 'datastore', root namespace into datastore 'push-target-store', namespace 'test'
2024-11-22T18:32:40+01:00: Found 2 groups to sync (out of 2 total)
2024-11-22T18:32:40+01:00: skipped: 1 snapshot(s) (2024-11-22T13:40:18Z) - older than the newest snapshot present on sync target
2024-11-22T18:32:40+01:00: Group 'vm/200' contains no snapshots to sync to remote
2024-11-22T18:32:40+01:00: Finished syncing root namespace, current progress: 1 groups, 0 snapshots
```

Reported-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
 src/server/push.rs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/server/push.rs b/src/server/push.rs
index 082a6f49d..99757a3cc 100644
--- a/src/server/push.rs
+++ b/src/server/push.rs
@@ -664,6 +664,10 @@ pub(crate) async fn push_group(
     let mut snapshots: Vec<BackupDir> = params.source.list_backup_dirs(namespace, group).await?;
     snapshots.sort_unstable_by(|a, b| a.time.cmp(&b.time));
 
+    if snapshots.is_empty() {
+        info!("Group '{group}' contains no snapshots to sync to remote");
+    }
+
     let total_snapshots = snapshots.len();
     let cutoff = params
         .transfer_last
-- 
2.39.5



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-11-22 17:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-22 17:39 [pbs-devel] [PATCH proxmox-backup] server: push: log encountered empty backup groups during sync Christian Ebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal