[pbs-devel] [RFC PATCH 0/4] fix #3786: add a "deep sync" option to sync jobs

Stefan Sterz s.sterz at proxmox.com
Wed Jun 15 10:20:36 CEST 2022


this series adds a "deep sync" option to sync jobs. a deep sync uses
the information from a previous verification job to re-sync snapshots
that have corrupted chunks.

the deep sync option is added to the "advanced" section of the sync
job configuration intentionally for the reasoning see commit 3.
however, i am not entirely sure if that's the best way of handling
this.

sending this as an rfc because:

  a) this is a fairly minimalistic and unoptimized implementation. a
    deep sync currently just looks at _every_ manifest and if it's
    corrupt re-syncs the snapshot. as described in the bug report
    this could be improved by flagging groups during gc /
    verification / etc jobs and only looking at groups with corrupt
    snapshots.

    however, this would require a place to store this information.
    afaict currently the only metadata we have about groups is their
    owner and that has a dedicated "owner" file. i could just add
    a "corrupted" file, but if we need further information about
    groups in the future it might make sense to think about a more
    flexible solution.

    hence, i see three options: a) stick with this simple
    implementation, b) leverage gc / verification / etc jobs further
    and flag groups with a dedicated "corrupt" file or c) add a yet
    to be determined meta-data file for groups and store the flag
    there. any input would be greatly appreciated.

  b) while i tested this code quite a bit, i am unsure whether i
    missed scenarios in which corrupted snapshots might not be
    re-synced.

Stefan Sterz (4):
  fix #3786: api: add deep sync parameter
  fix #3786: server/datastore: add deep sync parameter to pull sync jobs
  fix #3786: ui/cli: add deep sync option to ui and cli
  fix #3786: docs: document deep sync behavior and prerequisites

 docs/managing-remotes.rst         |  6 ++++++
 pbs-api-types/src/jobs.rs         | 12 ++++++++++++
 pbs-datastore/src/backup_info.rs  | 22 +++++++++++++++++++++-
 src/api2/config/sync.rs           | 10 ++++++++++
 src/api2/pull.rs                  | 12 ++++++++++--
 src/bin/proxmox-backup-manager.rs | 13 +++++++++++--
 src/server/pull.rs                | 29 +++++++++++++++++++++--------
 www/window/SyncJobEdit.js         | 11 +++++++++++
 8 files changed, 102 insertions(+), 13 deletions(-)

-- 
2.30.2






More information about the pbs-devel mailing list