Multiple backup jobs

336 views
Skip to first unread message

Raja Rajenderan

unread,
Sep 20, 2021, 10:21:36 AM9/20/21
to Postgres Operator
Hi,

I have configured just 1 backup repo and scheduled auto backup. But every time it creates three backup jobs, among which 1 gets completed and the other 2 fails. Though the backup is working and getting pushed to the configured repo, I do not understand why there are additional jobs triggered. Here are my backup manifest file and the logs from each job.

Log from Working Backup Job
---------------------------

time="2021-09-19T04:00:13Z" level=info msg="crunchy-pgbackrest starts"
time="2021-09-19T04:00:13Z" level=info msg="debug flag set to false"
time="2021-09-19T04:00:13Z" level=info msg="backrest backup command requested"
time="2021-09-19T04:00:13Z" level=info msg="command to execute is [pgbackrest backup --stanza=db --repo=2 --type=full]"
time="2021-09-19T04:01:02Z" level=info msg="output=[]"
time="2021-09-19T04:01:02Z" level=info msg="stderr=[]"
time="2021-09-19T04:01:02Z" level=info msg="crunchy-pgbackrest ends"

---

Log from Failing Backup Job
---------------------------

time="2021-09-19T04:00:03Z" level=info msg="crunchy-pgbackrest starts"
time="2021-09-19T04:00:03Z" level=info msg="debug flag set to false"
time="2021-09-19T04:00:03Z" level=info msg="backrest backup command requested"
time="2021-09-19T04:00:03Z" level=info msg="command to execute is [pgbackrest backup --stanza=db --repo=2 --type=full]"
time="2021-09-19T04:00:03Z" level=info msg="output=[]"
time="2021-09-19T04:00:03Z" level=info msg="stderr=[ERROR: [050]: unable to acquire lock on file '/tmp/pgbackrest/db-backup.lock': Resource temporarily unavailable\n       HINT: is another pgBackRest process running?\n]"
time="2021-09-19T04:00:03Z" level=fatal msg="command terminated with exit code 50"

---

Log from Failing Backup Job
---------------------------

time="2021-09-19T04:00:01Z" level=info msg="crunchy-pgbackrest starts"
time="2021-09-19T04:00:01Z" level=info msg="debug flag set to false"
time="2021-09-19T04:00:01Z" level=info msg="backrest backup command requested"
time="2021-09-19T04:00:01Z" level=info msg="command to execute is [pgbackrest backup --stanza=db --repo=2 --type=full]"
time="2021-09-19T04:00:01Z" level=info msg="output=[]"
time="2021-09-19T04:00:01Z" level=info msg="stderr=[ERROR: [050]: unable to acquire lock on file '/tmp/pgbackrest/db-backup.lock': Resource temporarily unavailable\n       HINT: is another pgBackRest process running?\n]"
time="2021-09-19T04:00:01Z" level=fatal msg="command terminated with exit code 50"

---

YAML Manifest
-------------

  backups:
    pgbackrest:
      global:
        repo2-path: /pgbackrest/postgres-operator/hippo/repo2
        repo2-retention-full: "7"
        repo2-retention-full-type: time
      repoHost:
        dedicated: {}
      configuration:
      - secret:
          name: pgo-azure-creds
      repos:
      - name: repo2
        azure:
          container: pgo-test
        schedules:
          full: "0 4 * * *"
          incremental: "0 */2 * * *"

Regards,
Raja

Jonathan S. Katz

unread,
Sep 20, 2021, 10:23:55 AM9/20/21
to Raja Rajenderan, Postgres Operator
Are there 3 repos set up? You're using "repo2" -- is there a reason you're not using repo1?

Jonathan S. Katz
VP Platform Engineering

Crunchy Data
Enterprise PostgreSQL 


Raja Rajenderan

unread,
Sep 20, 2021, 10:26:45 AM9/20/21
to Jonathan S. Katz, Postgres Operator
Only one repo setup. Repo 1 is local [but not using it now, so have commented on it]. Repo 2 is Azure, which is where the backups are pushed to.
--
Regards,
Raja Rajenderan

Jonathan S. Katz

unread,
Sep 20, 2021, 11:14:59 AM9/20/21
to Raja Rajenderan, Postgres Operator
Can you please send the full manifest you are using (with the sensitive info redacted) and any logs from the Postgres Operator around the creation of CronJobs?

Can you inspect how many CronJobs were created and share any info from kubectl describe or the manifests?

Thanks,

Jonathan


Jonathan S. Katz
VP Platform Engineering

Crunchy Data
Enterprise PostgreSQL 


Reply all
Reply to author
Forward
0 new messages