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

Support keepLast retention in k8up #2962

Open
seanhamlin opened this issue Dec 8, 2021 · 5 comments
Open

Support keepLast retention in k8up #2962

seanhamlin opened this issue Dec 8, 2021 · 5 comments
Labels
2-build-deploy Build & Deploy subsystem

Comments

@seanhamlin
Copy link
Contributor

k8up supports a retention key keepLast https://k8up.io/k8up/1.2/how-tos/schedules.html

If would be nice if there was a way to pass these args into the KBD to then pass into the k8up schedule object.

Related to uselagoon/remote-controller#92

@seanhamlin seanhamlin added the 2-build-deploy Build & Deploy subsystem label Dec 8, 2021
@Schnitzel
Copy link
Contributor

can you elaborate the idea behind this? also we could make this the default? then we don't have to add additional arguments to KBD, helmcharts, etc/

@seanhamlin
Copy link
Contributor Author

seanhamlin commented Dec 9, 2021

Yeah sure, so the idea is we have a customer that is looking to create 6 hourly backups. The current retention keys are a little confusing.

We currently can use

keepHourly: 72

Where I would prefer to have

keepLast: 12

To keep the last 3 days worth of 6 hourly backups.

also we could make this the default?

Potentially, likely it would still need to be combo'ed with keepMonthly etc if longer term backups are needed.

@Schnitzel
Copy link
Contributor

mhh I'm not sure I understand, so if you say create 6 hourly backups you mean a backup every 6 hours? or do backups every hour and want to keep the last 6 hourly ones?

so assuming you do a backup every 6 hours and you want to keep them the last 3 days (4 backups per day), then keepHourly: 72 would should work, as the documentation (https://restic.readthedocs.io/en/latest/060_forget.html) says:

--keep-hourly n for the last n hours in which a snapshot was made, keep only the last snapshot for each hour.

we don't have 72 backups but based on how I read this this would keep hourly backups it could find in the last 72h, which would be all backups that have been created.

So I'm not sure why we need to add the keepLast feature as it currently can be implemented with what we have?

@seanhamlin
Copy link
Contributor Author

you mean a backup every 6 hours?

Yes I do.

And yes this is achievable with the current functionality, but it did take a lot of reading of restic and k8up docs to discern this. If you feel this is not confusing, then feel free to close this issue.

@Schnitzel
Copy link
Contributor

I'm more concerned adding a new functionality to a system that already works, I would rather fix actual bugs or implement features that don't work yet :)

But I let @tobybellwood decide on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2-build-deploy Build & Deploy subsystem
Projects
None yet
Development

No branches or pull requests

2 participants