Docs Menu
Docs Home
/ /

Back Up Your Atlas Cluster

Note

This feature is not available for any of the following deployments:

  • M0 clusters

  • M2/M5 clusters

  • Flex clusters

Note

Atlas deprecated M2 and M5 clusters and Serverless instances. As of January 2025, Atlas migrated all M2 and M5 clusters to Flex clusters. For Serverless instances, Atlas determined whether to migrate instances to Free clusters, Flex clusters, or Dedicated clusters according to usage, then migrated all Serverless instances automatically.

As of January 22, 2026, support for M2, M5, and Serverless instances ended. APIs related to these deprecated cluster types are no longer available, and only APIs for Flex clusters remain in place.

As of March 2025, private endpoints on Serverless instances are no longer supported. Remove all M2, M5, and Serverless instance features from your Atlas Kubernetes Operator configurations.

If your workloads require Private Endpoints or Continuous Backup, switch to Atlas Dedicated Clusters. To learn more, see Migration to Flex Clusters and the Atlas Flex Migration Guide.

Atlas Kubernetes Operator supports cloud backup for your Atlas clusters. Cloud backup uses the native snapshot capabilities of your cloud provider to support full-copy snapshots and localized snapshot storage.

To manage cloud backup with Atlas Kubernetes Operator, you can specify and update the following custom resources:

Custom Resource
Purpose

Defines the backup policy, including the frequency of backups and the length of snapshot retention.

Defines the backup schedule, including the time of day that Atlas backs up your database deployment, the number of days back in time to which you can restore, and the backup policy.

Defines the characteristics of a cluster. You must set the backupRef.name field to the name of the configured backup schedule to enable cloud backup for the cluster.

Additionally, to configure continuous backup, you must set pitEnabled to true.

Each time you change any of the supported custom resources, Atlas Kubernetes Operator creates or updates the corresponding Atlas configuration.

Review the following considerations:

  • You can specify one backup policy per backup schedule.

  • You can specify one backup schedule per cluster, but you can use the same backup schedule for multiple clusters.

  • Atlas determines the order of nodes to snapshot based on your cluster configuration. To learn more, see Cloud Backups.

  • Atlas Kubernetes Operator supports automatic snapshot distribution. You can configure this with the spec.copySetting field in the AtlasBackupSchedule Custom Resource.

Note

If you have a Backup Compliance Policy enabled, you can't modify the backup policy for an individual cluster below the minimum requirements set in the Backup Compliance Policy. You can modify the cluster-level backup policy at any time. Atlas augments any preexisting cluster-level policies to meet the minimum requirements of the Backup Compliance Policy. All new clusters use the Backup Compliance Policy. If you reduce the frequency of a backup schedule, the change applies only to future backups. Any existing oplog remains for the original window. The minimum requirements of the Backup Compliance Policy apply. You can configure extra snapshot retention. You can also view backup details for all M10+ dedicated clusters including deleted clusters with retained snapshots. To learn more, see View Backup Details for Dedicated Clusters.

Certain limitations apply to cloud backup. To learn more, see Back Up Your Cluster.

To enable cloud backup for your Atlas Kubernetes Operator-managed cluster, you must:

  • Have a running Kubernetes cluster with Atlas Kubernetes Operator deployed.

  • Ensure your IP address is in the organization's API access list.

Follow these steps to enable cloud backup for your Atlas Kubernetes Operator-managed clusters:

1

To learn more about the parameters for a backup policy, see AtlasBackupPolicy Custom Resource.

Example:

cat <<EOF | kubectl apply -f -
apiVersion: atlas.mongodb.com/v1
kind: AtlasBackupPolicy
metadata:
name: "atlas-default-backuppolicy"
spec:
items:
frequencyType: "weekly"
frequencyInterval: 1
retentionUnit: "days"
retentionValue: 7
EOF
2

In the spec.policy.name field, specify the metadata.name from the AtlasBackupPolicy Custom Resource to apply your backup policy.

To learn more about the other parameters for a backup schedule see AtlasBackupSchedule Custom Resource.

Example:

cat <<EOF | kubectl apply -f -
apiVersion: atlas.mongodb.com/v1
kind: AtlasBackupSchedule
metadata:
name: "atlas-default-backupschedule"
spec:
autoExportEnabled: true
copySettings:
- cloudProvider: AWS
frequencies:
- HOURLY
regionName: US_EAST_1
shouldCopyOplogs: true
referenceHourOfDay: 10
referenceMinuteOfHour: 10
restoreWindowDays: 2
policy:
name: atlas-default-backuppolicy
namespace: mongodb-atlas-system
EOF
3

In the spec.backupRef.name field of the AtlasDeployment Custom Resource, specify the metadata.name from the AtlasBackupSchedule Custom Resource to apply your backup schedule to the cluster.

Example:

cat <<EOF | kubectl apply -f -
apiVersion: atlas.mongodb.com/v1
kind: AtlasDeployment
metadata:
name: my-atlas-cluster
spec:
backupRef:
name: atlas-default-backupschedule
namespace: mongodb-atlas-system
EOF

Back

Atlas Stream Processing

On this page