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

Logical backup retention time #1337

Merged
merged 7 commits into from Mar 2, 2022

Conversation

stoewer
Copy link
Contributor

@stoewer stoewer commented Jan 28, 2021

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 as 1 week or 2 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.

@stoewer
Copy link
Contributor Author

stoewer commented Feb 3, 2021

👍

@FxKu FxKu added this to the 1.7 milestone Feb 15, 2021
@FxKu FxKu modified the milestones: 1.7, 1.8 Mar 26, 2021
@FxKu FxKu modified the milestones: 1.7, 1.8 Aug 12, 2021
@sdudoladov
Copy link
Member

👍

1 similar comment
@FxKu
Copy link
Member

FxKu commented Mar 2, 2022

👍

@FxKu FxKu merged commit 695ad44 into zalando:master Mar 2, 2022
@FxKu
Copy link
Member

FxKu commented Mar 2, 2022

Thanks @stoewer for your contribution and sorry it took us so long to merge.

@stoewer
Copy link
Contributor Author

stoewer commented Mar 7, 2022

@FxKu thank you for reviewing and merging

... sorry it took us so long to merge.

No worries, a true #1337 PR deserves to stay open for a while :)

@Routhinator
Copy link

How do we configure this from the CRD config?

@FxKu
Copy link
Member

FxKu commented Jan 13, 2023

@Routhinator what do you mean? You can set logical_backup_s3_retention_time in either ConfigMap or OperatorConfiguration CRD. Not from the Postgresql manifest, though.

@Routhinator
Copy link

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.

@thcdrt
Copy link

thcdrt commented Feb 16, 2023

Hello, what happened when the postgres CR is deleted. Backup are not cleaned up anymore, right ?

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

Successfully merging this pull request may close these issues.

None yet

5 participants