expireAfterDays data age calculation
Parent: DATE Criteria · Published reference · snapshot 2026-10-15
↓ Facts as markdownall context files
Depth-first rabbithole dossier for expireAfterDays data age calculation; source-anchored research pack.
These notes link each claim to its source. Some citations identify archived research reports that are no longer hosted on this site. A published reference means the content is available; it does not certify independent review or accuracy.Read the editorial policy and follow the sources before relying on a claim.
How it works
- [high] The `expireAfterDays` parameter specifies the number of days used in the date criteria for nominating documents for deletion, and MongoDB Cloud archives the data when the current date exceeds the date in this database parameter plus the number of days specified through the `expireAfterDays` parameter. Sources: https://www.mongodb.com/docs/atlas/cli/current/command/atlas-clusters-onlineArchives-create.md, https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/docs/resources/online_archive.md, https://www.pulumi.com/registry/packages/mongodbatlas/api-docs/onlinea [source]
- [low] The clock for data expiration starts the second the data is archived, and the data remains in the archive for the number of days indicated in the expiration rule based on metadata stored about when the data was archived. Sources: https://www.mongodb.com/community/forums/t/online-archival-to-delete-documents/222323 [source]
- [low] Data expires from the cluster after the period of time set in the rule based on the date field in the time series collection, and then stays in the archive for the period specified in the expiration rule based on when it was written to the archive. Sources: https://www.mongodb.com/community/forums/t/online-archive-dates/226846 [source]
Problems, failure modes and limitations
- [low] To modify the number of days after which Atlas deletes archived data, you can enter or modify the number of days in the Deletion Age Limit section, specifying between 7 and 9125 days, or leave the field empty to disable the data expiration rule. Sources: https://www.mongodb.com/docs/atlas/online-archive/manage-online-archive.md [source]
Comparisons and alternatives
- [low] Atlas Online Archive data expiration is available as a Preview feature, and the 'Data Expiration' feature deletes data from the archive based on when the data was archived rather than a field inside the documents. (verified as of 2026-10-15) Sources: https://www.mongodb.com/community/forums/t/online-archival-to-delete-documents/222323 [source]
Facts and statements
- [medium] By default, Atlas does not delete archived data, but if a Data Retention Period is specified, Atlas deletes archived data after the number of days specified, which can be between 7 and 9125 days (25 years). Sources: https://www.mongodb.com/docs/atlas/online-archive/configure-online-archive-standard.md, https://www.mongodb.com/docs/atlas/online-archive/overview.md [source]
- [medium] The data expiration rule takes effect 24 hours after you set the Data Retention Period, and it takes 24 hours for changes to the number of days after which Atlas deletes archived data to take effect. Sources: https://www.mongodb.com/docs/atlas/online-archive/configure-online-archive-standard.md, https://www.mongodb.com/docs/atlas/online-archive/manage-online-archive.md [source]
- [low] Once data is deleted from the archive, there is no way to recover it, so you must define your rules carefully. Sources: https://www.mongodb.com/blog/post/enhancing-atlas-online-archive-data-expiration-scheduled-archiving [source]
- The maximum number of days for data expiration is stated as 9125 days in some sources and 9215 days in others. Sources: https://www.mongodb.com/docs/atlas/online-archive/configure-online-archive-standard.md, https://www.mongodb.com/docs/atlas/online-archive/overview.md, https://www.mongodb.com/docs/atlas/online-archive/manage-online-archive.md, https://www.mongodb.com/blog/post/enhancing-atlas-online-archive-data-expiration-scheduled-archiving, https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/docs/resources/online_archive.md, https://www.pulumi.com/registry/pack [source]
Related concepts
- data — is a part of expireAfterDays data age calculation
- expireAfterDays — is a part of expireAfterDays data age calculation
- age — is a part of expireAfterDays data age calculation
Children
- No children recorded.