<!-- llms-explorer concept facts · https://llms-explorer.com/tree/mongodb-atlas-online-archive/ · pack 2026-09-08 · ~3943 tokens -->

# MongoDB Atlas Online Archive

> Online Archive automatically moves documents matching an archival rule out of the live Atlas cluster into Atlas-managed object storage, while keeping those documents queryable through the cluster's FD

Parent: [MongoDB Atlas](https://llms-explorer.com/tree/mongodb-atlas/) · 19 facets · 65 facts · page: https://llms-explorer.com/tree/mongodb-atlas-online-archive/

## Overview

- Online Archive automatically moves documents matching an archival rule out of the live Atlas cluster into Atlas-managed object storage, while keeping those documents queryable through the cluster's FDI endpoint (transparent to the application). — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#overview)

## Requirements

- Dedicated cluster M10+ (not available on M0/Flex/Serverless) — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#requirements)
- MongoDB 5.0+ on the source cluster — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#requirements)

## DATE (most common)

- dateFormat options: "ISODATE" (default ISODate), "EPOCH_MILLISECONDS", "EPOCH_SECONDS" — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#date-most-common)

## Partition Fields Strategy

- Partition fields organize archived data into S3 prefix paths for efficient filtering. Critical for query performance. Choose fields commonly used in query filters: — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#partition-fields-strategy)
  - Maximum 2 partition fields per archive rule — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#partition-fields-strategy)
  - First field MUST match the dateField (for DATE criteria) or be the most selective filter field (for CUSTOM criteria) — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#partition-fields-strategy)
  - Order matters: highest-selectivity filter field should be first — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#partition-fields-strategy)
  - Supported partition pruning operators: $eq, $gt, $lt, $gte, $lte, $ne, $in — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#partition-fields-strategy)
  - Fields NOT in partitionFields trigger full archive scan when queried — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#partition-fields-strategy)

## Archive Job Timing & Processing

- Runs every 5 minutes — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#archive-job-timing-processing)
- Max throughput: 2 GB per 5-minute interval — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#archive-job-timing-processing)
- Max file size: 100 MB per archive file — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#archive-job-timing-processing)
- Documents deleted from live cluster AFTER successful write to object storage — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#archive-job-timing-processing)
- Schedule window: Archive jobs can be limited to off-hours to reduce production impact — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#archive-job-timing-processing)

## Query Routing

- When querying via the cluster's FDI endpoint: — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#query-routing)
  - Recent data → live cluster (fast, indexed) — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#query-routing)
  - Archived data → Online Archive object storage (slower, partition-based) — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#query-routing)
  - Combined queries → both, results merged transparently — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#query-routing)
- Applications do not need to change query patterns after data is archived - same connection string, same MQL. — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#query-routing)

## Cost Model

- $5/TB cost applies when QUERYING archived data. Storage itself is much cheaper than cluster storage (NVMe/GP3). — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#cost-model)
- Minimum: 10 MB per archive query (no benefit from very small queries). — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#cost-model)

## Restore / Rehydration

- Archive data is immutable (append-only). To restore to the live cluster: — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#restore-rehydration)

## Limitations

- No updates/deletes on archived data: Archive is immutable object storage; updateMany or deleteMany against archived documents will not affect them — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#limitations)
- No Atlas Search on archived data: Full-text $search doesn't work on archived data — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#limitations)
- No indexes on archived data: All archived queries use partition pruning only — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#limitations)
- $sample not random: Returns first N documents, not a statistical random sample — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#limitations)
- No transactions crossing live+archive: Cannot span a transaction across live and archived documents — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#limitations)
- Maximum query timeout: 6 hours (inherits from Data Federation limit) — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#limitations)

## Archive Not Moving Data

- Check Atlas → Online Archive → [collection] → Activity tab for job status and errors — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#archive-not-moving-data)
- Verify dateField name is exact (case-sensitive) and matches documents — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#archive-not-moving-data)
- Confirm correct dateFormat - ISODATE requires actual ISODate values, not Unix epoch integers — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#archive-not-moving-data)
- Confirm cluster tier is M10+ and MongoDB version 5.0+ — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#archive-not-moving-data)

## Archive Backlog Growing

- Archive jobs process 2 GB per 5-minute window — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#archive-backlog-growing)
- If data accumulates faster than 2 GB/5 minutes, backlog will grow — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#archive-backlog-growing)
- Mitigation: narrow the archive rule to reduce concurrent archiving volume, or contact MongoDB for higher throughput — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#archive-backlog-growing)

## Slow Archive Queries

- Partition fields not aligned with query filter → full archive scan — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#slow-archive-queries)
- Check partitionFields match the most common query filter fields — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#slow-archive-queries)
- Run explain() on the FDI endpoint to check nPartitionsScanned — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#slow-archive-queries)

## MACC / Cost Tracking

- Archive storage costs appear on the Atlas invoice under Tools & Services → Online Archive. Query processing costs under Data Federation. Monitor in Atlas Billing → Current Invoice. — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#macc-cost-tracking)

## Anti-Patterns

- Choosing partition fields that don't match query patterns: Full archive scan on every query → high $5/TB cost — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#anti-patterns)
- Using CUSTOM criteria without an index on the filter field: Archive job itself will do slow scans to find matching documents - add an index on filter fields — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#anti-patterns)
- Querying archived data without partition-aligned filters: Always include a partition field in $match when querying archive — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#anti-patterns)
- Expecting consistency between live and archive: Documents are copied to archive and then deleted from live - there is no transactional guarantee between the two — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#anti-patterns)
- Using Online Archive as a backup system: Archive only stores the final document state at archival time - not a substitute for backup snapshots with PITR — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#anti-patterns)

## References

- Online Archive Documentation — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#references)
- Configure an Online Archive — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#references)
- Query Archived Data — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#references)
- Online Archive Billing — [source](https://llms-explorer.com/sources/mdb-context-hub/mongodb-atlas-online-archive/#references)

## Where this helps

- Reducing live-cluster storage cost for time-based data, such as event logs or historical orders, that's rarely queried after a certain age, without changing application query patterns. — [source](https://llms-explorer.com/tree/mongodb-atlas-online-archive/) *(AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.)*
- Meeting a data-retention requirement where old data must remain queryable but doesn't need to sit on expensive cluster storage. — [source](https://llms-explorer.com/tree/mongodb-atlas-online-archive/) *(AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.)*
- Designing partition fields so archived-data queries stay fast instead of triggering a full archive scan. — [source](https://llms-explorer.com/tree/mongodb-atlas-online-archive/) *(AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.)*
- Deciding Online Archive is the wrong tool because the use case actually needs a real backup with PITR, not an archive. — [source](https://llms-explorer.com/tree/mongodb-atlas-online-archive/) *(AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.)*

## Project ideas

- Configure an Online Archive rule on a DATE field with well-chosen partition fields matching the most common query filter, then run explain() on the FDI endpoint to check nPartitionsScanned. — [source](https://llms-explorer.com/tree/mongodb-atlas-online-archive/) *(AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.)*
- Build a query-routing test that confirms combined live+archive queries return merged results through the same connection string and MQL the application already uses. — [source](https://llms-explorer.com/tree/mongodb-atlas-online-archive/) *(AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.)*
- Set up a CUSTOM-criteria archive rule with a supporting index on the filter field, and compare archive job throughput against a DATE-based rule. — [source](https://llms-explorer.com/tree/mongodb-atlas-online-archive/) *(AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.)*
- Build a cost dashboard tracking the $5/TB archived-data query charge separately from Online Archive storage cost, using the Atlas Billing Dashboard. — [source](https://llms-explorer.com/tree/mongodb-atlas-online-archive/) *(AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.)*

## Common mistakes

- Choosing partition fields that don't match actual query filters, forcing a full archive scan, and the associated $5/TB cost, on every query. — [source](https://llms-explorer.com/tree/mongodb-atlas-online-archive/) *(AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.)*
- Using CUSTOM archive criteria without an index on the filter field, which makes the archive job itself do slow scans to find matching documents. — [source](https://llms-explorer.com/tree/mongodb-atlas-online-archive/) *(AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.)*
- Assuming transactional consistency between live and archived data — documents are copied to archive storage and then deleted from the live cluster, with no transactional guarantee linking the two. — [source](https://llms-explorer.com/tree/mongodb-atlas-online-archive/) *(AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.)*
- Treating Online Archive as a backup — it only stores the final document state at archival time, so it's not a substitute for PITR-backed snapshots. — [source](https://llms-explorer.com/tree/mongodb-atlas-online-archive/) *(AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.)*

## Known issues

- Archived data is immutable — updateMany or deleteMany against archived documents has no effect, and there is no in-place update path. — [source](https://llms-explorer.com/tree/mongodb-atlas-online-archive/) *(AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.)*
- There is no Atlas Search or index support on archived data; all archived queries rely purely on partition pruning. — [source](https://llms-explorer.com/tree/mongodb-atlas-online-archive/) *(AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.)*
- $sample against archived data is not a true random sample — it returns the first N documents rather than a statistically random selection. — [source](https://llms-explorer.com/tree/mongodb-atlas-online-archive/) *(AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.)*
- Archive job throughput is capped at 2 GB per 5-minute interval, so a source collection generating archival-eligible data faster than that will build a growing backlog. — [source](https://llms-explorer.com/tree/mongodb-atlas-online-archive/) *(AI-suggested, synthesized from this pack's existing facts — not extracted from a source document.)*

## Context files

- [MongoDB Atlas Online Archive](https://llms-explorer.com/downloads/sources/mdb-context-hub/mongodb-atlas-online-archive.md)
