# Percona Backup not working with multiple backup policies

**URL:** <https://forums.percona.com/t/percona-backup-not-working-with-multiple-backup-policies/34024>\
**Category:** Percona Operator for MongoDB\
**Created:** [September 29, 2024, 5:40pm UTC](https://forums.percona.com/t/percona-backup-not-working-with-multiple-backup-policies/34024 "2024-09-29T17:40:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bljurg\_geiwn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/bljurg_geiwn/32/18297_2.png) [@bljurg\_geiwn](https://forums.percona.com/u/bljurg_geiwn)\
**Post date:** [September 29, 2024, 5:40pm UTC](https://forums.percona.com/t/percona-backup-not-working-with-multiple-backup-policies/34024/1 "2024-09-29T17:40:08Z")

</div>

I have 3 replica percona-mongo running in kubernetes cluster and I have multiple backup policies → hourly, daily, monthly and yearly with following configurations →

spec:  
allowUnsafeConfigurations: false  
backup:  
enabled: true  
image: ‘percona/percona-backup-mongodb:2.3.0’  
pitr:  
compressionLevel: 6  
compressionType: gzip  
enabled: false  
serviceAccountName: percona-mongo-sa

```
storages:
  daily-bucket:
    s3:
      bucket: percona-backups
      credentialsSecret: creds
      endpointUrl: 'https://storage.googleapis.com'
      insecureSkipTLSVerify: false
      prefix: daily
      region: auto
    type: s3
  hourly-bucket:
    s3:
      bucket: percona-backups
      credentialsSecret: creds
      endpointUrl: 'https://storage.googleapis.com'
      insecureSkipTLSVerify: false
      prefix: hourly
      region: auto
    type: s3
  monthly-bucket:
    s3:
      bucket: percona-backups
      credentialsSecret: creds
      endpointUrl: 'https://storage.googleapis.com'
      insecureSkipTLSVerify: false
      prefix: monthly
      region: auto
    type: s3
  weekly-bucket:
    s3:
      bucket: percona-backups
      credentialsSecret: creds
      endpointUrl: 'https://storage.googleapis.com'
      insecureSkipTLSVerify: false
      prefix: weekly
      region: auto
    type: s3

tasks:
  - compressionLevel: 6
    compressionType: gzip
    enabled: true
    keep: 48
    name: hourly-backup
    schedule: 0 */1 * * *
    storageName: hourly-bucket
  - compressionLevel: 6
    compressionType: gzip
    enabled: true
    keep: 7
    name: daily-backup
    schedule: 0 6 * * *
    storageName: daily-bucket
  - compressionLevel: 6
    compressionType: gzip
    enabled: true
    keep: 12
    name: monthly-backup
    schedule: 0 6 5 * *
    storageName: monthly-bucket
  - compressionLevel: 6
    compressionType: gzip
    enabled: true
    keep: 48
    name: weekly-backup
    schedule: 0 6 * * 6
    storageName: weekly-bucket

```

But due to some reason I am only receiving hourly and daily backups.Monthly and Yearly backups are not getting generated. When checked on all 3 replicas backup agent container, they all have either hourly or daily configs from the output of “pbm config” command.

Need some assistance here, if anybody have some idea.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [September 30, 2024, 12:39am UTC](https://forums.percona.com/t/percona-backup-not-working-with-multiple-backup-policies/34024/2 "2024-09-30T00:39:48Z")

</div>

Hey @bljurg_geiwn,  
Please provide some output. Logs, etc. Hard to help without information.

---

<div class="post-metadata">

**Author:** ![Sergey\_Pronin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sergey_pronin/32/14887_2.png) [@Sergey\_Pronin](https://forums.percona.com/u/Sergey_Pronin)\
**Post date:** [October 7, 2024, 4:15pm UTC](https://forums.percona.com/t/percona-backup-not-working-with-multiple-backup-policies/34024/3 "2024-10-07T16:15:17Z")

</div>

@bljurg_geiwn

as I see - you use the operator.

In your config I see hourly, daily, weekly, monthly. But not yearly.

But anyway, as you don’t have PITR enabled, your config should work as expected. Would be great to get more logs from the Operator and from the backup agent (each mongodb replica set Pod has backup-agent container). Do you see something suspicios and/or errors there?

---

<div class="post-metadata">

**Author:** ![bljurg\_geiwn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/bljurg_geiwn/32/18297_2.png) [@bljurg\_geiwn](https://forums.percona.com/u/bljurg_geiwn)\
**Post date:** [October 12, 2024, 2:16pm UTC](https://forums.percona.com/t/percona-backup-not-working-with-multiple-backup-policies/34024/4 "2024-10-12T14:16:51Z")

</div>

@Sergey_Pronin  
I have 3 pods replica set and in each one of them either I see configuration for “daily” or “hourly”  
and my assumption based on the docs is that there is some sort of election mechanism which updates the backup config based on their defined schedule.  
But I am lost after that.
