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

Retention improvement #528

Open
arman712 opened this issue Feb 3, 2025 · 4 comments
Open

Retention improvement #528

arman712 opened this issue Feb 3, 2025 · 4 comments
Labels
enhancement New feature or request pr welcome

Comments

@arman712
Copy link

arman712 commented Feb 3, 2025

why is the retention mechanism not more flexible, for example, to allow setting a parameter in days, hours, and minutes? I had a situation where I needed to make a backup every hour and store only the last two archives, but I could not achieve this with the existing mechanisms

@m90
Copy link
Member

m90 commented Feb 3, 2025

I'm happy to discuss any improvement to this area that is not breaking the existing configuration setup. Please also note that it'd accelerate things a lot if this was implemented by the community itself.

@m90 m90 added the enhancement New feature or request label Feb 3, 2025
@m90
Copy link
Member

m90 commented Feb 3, 2025

This could probably work like this:

  • Deprecate BACKUP_RETENTION_DAYS, but keep it working as is
  • Introduce BACKUP_RETENTION_PERIOD which takes precedence if given. It can receive a duration string that can be parsed by Go's time.ParseDuration: https://pkg.go.dev/time#ParseDuration

Downside of this approach would be that a "natural" retention like 7 days can get a bit unwieldy as it turns into 168h

@m90 m90 added the pr welcome label Feb 3, 2025
@arman712
Copy link
Author

arman712 commented Feb 4, 2025

what if you enter BACKUP_RETENTION_COPIES , which will take an integer value, and if this parameter is set then ignore BACKUP_RETENTION_DAYS, this will make management more flexible, I can always store as many BACKUPs as I need

@m90
Copy link
Member

m90 commented Feb 4, 2025

Is there a use case that could be covered by BACKUP_RETENTION_COPIES that is not possible to cover using a more flexible BACKUP_RETENTION_PERIOD?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pr welcome
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants