Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(backups/mirror): filter backup to be transfered #7748

Merged
merged 5 commits into from
Aug 29, 2024

Conversation

fbeauchamp
Copy link
Collaborator

@fbeauchamp fbeauchamp commented Jun 13, 2024

Description

  • add the possibility to filter VM subject to a mirror job, with an optional property filter on the job
  • The filter is either undefined, or a format accepted by value-matcher. For example filtering by vm uuid would be : { vm: { uuid: { __or: ["foo", "bar"] } } } where foo and bar are vm uuids
  • for incremental backup, if at least one backup of a job match, all the VM of the job are transferred to ensure we won't break the delta chain
  • for full backup only the backup matching the filter are transferred

excluded VM are visible in thebackup execution logs, with a specific information message

image

Checklist

  • Commit
    • Title follows commit conventions
    • Reference the relevant issue (Fixes #007, See xoa-support#42, See https://...)
    • If bug fix, add Introduced by
  • Changelog
    • If visible by XOA users, add changelog entry
    • Update "Packages to release" in CHANGELOG.unreleased.md
  • PR
    • If UI changes, add screenshots
    • If not finished or not tested, open as Draft

@fbeauchamp fbeauchamp force-pushed the feat_filter_mirror_transfer branch 2 times, most recently from 4083cb6 to 65d46f0 Compare July 12, 2024 13:50
@fbeauchamp
Copy link
Collaborator Author

after working on it this afternoon, I think it's not a good idea to use a generic filter on incremental backups, since transferring a partial chain will silentlty break the replicated backups, or we must add a lot of magic to rebuild a reasonnable chain

I would advise that the generic filter should be implemented when we rework the mirro backup to fuse incremental/full mirror job in one ( this is also a type of filter )

@fbeauchamp fbeauchamp force-pushed the feat_filter_mirror_transfer branch 5 times, most recently from 1ef5c10 to 4950121 Compare August 27, 2024 07:53
@fbeauchamp fbeauchamp marked this pull request as ready for review August 27, 2024 07:54
@fbeauchamp fbeauchamp force-pushed the feat_filter_mirror_transfer branch 2 times, most recently from dc64c66 to 4950121 Compare August 27, 2024 14:36
@fbeauchamp fbeauchamp force-pushed the feat_filter_mirror_transfer branch 5 times, most recently from 8ab1a45 to 555436a Compare August 28, 2024 13:55
the algorithm sorting the backup to transfer do not take into account multiple
job writing to the same remote
It can lead to additional VM being transferred
If the user defined a filter and the filter only match part of the full
backups, then we'll only transfer the matched backups

If the user is using incremental backup, then we'll trnsfer the full chain
if at least only one match
@julien-f julien-f merged commit 18bea75 into master Aug 29, 2024
1 check passed
@julien-f julien-f deleted the feat_filter_mirror_transfer branch August 29, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants