Feature request: Configure zero backups
Have an idea to improve PGO? We'd love to hear it! We're going to need some information from you to learn more about your feature requests.
Please be sure you've done the following:
- [x] Provide a concise description of your feature request.
- [x] Describe your use case. Detail the problem you are trying to solve.
- [x] Describe how you envision that the feature would work.
- [x] Provide general information about your current PGO environment.
Overview
Make backups optional.
I get an error like this when I try to configure an empty backups section:
The PostgresCluster "example" is invalid: spec.backups.pgbackrest.repos: Invalid value: 0: spec.backups.pgbackrest.repos in body should have at least 1 items
Use Case
Simpler configuration of inconsequential database clusters. Configuring a PG cluster requires the configuring a backup strategy even if the backups won't be used. For example, for dev databases or for testing purposes.
Desired Behavior
The validator should allow objects to be created without any backups configured. Omitting at any level would be acceptable:
- An empty repo list
apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: PostgresCluster
...
backups:
pgbackrest:
repos: []
- An empty
pgbackrestsection
apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: PostgresCluster
...
backups:
pgbackrest: {}
- An empty
backupssection
apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: PostgresCluster
...
backups: {}
- No backups section
apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: PostgresCluster
...
instances:
...
postgresVersion: 13
Environment
Tell us about your environment:
Please provide the following details:
EKS
- Platform: EKS
- Platform Version: 1.21
- PGO Image Tag: (e.g.
ubi8-5.1.0-0) - Postgres Version (e.g.
14) - Storage: (e.g.
hostpath,nfs, or the name of your storage class) - Number of Postgres clusters: (
XYZ)
Additional Information
Please provide any additional information that may be helpful.
I realize this is not really a good idea in production environments, but in dev backups often don't matter.
#2531 might be related
See https://github.com/CrunchyData/postgres-operator/pull/2662#issuecomment-922616677
Any movement on this one?
Another use case for no backups is if you are using something like longhorn storage or netapp astra etc then you would rely on them to do backups/restore of your persistent volume claims. Having the operator do this for us and having no option to disable is resulting in a waste of cluster resources (cpu/memory) and disk/storage space for zero benefit.
Just dropping a quick note here to say that we have a feature in our backlog for disabling backups. This has been a feature requested a few times, so I'm trying to consolidate the issues:
https://github.com/CrunchyData/postgres-operator/issues/3432 https://github.com/CrunchyData/postgres-operator/issues/2531
hey @benjaminjb, are there any updates on this topic? I can't believe that I need to research how to fight against WAL/backups taking all of the storage space when I dont even need backups