[pbs-devel] [PATCH proxmox-backup v2 0/7] Add Prune Options to Sync Jobs
Stefan Hanreich
s.hanreich at proxmox.com
Wed Nov 30 16:00:55 CET 2022
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(-)
--
2.30.2
More information about the pbs-devel
mailing list