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

Azure - unable to take full backup every week with daily incremental backup #7309

Closed
sanzzz opened this issue Jan 11, 2024 · 8 comments
Closed

Comments

@sanzzz
Copy link

sanzzz commented Jan 11, 2024

HI ,
I am using helm charts for installing velero on aks cluster https://github.com/vmware-tanzu/helm-charts/blob/main/charts/velero/values.yaml#L598 , everything works as expected.

we want to

  1. Schedule the daily incremental backups for a week for both configuraiton and pv's
  2. Take full backup at start of the week and repeat taking incremental backups until end of next week
  3. Keep three weeks of backups.

With the current schdule.yaml we cannot do that . Can you please check?

schedules:
mybackup:
disabled: false
labels:
myenv: foo
annotations:
myenv: foo
schedule: "0 * * * *"
useOwnerReferencesInBackup: false
template:
ttl: "240h"
storageLocation: default

with the above configuration, we are taking the incremental backups continuously.
With 240h (10days)- if we take a backup on first day of week and snapshot type as incremental ,we get full backup on day 1 and then it keeps taking incremental snapshots for 10 days. On 11th day the 1st backup will be removed by moving its content to second day's incremental snapshot and second day's snapshot becomes 1st snapshot . Is my understanding righ?

I don't see an option to take full backup at the start of every week as a new job.

@sanzzz sanzzz changed the title Azure - unable to take full backup every week and daily incremental backup Azure - unable to take full backup every week with daily incremental backup Jan 11, 2024
@ywk253100 ywk253100 self-assigned this Jan 12, 2024
@ywk253100
Copy link
Contributor

ywk253100 commented Jan 12, 2024

You can create two schedules: one for full backup runs every Monday and the other one for incremental backup runs daily.
Currently, taking incremental or full backups is configured in VolumeSnapshotLocation, so you need to create two VSLs for these two schedules.

@sanzzz
Copy link
Author

sanzzz commented Jan 12, 2024

Thank you @ywk253100 .
If i create two volumeshapshotlocations named vsl1 and vsl2 . Lets think vsl1 is taking daily snapshots and vsl2 is taking weekly snapshot .
first week vsl2 takes full backup and vsl1 takes incremental snapshots (first incremental will be full snapshot and other 6 are incremental). second week vsl2 will take another full snapshot but vsl1 will continue to take the snapshot from the first week , there is no relation between vsl1 and vsl2 and if i need to restore from midweek vsl2 will have full backup of first day of week start and no incremental (which is in vsl1). How to restore in this case where fullbackup is with vsl2 and incrementals are in vsl1?

@anshulahuja98
Copy link
Collaborator

Hey
Is there any particular reason for you to take a full backup?

Azure Disk based incremental snapshots are self sufficient - even if chain in between gets broken.

I am not fully clear on this paritcular use case of full snapshot. Can you please elaborate why you need it in first place?

@anshulahuja98
Copy link
Collaborator

Ideally you should take all snapshots with incremental=true and that should suffice all use cases for you.

Even if any intermediate snapshot is deleted, azure will take care of making sure that all snapshots are still properly restorable with required data.

you don't have to worry about restorability of any of the snapshots

@anshulahuja98 anshulahuja98 self-assigned this Jan 12, 2024
@sanzzz
Copy link
Author

sanzzz commented Jan 12, 2024

Thanks @anshulahuja98. One more thing to check, does Velero only take backups for pv with reclaim policy as delete? I don’t see Velero taking backups for pvs with reclaim type retain

@sanzzz
Copy link
Author

sanzzz commented Jan 14, 2024

with the above configuration, we are taking the incremental backups continuously.
With 240h (10days)- if we take a backup on first day of week and snapshot type as incremental ,we get full backup on day 1 and then it keeps taking incremental snapshots for 10 days. On 11th day the 1st backup will be removed by moving its content to second day's incremental snapshot and second day's snapshot becomes 1st snapshot . Is my understanding right?

@anshulahuja98
Copy link
Collaborator

" One more thing to check, does Velero only take backups for pv with reclaim policy as delete? I don’t see Velero taking backups for pvs with reclaim type retain"

I am not aware if there should be any issue with retain PVs.
Ideally they should be snapshotted, would request you to double check backup configuration / and perhaps check velero logs to be sure.

@anshulahuja98
Copy link
Collaborator

with the above configuration, we are taking the incremental backups continuously. With 240h (10days)- if we take a backup on first day of week and snapshot type as incremental ,we get full backup on day 1 and then it keeps taking incremental snapshots for 10 days. On 11th day the 1st backup will be removed by moving its content to second day's incremental snapshot and second day's snapshot becomes 1st snapshot . Is my understanding right?

yes your understanding is correct. -> 2nd day snapshot will include data of both 1st and 2nd day.
Azure abstracts all that logic from you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants