public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 0/3] add removed vanished stats to sync job log
Date: Fri,  8 Mar 2024 14:01:47 +0100	[thread overview]
Message-ID: <20240308130150.310352-1-c.ebner@proxmox.com> (raw)

Adds a global summary of the vanished and therefore removed snapshots,
backup groups and namespaces to the sync jobs task log.

Patch 1/3 introduces a BackupGroupDeleteStats object, used to count
the number of removed snapshots within a backup group as well as the
number of not removed snapshots, since protected.

Patch 2/3 adds an optional RemovedVanishedStats object to the PullStats,
counting also the removed backup groups and namespaces and utilizing the
returned counts of removed snapshots as introduced by the previous
patch.

Patch 3/3 finally adds the removed vanished entities output to the sync
jobs task log.

The series was tested by creating a local sync job and syncing a
datastore, containing nested namespaces with snapshots performing the
following actions:

The `remove vanished` flag was unset for the sync job and the absence
of the line in the sync jobs task log verified for that case; then the
flag was set once again.

Further, removed snapshots on the source store, set some of the removed
snapshots to be protected on the target store and compared the removed
entities of the sync job by the logged output.

Finally, removed the protected flag on the snapshots in the target
datastore and removed all namespaces and snapshots in the source
datastore. Checked once again the sync jobs log output as compared to
the actual removed entities.

Christian Ebner (3):
  datastore: group: return basic stats on backup group destroy
  server: sync job: include removed vanished stats
  api: sync job: log stats for removed vanished entities

 pbs-datastore/src/backup_info.rs | 44 ++++++++++++++---
 pbs-datastore/src/datastore.rs   | 11 +++--
 src/api2/admin/datastore.rs      |  3 +-
 src/api2/pull.rs                 | 10 ++++
 src/server/pull.rs               | 85 ++++++++++++++++++++++++++------
 5 files changed, 127 insertions(+), 26 deletions(-)

-- 
2.39.2





             reply	other threads:[~2024-03-08 13:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-08 13:01 Christian Ebner [this message]
2024-03-08 13:01 ` [pbs-devel] [PATCH proxmox-backup 1/3] datastore: group: return basic stats on backup group destroy Christian Ebner
2024-03-08 13:01 ` [pbs-devel] [PATCH proxmox-backup 2/3] server: sync job: include removed vanished stats Christian Ebner
2024-03-08 13:01 ` [pbs-devel] [PATCH proxmox-backup 3/3] api: sync job: log stats for removed vanished entities Christian Ebner
2024-03-25 17:03 ` [pbs-devel] applied-series: [PATCH proxmox-backup 0/3] add removed vanished stats to sync job log Thomas Lamprecht

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=20240308130150.310352-1-c.ebner@proxmox.com \
    --to=c.ebner@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 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