# Automaic backup not being initiated

**URL:** <https://forums.percona.com/t/automaic-backup-not-being-initiated/28002>\
**Category:** Percona Operator for MongoDB\
**Tags:** percona, mongodb\
**Created:** [January 24, 2024, 7:49pm UTC](https://forums.percona.com/t/automaic-backup-not-being-initiated/28002 "2024-01-24T19:49:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vatsal\_Sharma](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vatsal_sharma/32/14840_2.png) [@Vatsal\_Sharma](https://forums.percona.com/u/Vatsal_Sharma)\
**Post date:** [January 24, 2024, 7:49pm UTC](https://forums.percona.com/t/automaic-backup-not-being-initiated/28002/1 "2024-01-24T19:49:15Z")

</div>

## Description:

I tried scheduling a backup using the psmdb operator and the db works fine but the backup is not scheduled at the given time.

## Steps to Reproduce:

here is the backup part in my yaml →

```auto
backup:
  enabled: true
  image:
    repository: percona/percona-backup-mongodb
    tag: 2.0.4
  serviceAccountName: percona-server-mongodb-operator
  annotations:
     iam.amazonaws.com/role: arn:aws:iam::645193536862:role/percona-eks-role
# resources:
# limits:
# cpu: "300m"
# memory: "0.5G"
# requests:
# cpu: "300m"
# memory: "0.5G"
  storages:
     backupstorage:
       type: s3
       s3:
         bucket: "postgreseks"
         credentialsSecret: percona-backup-secret
         region: ap-south-1
         prefix: "perconabackup"
# uploadPartSize: 10485760
# maxUploadParts: 10000
         storageClass: STANDARD
         insecureSkipTLSVerify: true
# minio:
    # type: s3
    # s3:
    # bucket: MINIO-BACKUP-BUCKET-NAME-HERE
    # region: us-east-1
    # credentialsSecret: my-cluster-name-backup-minio
    # endpointUrl: http://minio.psmdb.svc.cluster.local:9000/minio/
    # prefix: ""
    # azure-blob:
    # type: azure
    # azure:
    # container: CONTAINER-NAME
    # prefix: PREFIX-NAME
    # credentialsSecret: SECRET-NAME
  pitr:
    enabled: false
# oplogSpanMin: 10
# compressionType: gzip
# compressionLevel: 6
  tasks:
   - name: mongobackup
     enabled: true
     schedule: "0 1 * * *"
     keep: 3
     storageName: backupstorage
     compressionType: gzip
     type: logical

```

Also else everything in the db works fine, and this service account used here has all the permissions.But still the backup is not being scheduled on the mentioned time i.e. 1:00 am. I have used helm to deploy this percona mongodb operator

## Version:

[Insert the version number of the software]

## Logs:

[If applicable, include any relevant log files or error messages]

## Expected Result:

[What the user expected to see or happen before the issue occurred]

## Actual Result:

[What actually happened when the user encountered the issue]

## Additional Information:

[Include any additional information that could be helpful to diagnose the issue, such as browser or device information]

---

<div class="post-metadata">

**Author:** ![kyeongjun.me](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/kyeongjun.me/32/14426_2.png) [@kyeongjun.me](https://forums.percona.com/u/kyeongjun.me)\
**Post date:** [January 25, 2024, 2:09am UTC](https://forums.percona.com/t/automaic-backup-not-being-initiated/28002/2 "2024-01-25T02:09:08Z")

</div>

Can you see “add new job” log in operator logs?  
If backup job added, successfuly operator log is shown liek below (my operator log)

```auto
2023-12-08T12:18:42.798Z INFO add new job {"controller": "psmdb-controller", "object": {"name":"mongodb-psmdb-db","namespace":"mongodb"}, "namespace": "mongodb", "name": "mongodb-psmdb-db", "reconcileID": "d6afe26a-7591-4940-869a-935e181fe964", "name": "ensure-version/mongodb/mongodb-psmdb-db", "schedule": "0 2 * * *"}

```

And my values.yaml file. I’m not using serviceAccount and RBAC (aws arn annotation, like you. It was not working for me.)

```auto
backup:
  enabled: true
  image:
    repository: percona/percona-backup-mongodb
    tag: 2.3.1
  resources:
    limits:
      cpu: "600m"
      memory: "1G"
    requests:
      cpu: "300m"
      memory: "0.5G"
  storages:
    s3-percona-mongodb-backup:
      type: s3
      s3:
        region: ap-northeast-2
        bucket: percona-mongodb-backup
        prefix: "prefix"
        credentialsSecret: mongodb-secrets-backup
  pitr:
    enabled: true
    oplogOnly: true
    oplogSpanMin: 10
    compressionType: gzip
  tasks:
  - name: daily-s3-backup-physical
    enabled: false
    schedule: "*/10 * * * *"
    keep: 3
    storageName: s3-percona-mongodb-backup
    type: physical
    compressionType: gzip

```

In addition, intent may effect

```auto
// yours
  storages:
     backupstorage:
       type: s3
       s3:

// intent with two
  storages:
    backupstorage:
      type: s3
        s3:

```

---

<div class="post-metadata">

**Author:** ![Vatsal\_Sharma](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vatsal_sharma/32/14840_2.png) [@Vatsal\_Sharma](https://forums.percona.com/u/Vatsal_Sharma)\
**Post date:** [February 8, 2024, 9:11pm UTC](https://forums.percona.com/t/automaic-backup-not-being-initiated/28002/3 "2024-02-08T21:11:51Z")

</div>

Thanks for the help, but I was actually checking it in my cronjob rather it started auttomatically as psmdb-backup, so it works fine for me
