Back to Checks
mongodbatlas

Cluster has backup enabled

clusters_backup_enabled
Service: clustersSeverity: high
OfficialBuilt-inVerified
Categories:resilience
Resource Type:NotDefined

MongoDB Atlas clusters have automated backups enabled (cloudBackup/backup_enabled) to generate snapshots and support restore operations

Risk

Without backups, deleted or corrupted records are irrecoverable, undermining integrity. Failures or bad deployments can cause prolonged unavailability with no restore path. Lacking point-in-time recovery prevents precise rollbacks, amplifying the blast radius of mistakes or ransomware.

Run this check with Prowler

Run in Prowler Cloud
Run
prowler mongodbatlas --checks clusters_backup_enabled

Recommendation

Enable Cloud Backups on all production clusters and define backup schedules and retention that meet business RPO/RTO. For critical data, enable point-in-time recovery. Apply least privilege and separation of duties to backup access, protect against deletion with policy, monitor backup health, and perform regular test restores.

Remediation

CLI

curl -sS -u "<PUBLIC_KEY>:<PRIVATE_KEY>" --digest -H "Content-Type: application/json" -X PATCH "https://cloud.mongodb.com/api/atlas/v1.0/groups/<PROJECT_ID>/clusters/<CLUSTER_NAME>" --data '{"cloudBackup":true}'

Terraform

resource "mongodbatlas_cluster" "<example_resource_name>" {
  project_id = "<example_resource_id>"
  name       = "<example_resource_name>"

  cloud_backup = true  # Critical: enables Cloud Backups so the check passes
}

Other

1Sign in to MongoDB Atlas and open your project
2Go to Database > Clusters
3For the target cluster, click the three dots (...) > Edit Configuration
4Under Additional Settings, toggle Cloud Backup to On
5Click Save Changes

Check Code

from typing import List

from prowler.lib.check.models import Check, CheckReportMongoDBAtlas
from prowler.providers.mongodbatlas.services.clusters.clusters_client import (
    clusters_client,
)


class clusters_backup_enabled(Check):
    """Check if MongoDB Atlas clusters have backup enabled

    This class verifies that MongoDB Atlas clusters have backup enabled
    to protect against data loss.
    """

    def execute(self) -> List[CheckReportMongoDBAtlas]:
        """Execute the MongoDB Atlas cluster backup enabled check

        Iterates over all clusters and checks if they have backup
        enabled (backupEnabled=true).

        Returns:
            List[CheckReportMongoDBAtlas]: A list of reports for each cluster
        """
        findings = []

        for cluster in clusters_client.clusters.values():
            report = CheckReportMongoDBAtlas(metadata=self.metadata(), resource=cluster)

            if cluster.backup_enabled:
                report.status = "PASS"
                report.status_extended = (
                    f"Cluster {cluster.name} in project {cluster.project_name} "
                    f"has backup enabled."
                )
            else:
                report.status = "FAIL"
                report.status_extended = (
                    f"Cluster {cluster.name} in project {cluster.project_name} "
                    f"does not have backup enabled."
                )

            findings.append(report)

        return findings