Postgres backup stuck in starting problem


What is the problem and how can I solve it?

89s Warning UnableToCreateStanzas postgrescluster/postgresql-c2a command terminated with exit code 1: postgres operator error: pgBackRest config hash mismatch
12s Warning StanzaNotCreated postgrescluster/postgresql-c2a Stanza not created for “repo2” as specified for a manual backup
87s Warning UnableToCreateStanzas postgrescluster/postgresql-c2a command terminated with exit code 39: repo1-path = /pgbackrest/repo1…
84s Warning UnableToCreateStanzas postgrescluster/postgresql-c2a command terminated with exit code 39: repo1-path = /pgbackrest/repo1…
72s Warning UnableToCreateStanzas postgrescluster/postgresql-c2a command terminated with exit code 39: repo1-path = /pgbackrest/repo1…
60s Warning UnableToCreateStanzas postgrescluster/postgresql-c2a command terminated with exit code 39: repo1-path = /pgbackrest/repo1…
48s Warning UnableToCreateStanzas postgrescluster/postgresql-c2a command terminated with exit code 39: repo1-path = /pgbackrest/repo1…
36s Warning UnableToCreateStanzas postgrescluster/postgresql-c2a command terminated with exit code 39: repo1-path = /pgbackrest/repo1…
24s Warning UnableToCreateStanzas postgrescluster/postgresql-c2a command terminated with exit code 39: repo1-path = /pgbackrest/repo1…
12s Warning UnableToCreateStanzas postgrescluster/postgresql-c2a command terminated with exit code 39: repo1-path = /pgbackrest/repo1…

Hi @ahmad_taknet,

Can you share the output of:

kubectl get pg postgresql-c2a -o yaml

Thanks.

apiVersion: pgv2.percona.com/v2
kind: PerconaPGCluster
metadata:
annotations:
pgv2.percona.com/backup-in-progress: backup-naaaaaaaaaaaaaaame
postgres-operator.crunchydata.com/pgbackrest-backup: backup-naaaaaaaaaaaaaaame
creationTimestamp: “2026-05-18T15:50:32Z”
finalizers:

  • percona.com/delete-pvc
  • percona.com/delete-ssl
  • internal.percona.com/stop-watchers
    generation: 3
    name: postgresql-c2a
    namespace: a------a
    resourceVersion: “234295488”
    uid: f139fd3c-30b0-48f5-88bc-11f4a05a92d9
    spec:
    backups:
    pgbackrest:
    configuration:
    • secret:
      name: postgresql-c2a-pgbackrest-secrets
      global:
      repo1-retention-full: “1”
      repo2-path: /postgresql-c2a/8b145966-9682-498e-ba8d-e813d3397a2e
      repo2-s3-uri-style: path
      image: percona/percona-pgbackrest:2.55.0
      manual:
      options:
    • name: repo1
      volume:
      volumeClaimSpec:
      accessModes:
      • ReadWriteOnce
        resources:
        requests:
        storage: 3Gi
        storageClassName: rook-ceph-block
    • name: repo2
      s3:
      bucket: aaaaaaaaafor-kxac
      endpoint: https://s3.virakcloud.com
      region: thr
      crVersion: 2.7.0
      extensions:
      builtin: {}
      image: docker.io/percona/percona-postgresql-operator:2.7.0
      imagePullPolicy: IfNotPresent
      storage: {}
      image: percona/percona-postgresql-operator:2.7.0-ppg17.5.2-postgres
      imagePullPolicy: IfNotPresent
      instances:
  • affinity:
    podAntiAffinity:
    preferredDuringSchedulingIgnoredDuringExecution:
    • ReadWriteOnce
      resources:
      requests:
      storage: 3Gi
      storageClassName: rook-ceph-block
      name: instance1
      replicas: 1
      resources:
      limits:
      cpu: “1”
      memory: 2G
      patroni:
      dynamicConfiguration:
      postgresql:
      parameters:
      track_commit_timestamp: “on”
      leaderLeaseDurationSeconds: 30
      port: 8008
      syncPeriodSeconds: 10
      pause: false
      port: 5432
      postgresVersion: 17
      proxy:
      pgBouncer:
      affinity:
      podAntiAffinity:
      preferredDuringSchedulingIgnoredDuringExecution:
      • podAffinityTerm:
        topologyKey: kubernetes.io/hostname
        weight: 1
        config: {}
        expose:
        annotations:
        metallb.io/address-pool: production-pool
        type: LoadBalancer
        exposeSuperusers: true
        image: percona/percona-pgbouncer:1.24.1
        port: 5432
        replicas: 1
        resources:
        limits:
        cpu: “1”
        memory: 30M
        secrets: {}
        users:
  • name: postgres
    secretName: everest-secrets-postgresql-c2a
    status:
    conditions:
  • lastTransitionTime: “2026-05-18T15:52:29Z”
    message: “”
    reason: AllConditionsAreTrue
    status: “True”
    type: ReadyForBackup
    host: 192.168.85.104
    installedCustomExtensions:
    patroniVersion: 4.0.5
    pgbouncer:
    ready: 1
    size: 1
    postgres:
    imageID: docker.io/percona/percona-postgresql-operator@sha256:cfb99ebeec00ab6efb4fca4a8da2b8c3b489dd792bd2f907848197ba09bc9553
    instances:
    • name: instance1
      ready: 1
      size: 1
      ready: 1
      size: 1
      version: 17
      state: ready

Hello. Thanks for your attention. Did you find any idea for this problem? @jaimes

Hello Ahmad,

Hope you are doing great. The error(exit code 39:) suggests that Pgbackrest is trying to create a stanza on a non-empty directory.

After carefully reviewing the configuration file, I can notice that repo1-path is not set. Is there a reason to omit this? While repo1-path is not supplied, it picks the default path which is a non-empty directory.

Would you please take a look if the directory is empty?

Please revert to us if this doesn’t resolve your issue.

Thanks,

Ninad