Important
Feature unavailable in Flex Clusters and Serverless Instances
Flex clusters and Serverless instances don't support this feature at this time. To learn more, see Atlas Flex Limitations and Serverless Instance Limitations.
Atlas Online Archive is a feature designed to help organizations optimize their data storage and query costs by archiving infrequently accessed data from their MongoDB Atlas cluster to a cloud object storage. With Online Archive, you gain the ability to manage the lifecycle of your data, maintain a unified query experience across live and archived datasets, and reduce operational complexity while ensuring data remains accessible when needed.
Key Considerations for Using Online Archive
Consider the following requirements, expectations and limitations when using Atlas Online Archive.
Cluster Requirements
Online Archive in Atlas is available only on M10
and
greater clusters.
Required Permissions
To create or delete an Online Archive, you must have one of these roles:
Performance Expectations
Consider the following performance expectations when working with Online Archive:
Archival Jobs: MongoDB runs archival jobs periodically to move data from your cluster to cloud storage. These jobs operate asynchronously and are designed to minimize performance impact on your cluster.
Cluster Capacity: Archiving jobs consume cluster resources. Ensure your Atlas cluster has sufficient capacity to support both active workloads and archiving tasks to avoid resource constraints.
Query Performance: Archived data resides in read-optimized cloud object storage, which might have slower query performance compared to querying live data on your Atlas cluster.
Limitations
Online Archive doesn't support the following:
Writing to the Online Archive.
Configuring or administering the Online Archive federated database instance through the Atlas console, Atlas Data Federation CLI, or Atlas Data Federation API.
Archiving a capped collection.
Archiving data below the size of 5 MiB after 7 days. To learn more, see Limitations.
Deleting individual documents.
Online Archive & Atlas Data Federation
When you configure an Online Archive for a collection, Atlas uses Atlas Data Federation to create a read-only Federated Database Instance. This enables unified queries across both your live cluster and your archived data, using the same collection and database names.
You define archiving rules based on time fields or custom filters. Atlas evaluates these rules continuously and automatically transfers matching documents to a cloud object storage managed by Atlas (e.g., AWS S3, Azure Blob).
Data Federation Region | AWS Region | Atlas Region |
---|---|---|
Northern Virginia, USA |
|
|
Oregon, USA |
|
|
Sao Paulo, Brazil |
|
|
Ireland |
|
|
London, England, UK |
|
|
Frankfurt, Germany |
|
|
Tokyo, Japan |
|
|
Seoul, South Korea |
|
|
Mumbai, India |
|
|
Singapore |
|
|
Sydney, Australia |
|
|
Montreal, QC, Canada |
|
|
Important
Atlas encrypts your archived data using Amazon's server-side encryption S3-managed keys (SSE-S3) for archived data. Atlas can't use any encryption-at-rest encryption keys that you used on your cluster data.
Data Federation Region | Azure Region | Atlas Region |
---|---|---|
Virginia, USA |
|
|
Sao Paulo, Brazil |
|
|
Netherlands |
|
|
Important
Atlas encrypts your archived data using Azure Storage service-side encryption. Atlas can't use any encryption-at-rest encryption keys that you used on your cluster data.
Data Federation Region | Google Cloud Region | Atlas Region |
---|---|---|
Iowa, USA |
|
|
Belgium |
|
|
Important
Atlas encrypts your archived data using Google Cloud Storage service-side encryption. Atlas can't use any encryption-at-rest encryption keys that you used on your cluster data.
Atlas archives data based on the criteria you specify in an archiving rule. The criteria vary based on the type of collection you want to archive:
For standard collections, the criteria can be one of the following:
A combination of a date field to archive data and number of days to keep data on the Atlas cluster. When the current date exceeds the value of the specified date field, Atlas subtracts the number of days from the current time and then archives data after the time.
A custom query. Atlas runs the query specified in the archiving rule to select the documents to archive.
For time series collections, the criteria is a combination of a time field and number of days to keep data on the Atlas cluster. When the current time exceeds the value of the specified time field, Atlas subtracts the number of days from the current time and then archives data after that many days, hours, and minutes.
When you configure an Online Archive on your cluster, Atlas creates two federated database instances:
Federated Database Instance for your archive that allows you to query data on your archive only.
Federated Database Instance for your cluster and archive that allows you to query both your cluster and archived data.
Use Cases
You can use Online Archive to reduce storage costs and manage cold data while preserving access through queries. Typical use cases include:
Large-scale historical datasets: Your cluster stores high volumes of data, such as logs, metrics, or transaction records, and you need to reduce operational storage costs without deleting data. Online Archive helps by relocating cold data to a cheaper cloud object storage while keeping it accessible via queries.
Time series archiving: Your application ingests high-frequency time series data from sources like IoT devices, industrial sensors, or financial systems. Online Archive allows you to retain this data for compliance, auditing, or analytics while minimizing impact on your cluster’s performance.
Cold operational data: You manage application data (e.g., order histories, completed service requests, old invoices) that is rarely accessed after a certain age but must be retained for reference or regulatory requirements.
Long-term customer records: Your system retains archived customer profiles, subscription history, or user activity logs for legal retention periods or post-analysis, but these documents no longer require frequent access.
Compliance and audit: Your organization must retain data for regulatory or audit purposes (e.g., financial transactions, medical logs, access logs). Archiving enables cost-effective long-term storage without modifying your query interface.
Archiving for analytics: You archive data that’s not required for day-to-day operations but is occasionally analyzed for trends, reports, or forecasting—without adding overhead to your primary cluster.
Online Archive helps isolate cold data from hot workloads while maintaining a unified interface to both. This enables operational efficiency, cost savings, and retention compliance—all without application changes.
Next Steps
For a hands-on experience you can create an Online Archive for a collection on your cluster through your Atlas console and API. Once created, you can: