Export MongoDB Atlas snapshot to S3

I’m trying to export mongoDB atlas snapshot to S3, but not able to apply a export policy for automating the export but if i did for a single snapshot via API and I found that the export was so granular that i have a json.gz for each database and for each collection in the database, which i think its way too complex to restore.
Is there something i’m doing wrong with the export or it is expected to be this granular only ?
I’m using the following API to export a single snapshot to S3

curl --user "<public-key>:<private-key>" --digest \
     --header "Accept: application/json" \
     --header "Content-Type: application/json" \
     --include \
     --request POST "https://cloud.mongodb.com/api/atlas/v1.0/groups/<GROUP-ID>/clusters/<CLUSTER-NAME>/backup/exports/" \
     --data '{
              "snapshotId" : "<snapshotId>",
                "exportBucketId" : "<exportBucketId>"
            }'
1 Like

+1
Still cannot see any options to apply an export policy. Were you able to figure out something?

Hope it can help
As I understand, you need to patch the backup schedule and set autoExportEnabled to true and exportBucketId

curl --user "<public-key>:<private-key>" --digest \
     --header "Accept: application/json" \
     --header "Content-Type: application/json" \
     --include \
     --request PATCH "https://cloud.mongodb.com/api/atlas/v1.0/groups/<GROUP-ID>/clusters/<CLUSTER-NAME>/backup/schedule/" \
     --data '{
              "autoExportEnabled" : true,
              "export" : {
                "exportBucketId" : "<exportBucketId>",
                "frequencyType": "monthly"
             }
            }'

See https://www.mongodb.com/docs/atlas/backup/cloud-backup/export/