Skip to main content

Data Archival

Archive documents for long-term storage without impacting performance.

RavenDB’s Data Archival feature is ideal for keeping historical documents while seamlessly excluding them from your active dataset. Archiving lets you retain documents for as long as needed without bloating indexes or slowing queries, keeping your active dataset small and efficient.

Once a document is archived:

  • Storage is optimized: Documents are compressed to reduce disk usage.
  • Performance is preserved: Documents are excluded from indexes and subscriptions by default.
  • Data remains accessible: Documents remain fully retrievable and can be unarchived at any time.

Your active dataset stays lean, queries run faster, and indexes remain smaller - while you can still load any archived document whenever you need it.

Use cases

  • Keep your active dataset lean while preserving older records.
  • Archive completed orders, outdated logs, or past events that rarely need to be queried.
  • Retain regulatory or audit data for long-term storage without impacting day-to-day database performance.

Technical documentation

Refer to the technical documentation to learn how to enable the data archival feature, schedule individual documents for archiving, understand what is (and isn't) archived, discover how to unarchive documents, and see how other RavenDB features behave when working with archived data.

Data archival overview

Learn the basic concepts of RavenDB data archival.

Schedule document archiving

Learn how to schedule documents for archiving.

Learn more: In-depth articles

External

Employing Data Archival guide

Learn how to manage growing datasets and maintain peak query performance by configuring RavenDB to automatically archive older documents, keeping your indexes fast and lightweight.

External

Indexing only recent data - adventures with large datasets & archiving

Explore a real-world scenario on the challenges of indexing large datasets. Discover why filtering indexes by date is an anti-pattern and how RavenDB's built-in Data Archival solves it.

In this article