From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>
Subject: [pbs-devel] applied: [PATCH proxmox-backup] server: push: log encountered empty backup groups during sync
Date: Mon, 25 Nov 2024 10:41:50 +0100 [thread overview]
Message-ID: <1732527618.i47auxui82.astroid@yuna.none> (raw)
In-Reply-To: <20241122173917.728728-1-c.ebner@proxmox.com>
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@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
>
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
prev parent reply other threads:[~2024-11-25 9:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-22 17:39 [pbs-devel] " Christian Ebner
2024-11-25 9:41 ` Fabian Grünbichler [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1732527618.i47auxui82.astroid@yuna.none \
--to=f.gruenbichler@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.