Can I put bucket path instead of bucket name in backup

Hi, I have deployed Percona Server for MongoDB on Kubernetes and am using the following code for backups. However, I’m encountering an error during the backup process when i am giving bucket path. When I use a simple bucket name like mongodb-backup, the backup works fine.

Is it possible to specify a bucket path instead of just the bucket name? If so, could you provide an example of how to configure it correctly?

storages:
      mongo-daily-backup:
        s3:
          bucket: devops/integration/mongodb/mongo-daily-backup
          credentialsSecret: mongodb-mongo-db-secrets-c8b7f20e
          endpointUrl: https://4b949bcf987231b504ca149.r2.cloudflarestorage.com
          region: us-east-1
        type: s3```

Hello @Aditya1523

I don’t know if this can help you but I had an identical problem to yours at the beginning. I gave:

  • endpointUrl in the format https://xxxx-mongo-backup-logical.s3.fr-par.xxx.xxxx
  • bucket in the format directory/xxx/yyyy

Afterwards I understood that it was necessary to do :

  • endpointUrl different https://s3.fr-par.xxx.xxxx
  • bucket in the format xxxxx-mongo-backup-logical

In the end here is the format that currently works :

...
  storages:
    s3-xxx-fr-par-logical:
      type: s3
      s3:
        region: "fr-par"
        bucket: "xxxx-mongo-backup-logical"
        endpointUrl: "https://s3.fr-par.xxx.xxxx"
        credentialsSecret: pbm-mongo-backup-s3
        uploadPartSize: 268435456
...

Note that: bucket for me is a name/ID of bucket, but not a name of directory in bucket
And after in my bucket i have backup by date is directory :

Hi, you can use the prefix option of the crd to specify the path inside the bucket.