For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.

Back Up, Restore, and Archive Data

Note

This page applies to both Atlas Core clusters and Atlas Infinite clusters. During public preview, Atlas Infinite clusters don't support some backup and restore features. To learn more about feature availability on Atlas Infinite, see Public Preview Availability.

On Atlas, a backup is a copy of your cluster's data that represents the state of your cluster at a specific point in time. You can create and retain backups of an Atlas cluster to restore in case of unexpected events, such as accidental deletions or data corruption.

This page is an overview of the backup, restore, and archive options available for Atlas clusters.

Note

The MongoDB Atlas Shared Responsibility Model defines the complementary duties of MongoDB and its customers in maintaining a secure and resilient data environment. Under this framework, MongoDB manages the security and operational integrity of the underlying platform, while customers are responsible for the configuration, management, and data policies of their specific deployments. For a detailed breakdown of ownership across security and operational excellence, see Shared Responsibility Model.

You can back up your Atlas cluster using Atlas-managed backup features, such as Cloud Backup, or manual backups with MongoDB Database Tools:

Atlas offers different backup features depending on your cluster tier. When the backup feature is enabled, Atlas manages the full lifecycle of your backups, including creating, storing, and deleting snapshots after a defined retention period.

The following table describes the Atlas-managed backup features available for each cluster tier:

Cluster Tier
Backup Feature
Learn More

Free clusters (M0)

Free Cluster Backup is an optional, billed backup subscription that you can enable for Free clusters. This feature is available only as a private preview. Atlas rolls out the preview gradually, so the option might not be available for your cluster.

When you enable the subscription, Atlas takes daily snapshots of your cluster and retains each snapshot for up to four days.

Flex clusters

Flex Cluster Backup is the automatic snapshot schedule that you cannot disable for Flex clusters. Atlas takes daily snapshots and retains each snapshot for up to eight days. Atlas starts taking snapshots 24 hours after you create the Flex cluster.

Dedicated clusters (M10 and larger)

Cloud Backup is the default backup option for Dedicated clusters. Atlas takes scheduled or on-demand snapshots of your cluster according to your backup policy. You can disable Cloud Backup or enable additional options to control how Atlas manages snapshots.

You can download a snapshot as a compressed file to keep a copy outside of Atlas. To learn more, see Restore from a Locally-Downloaded Snapshot.

Cloud Backup is the default backup option for Dedicated clusters (M10 and larger). Cloud Backup uses your cloud provider's native snapshot functionality to create and store full-copy snapshots of your cluster. These snapshots are always incremental in nature for low cost and fast restores. To control when Atlas takes snapshots, you can define a backup policy or take snapshots on-demand.

You can enable or disable Cloud Backup in your cluster's additional settings. In these settings, you can also configure the following options to control how Atlas manages Cloud Backup snapshots:

Cloud Backup Option
Description
Learn More

Continuous Cloud Backup

Storing your cluster's oplog alongside your snapshots to enable PIT restores. During a PIT restore, Atlas replays the oplog to restore your cluster to any point in time between snapshots, within the restore window that you set.

On Atlas Infinite clusters, Continuous Cloud Backup is always enabled and you can't disable it. On Atlas Core clusters, you can enable Continuous Cloud Backup for an additional cost.

Snapshot Copy Distribution to Additional Regions

Stores copies of your snapshots in additional cloud provider regions, based on a snapshot copy policy that you define. Copied snapshots improve resiliency and restore speeds if your primary region becomes unavailable.

Not supported for Atlas Infinite clusters in public preview.

Backup Compliance Policy

Prevents all users from deleting backups or altering their retention settings. To disable a Backup Compliance Policy, you must contact MongoDB Support.

Export to Cloud Provider Storage

Exports your snapshots to an object storage bucket, either manually or automatically based on an export policy. Atlas supports AWS S3, Azure Blob Storage, and Google Cloud Storage.

To manually back up cluster data, you can install the following MongoDB Database Tools and run them outside of Atlas. These tools create backups that aren't snapshots, and Atlas doesn't schedule, store, or retain them for you. To learn more, see the MongoDB Database Tools documentation.

MongoDB Database Tool
Description
Learn More

mongodump

Use mongodump to create a binary export of the data in your cluster. Use mongorestore to restore that data to an Atlas cluster. These tools work with BSON data dumps and are useful for backing up small deployments.

mongoexport

Use mongoexport to export data from a collection to a file. Use mongoimport to import data from a file into a collection. These tools export and import the data in a collection.

Free clusters and Flex clusters don't support some options of these tools. To learn more, see Connect to a Cluster via Command Line Tools.

You can restore data to an Atlas cluster from the following sources:

Restore Source
Restore Option
Learn More

Scheduled or On-Demand Snapshots from Cloud Backup, Free Cluster Backup, or Flex Cluster Backup

Restore a snapshot to a cluster in the same or a different project using the Atlas CLI, Atlas Administration API, or Atlas UI.

To restore individual databases and collections from a snapshot, both the source and target cluster must be Dedicated clusters. If either cluster is a Free cluster or Flex cluster, Atlas restores only the full cluster. Restore restrictions differ by cluster tier.

Scheduled or On-Demand Snapshots from Cloud Backup with Continuous Cloud Backup enabled

Perform a PIT restore from the Atlas CLI, Atlas Administration API, or Atlas UI. You can choose to restore individual databases and collections or the full cluster.

Locally Downloaded Snapshot Files

Extract the locally downloaded archive using your preferred archive utility, then start a mongod instance that uses the extracted data files. You cannot import a downloaded snapshot back into an Atlas cluster through the Atlas UI. Atlas Infinite clusters do not support downloading snapshots or restoring from local files.

Snapshots Exported to Cloud Provider Storage

Import a snapshot that you exported to S3, Azure Blob Storage, or Google Cloud Storage back into an Atlas cluster by using your cloud provider's CLI, mongoimport, and mongorestore. You also rebuild your indexes as part of the procedure.

Encrypted Snapshots

Restore a snapshot from a Dedicated cluster that uses Encryption at Rest using Customer Key Management to another Dedicated cluster that uses the same key management provider. Initiate the restore from the Atlas UI.

Cloud Manager Backup

Restore a Cloud Manager backup to an Atlas deployment using the Cloud Manager UI.

Backups Created with MongoDB Database Tools

Use mongorestore to restore data from a mongodump backup. Use mongoimport to import data from a file that you created with mongoexport.

Online Archive (cloud provider storage)

Restore specific archived documents to your cluster by using the $merge stage. Flex clusters do not support Online Archive.

Online Archive tiers your data. It archives infrequently accessed data from your cluster to cloud object storage and keeps it available for queries alongside your live data. Online Archive doesn't replace backups, so continue to back up your cluster.

Online Archive is available only for Dedicated clusters (M10 and larger) on Atlas Core.

To learn how to set up and manage Online Archive, see Online Archive Overview and Limitations. To restore archived documents, see Restore Specific Documents from Online Archive.