[pbs-devel] applied: [PATCH proxmox-backup] server: push: log encountered empty backup groups during sync

Fabian Grünbichler f.gruenbichler at proxmox.com
Mon Nov 25 10:41:50 CET 2024


On November 22, 2024 6:39 pm, Christian Ebner wrote:
> 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 at proxmox.com>
> Signed-off-by: Christian Ebner <c.ebner at 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 at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
> 




More information about the pbs-devel mailing list