-
Notifications
You must be signed in to change notification settings - Fork 939
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
Logical backup retention time #1337
Conversation
So that the script will work with older operator versions
👍 |
👍 |
1 similar comment
👍 |
Thanks @stoewer for your contribution and sorry it took us so long to merge. |
How do we configure this from the CRD config? |
@Routhinator what do you mean? You can set |
I mean I would like to set this for the cluster CRD so that different clusters have different retention. I found the global config - but I need per-cluster config. |
Hello, what happened when the postgres CR is deleted. Backup are not cleaned up anymore, right ? |
This PR adds the possibility to configure a retention time for logical backups (as described in #1008).
The cleanup of logical backup objects, older than the defined retention period, is implemented in the
dump.sh
script and will only run after a successful upload of a new backup.The retention time can be configured using the parameter
logical_backup_s3_retention_time
. Values can be specified in a human friendly format such as1 week
or2 months
. Values shorter than one day (e.g.3 hours
) are accepted but will be rounded up to a full day. As a precaution the cleanup procedure will always spare the newest backup that is older than the retention time.