Help configuring postgres operator backup section of cr.yaml

Hello,I am having some issues configuring backups for the postgres operator in cr.yaml, pgo-version 1.3.0. Below is my configuration along with logs from the job pod. I am using

My first question is why is the backup trying to run using s3 when I have local specified in the schedule? I have noticed if I comment out the s3 configuration, then it only runs a local backup as expected. Is this by design?

Second, it doesn’t seem like the bucket is being picked up in the configuration when I specify s3 or local in the schedule. I know it is seeing the configuration because if I change the type to gcs for example, the error log mentions it is missing a gcs bucket rather than s3.
Thanks in advance for your help.


    type: s3
    bucket: s3://BUCKET/
    region: us-west-2
    verifyTLS: false
    uriStyle: path
  - name: "testing-backup"
    schedule: "*/3 * * * *"
    keep: 2
    type: full
    storage: local

Error Logs:
time=“2023-03-25T17:57:03Z” level=info msg=“crunchy-pgbackrest starts”
time=“2023-03-25T17:57:03Z” level=info msg=“debug flag set to false”
time=“2023-03-25T17:57:03Z” level=info msg=“backrest backup command requested”
time=“2023-03-25T17:57:03Z” level=info msg=“backrest command will be executed for both local and s3 storage”
time=“2023-03-25T17:57:03Z” level=info msg=“command to execute is [pgbackrest backup --stanza=db --type=full --repo1-retention-full=2 --db-host= --db-path=/pgdata/dev-eng-pg-cluster-repl3 ; pgbackrest backup --stanza=db --type=full --repo1-retention-full=2 --db-host= --db-path=/pgdata/dev-eng-pg-cluster-repl3 --repo1-type=s3 --no-repo1-s3-verify-tls]”
time=“2023-03-25T17:57:17Z” level=info msg=“output=
time=“2023-03-25T17:57:17Z” level=info msg=“stderr=[ERROR: [037]: backup command requires option: repo1-s3-bucket\n]”
time=“2023-03-25T17:57:17Z” level=fatal msg=“command terminated with exit code 37”

I needed the backup to be done only locally on xxx–backrest-shared-repo-xxx only.
This has been achieved.)
Do you want it?

Thank for the reply. I actually have it backing up locally just fine as long as I comment out the storages section, but I was wondering why I need to comment out that section if the schedule section specifies “local”.
Ultimately, I want to use s3 but for some reason it doesn’t pick up the bucket configuration in cr.yaml.

I would say this: when configuring a PGO backup, there are certain non-obviousness)))

However, it is possible to achieve that it works as you need.

I have been following the instructions here Backup and restore - Percona Operator for PostgreSQL to set it up but it doesn’t seem to create the configmap correctly. It looks like you have to configure the configmap for your backup manually, so I am trying to do that now.

Can anyone verify they actually were able to get s3 backups working using these instructions? Spent a significant amount of time trying to figure these out and trying to determine if it is worth going any furthur.

Hi Michael

Thank you for sharing your experience with us.

As for two backup storages engagement, we consider this as a bug and address it in the future releases. The issue sits in the pgbackrest helper utility running on backup initiator pod when needed, not the operator itself.

As for bucket name, the operator expects just a word or words-separated-with-hyphens. s3:// is not supported. Please try to recreate the cluster with suggested adjustments

Thank you.