public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Lukas Wagner <l.wagner@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>,
	Stefan Hanreich <s.hanreich@proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup v2 0/7] Add Prune Options to Sync Jobs
Date: Thu, 1 Dec 2022 11:51:12 +0100	[thread overview]
Message-ID: <c9f7eae2-efce-a884-d80e-2079ac87e0cf@proxmox.com> (raw)
In-Reply-To: <20221130150102.242374-1-s.hanreich@proxmox.com>

Hi,

gave this test series a quick test on the latest master. Set up a second PBS and
set up a sync job with enabled pruning. Only tested "keep-last" prune option due to
practical reasons. In further testing I made sure that the group filters also
apply to the pruning operation. Everything seems to work as expected.

Also looked through the code, which looks good to me.

In summary, consider this

Tested-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>

On 11/30/22 16:00, Stefan Hanreich wrote:
> This relies on my small formatting fix in the email
> [PATCH proxmox-backup 1/1] Fix formatting in proxmox-backup-manager
> otherwise it will have a merge conflict.
> 
> This patch adds the possibility of configuring prune options for sync jobs. This
> runs a prune job after a successful sync job that prunes the backup groups that
> got synced by the respective sync job (meaning this respects group-filter,
> max-depth, target namespace and so on).
> 
> The prune options can also be specified when running a single pull command.
> 
> I also added the possibility of configuring this via the Web UI in the same way
> as configuring a regular prune job.
> 
> The new options are documented in the Sync Job documentation as well.
> 
> This patch series introduces a new struct, PruneJob, that encapsulates the
> pruning functionality in its own struct that can be conveniently used. This
> greatly reduces the code duplication between the sites that used pruning
> functionality.
> 
> Changes from v2:
> - Refactored pull function by extracting remove_vanished and prune into
> their own methods
> - Added PruneJob struct that encapsulates PruneJob functionality
> - Refactored existing call sites to utilize new PruneJob struct
> - Use KeepOptions::default where applicable
> - minor formatting and cargo clippy fixes
> 
> Stefan Hanreich (7):
>    Add KeepOptions parameters to pull & sync-job
>    refactor prune.rs - add PruneJob struct for handling prune jobs
>    Add pruning parameters to the pull command
>    use new PruneJob in prune command
>    use new PruneJob struct in Prune Jobs implementation
>    add KeepOptions to Web UI of Sync Jobs
>    Add documentation for prune options in Sync Jobs
> 
>   docs/managing-remotes.rst         |  14 ++
>   pbs-api-types/src/jobs.rs         |   7 +-
>   pbs-datastore/src/prune.rs        | 279 ++++++++++++++++++------------
>   src/api2/admin/datastore.rs       |  71 ++++----
>   src/api2/config/sync.rs           |  52 ++++++
>   src/api2/pull.rs                  |  17 +-
>   src/bin/proxmox-backup-manager.rs |  17 +-
>   src/server/prune_job.rs           |  29 +---
>   src/server/pull.rs                | 173 ++++++++++++------
>   tests/prune.rs                    |   4 +-
>   www/window/SyncJobEdit.js         |   5 +
>   11 files changed, 433 insertions(+), 235 deletions(-)
> 

-- 
Best Regards,
Lukas Wagner




      parent reply	other threads:[~2022-12-01 10:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-30 15:00 Stefan Hanreich
2022-11-30 15:00 ` [pbs-devel] [PATCH proxmox-backup v2 1/7] Add KeepOptions parameters to pull & sync-job Stefan Hanreich
2022-11-30 15:00 ` [pbs-devel] [PATCH proxmox-backup v2 2/7] refactor prune.rs - add PruneJob struct for handling prune jobs Stefan Hanreich
2022-11-30 15:00 ` [pbs-devel] [PATCH proxmox-backup v2 3/7] Add pruning parameters to the pull command Stefan Hanreich
2022-11-30 15:00 ` [pbs-devel] [PATCH proxmox-backup v2 4/7] use new PruneJob in prune command Stefan Hanreich
2022-11-30 15:01 ` [pbs-devel] [PATCH proxmox-backup v2 5/7] use new PruneJob struct in Prune Jobs implementation Stefan Hanreich
2022-11-30 15:01 ` [pbs-devel] [PATCH proxmox-backup v2 6/7] add KeepOptions to Web UI of Sync Jobs Stefan Hanreich
2022-11-30 15:01 ` [pbs-devel] [PATCH proxmox-backup v2 7/7] Add documentation for prune options in " Stefan Hanreich
2022-11-30 16:23 ` [pbs-devel] [PATCH proxmox-backup v2 0/7] Add Prune Options to " Thomas Lamprecht
2022-12-01  9:50   ` Stefan Hanreich
2023-01-05  9:46     ` Thomas Lamprecht
2022-12-01 10:51 ` Lukas Wagner [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=c9f7eae2-efce-a884-d80e-2079ac87e0cf@proxmox.com \
    --to=l.wagner@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    --cc=s.hanreich@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