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(backup): support recurring and ondemand full backup #2709

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ChanYiLin
Copy link
Contributor

@ChanYiLin ChanYiLin commented Mar 21, 2024

ref: longhorn/longhorn#7070

backupstore: If the backup has the parameter backupmodea: full, it will pretend there is no last backup, and backup all the blocks of the current volume.

longhorn-manager:

RecurringJob app

  • Add a new field .Spec.Parameters
  • Get recurringJob.Status.ExecutionCount, +1 , then update it backup to the status
  • if the parameter["full-backup-interval"] = N
    • "0": always incremental
    • "1": always full
    • "N": every N
  • Create the Backup through API and pass the parameter to the Backup if job.executionCount%interval == 0
    • parameters: {"backup-mode": "full"}

Backup

  • Add a new field .Spec.Parameters
  • Add .Status.NewlyUploadedDataSize and .Status.ReUploadedDataSize to each Backup. So user can know the data transfer size for each Backup to trace the cost.
  • pass the parameter to the snapshotBackup (improxy -> replica) to do the full backup

Webhook

  • For Backup, validate the Backup.Spec.Parameters: only support "backup-mode: full/incremental"
  • For RecurringJob, validate the RecurringJob.Spec.Parameters: only support "full-backup-interval: N"

CRD

  • Add .Spec.Parameters to Backup
  • Add .Spec.Parameters to RecurringJob
  • Add .Status.BackupCount to BackupVolume.
  • Add .Status.NewlyUploadedDataSize and .Status.ReUploadedDataSize to Backup

API

  • Add Parameters to the SnapshotInput{}
  • Add BackupCount to BackupVolume{}

@ChanYiLin ChanYiLin self-assigned this Mar 21, 2024
@ChanYiLin ChanYiLin force-pushed the LH7070_support_full_backup branch 7 times, most recently from 97fecb4 to e9de905 Compare March 26, 2024 06:18
@ChanYiLin ChanYiLin changed the title feat(backup): add option validation for backup creation feat(backup): support recurring and ondemand full backup Mar 26, 2024
@ChanYiLin ChanYiLin force-pushed the LH7070_support_full_backup branch 2 times, most recently from 4d99c6c to 64b4d30 Compare March 29, 2024 09:35
Copy link

mergify bot commented Mar 29, 2024

This pull request is now in conflict. Could you fix it @ChanYiLin? 🙏

@ChanYiLin ChanYiLin force-pushed the LH7070_support_full_backup branch 5 times, most recently from 9c979dc to a480c0d Compare April 2, 2024 08:00
@ChanYiLin
Copy link
Contributor Author

ChanYiLin commented Apr 2, 2024

Copy link

mergify bot commented Apr 18, 2024

This pull request is now in conflict. Could you fix it @ChanYiLin? 🙏

1 similar comment
Copy link

mergify bot commented Apr 24, 2024

This pull request is now in conflict. Could you fix it @ChanYiLin? 🙏

@ChanYiLin
Copy link
Contributor Author

Since the grpc proto has been moved to types
I don't want to modify the PR and solve the conflicts
Will close this one and recreate the PR again
cc @derekbit @innobead

@ChanYiLin ChanYiLin closed this May 31, 2024
@ChanYiLin ChanYiLin reopened this May 31, 2024
Copy link

mergify bot commented May 31, 2024

This pull request is now in conflict. Could you fix it @ChanYiLin? 🙏

@ChanYiLin ChanYiLin force-pushed the LH7070_support_full_backup branch 4 times, most recently from fd0c73f to f67f889 Compare May 31, 2024 09:49
@ChanYiLin ChanYiLin force-pushed the LH7070_support_full_backup branch 2 times, most recently from ba772b7 to 0307a44 Compare May 31, 2024 10:28
Copy link

mergify bot commented Jun 1, 2024

This pull request is now in conflict. Could you fix it @ChanYiLin? 🙏

@ChanYiLin ChanYiLin force-pushed the LH7070_support_full_backup branch 2 times, most recently from 03f17d8 to 1510810 Compare June 3, 2024 08:22
ref: longhorn/longhorn 7070

Signed-off-by: Jack Lin <jack.lin@suse.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant