Backup config not initialized

pbm config --list fails with Error: get: mongo: no documents in result
Comparing to another cluster, I found that the admin.pbmConfig collection doesnt exist. I disabled backups, deployed, re-enabled backups and deployed again, but the operator didnt initialize pbm’s config.

1 Like

Hey @dmn ,

I assume you use an Operator to deploy the MongoDB cluster.
In that case, it makes me wonder why would you want to execute pbm config --list and where?

In other words, what is the problem that you are facing and why do you need to go that deep?

For me backups work flawlessly. Could you please share more details with me?
K8s flavor, operator version, cr manifest. Anything else you believe is relevant.

1 Like

Yes I used the operator. I’d get a shell in the backup-agent container to run pbm to check its state. I’ve written a backup state check script that runs as a k8s job, thats how I knew there was an issue after deploying this cluster.

I’ve set backup to false and completely removed the backup config in the k8s manifest and redeployed, watched the operator update the pods and remove the backup-agent containers, returned the backup config but still no pbmConfig collection created in admin. This means I cant run the first backup manually to get things going. Not sure how that collection gets provisioned as know in my first cluster I didnt have to do it myself. But in this case to get it working, I exported the one document out of pbmConfig(modifying it of course to match what I need in this cluster) and imported it. Now pbm works and I can kick off a backup, list them, etc.

There was an issue I caught with a typo in the name of the storage container name, but considering that completely removing the backup config from the k8s manifest didnt change anything, I’m not sure what caused the pbm config to not be generated.

Operator image: percona/percona-server-mongodb-operator:1.11.0

The backup config:

  enabled: true
  restartOnFailure: true
    repository: percona/percona-server-mongodb-operator
    tag: 1.11.0-backup
  serviceAccountName: percona-server-mongodb-operator
      cpu: 300m
      memory: 0.5G
      cpu: 300m
      memory: 0.5G
        type: azure
          container: xxxx
          prefix: psmdb
          credentialsSecret: yyyy
    enabled: true
    oplogSpanMin: 10
    - name: weekly-azure-blob
      enabled: true
      schedule: "0 0 * * 0"
      keep: 5
      storageName: azure-blob
      compressionType: gzip
1 Like

I’m wondering if there is an order of operations issue here? A difference between this cluster and the one with a working backup system was the backup config manifest was part of the initial deploy. In the working case, the backup config was added to the manifest after the cluster was deployed and working.

1 Like