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.
Docs Menu

Restore from Selected Databases and Collections

Atlas lets you restore data from selected databases or collections from Scheduled or On-Demand Snapshots and Continuous Cloud Backups.

Note

This page applies to Atlas Core only. To learn about Atlas Infinite restores, see Restore an Atlas Infinite Cluster.

Atlas supports restoring from selected databases or collections captured by a given backup. This restore model enables the following:

  • Selectively restoring tenants in a multi-tenant database architecture where each database or collection maps to a specific tenant.

  • Targeted recovery of essential data

  • Selection of specific collections for analytics

Important

Collection- and Database-Level Restore jobs are not intended to reduce RTO and can take longer than full cluster restore jobs.

Atlas supports two write strategies for Collection- and Database-Level Restore jobs. Choose the one best suited to your use case:

  • Create as new appends the selected databases or collections to the existing data on the target cluster. If a selected database or collection has the same name as one on the target cluster, Atlas renames them to avoid conflict.

  • Overwrite existing overwrites all selected databases or collections with matching names that already exist on the target cluster. Any writes you make to these databases or collections during the restore job will be lost.

Restoring selected databases or collections temporarily increases disk usage. Atlas blocks restore jobs from starting if there isn't enough disk space available. Consider scaling up cluster storage before starting a restore job.

  • If disk auto-scaling is enabled, Atlas scales up storage automatically as needed, then restarts in-progress collection restores.

  • If disk auto-scaling is disabled, the restore job fails and rolls back if disk usage reaches 95%.

If one or more databases or collections fail to restore during a collection- and database-level restore operation, the entire operation fails.

Collection- and Database-Level Restore jobs have the following limitations:

  • Collection- and Database-Level Restore doesn't restore MongoDB Search indexes. You must manually rebuild MongoDB Search indexes after restore.

  • Atlas doesn't support restoring individual time-series collections.

  • Atlas doesn't support restoring individual queryable encryption collections.

  • Atlas doesn't support views for collection- and database-level restore jobs.

  • You can't run multiple collection- and database-level restore jobs concurrently. You must wait for a running collection- and database-level restore job to finish before initiating another.

  • Atlas doesn't support collection- and database-level restore on NVMe clusters.

  • Atlas doesn't support restoring snapshots from clusters with IP-restricted Encryption at Rest enabled unless you have a private endpoint configured.

  • During a collection- and database-level restore job, Atlas transfers data over the public Internet even if you have private endpoints configured.

  • You can't perform collection- and database-level restore with fallback snapshots.

  • You can specify up to 100 databases and 100 collections per collection- and database-level restore request. Selecting a database restores all its collections without counting them against the 100 collection limit. This limit applies only to namespaces explicitly listed in the request body.

To monitor a backup restore job until it completes, you must have Project Read Only access or higher to the specific project.

To start a restore job, you must have Project Backup Recovery Operator, Project Backup Manager, or Project Owner access to the project.

For cross-organization or cross-project restores, the required permissions apply to both the source and target projects. You must have the necessary permissions: Project Backup Manager or Project Owner in both projects to initiate or manage such restore operations.

The Atlas Administration API provides endpoints for restoring selected databases or collections from a snapshot.

The Atlas Administration API provides endpoints for restoring selected databases or collections from a snapshot.

1
  1. If it's not already displayed, select the organization that contains your project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your project from the Projects menu in the navigation bar.

  3. In the sidebar, click Backup under the Database heading.

    The Backup details display.

  4. Click the cluster link.

2

In the Actions column, expand the Actions menu, and click Restore for the snapshot that you want to restore.

3

In the Source Details pane, select Restore database(s)/collection(s).

Under the Write Strategy heading, select the write strategy suitable for your use case. To learn more, see Collection- and Database-Level Restore Considerations.

4

Under the Select Restore Data heading, first choose your preferred entry method.

If you select Checkbox Entry, Atlas displays a list of all databases captured by the snapshot. Each database entry includes a collapsible list of all of its collections to enable collection-level restore.

If you select List Entry, Atlas displays a text entry field in which you provide the names of the databases or collections you want to restore. Enter each name on its own line. Enter databases by their names, enter collections in the database.collection name format.

Click Continue.

5

In the Destination pane, select the project that hosts the restore target cluster from the Destination Project dropdown.

Select the restore target cluster from the Destination Cluster dropdown.

The source project and cluster of the snapshot appears with the Source label.

If you use the Add as new write strategy and any of your selected databases or collections have the same names as databases or collections already on the destination cluster, Atlas renames these by appending a suffix to each database or collection.

You can also optionally rename databases or collections under the Rename database(s)/collection(s) heading. You can either rename specific databases or collections individually, or batch-rename them by clicking Add a suffix to all source names and entering a suffix into the prompt.

6

In the Restore Details pane, select the set of indexes you want to restore as part of the restore job from the Indexes dropdown menu.

Click Continue.

7

Verify that the details of the restore job are correct. If you choose the Overwrite Existing write strategy, you must type the destination cluster name to confirm the action where prompted.

Click Start Restore.

8
1
  1. If it's not already displayed, select the organization that contains your project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your project from the Projects menu in the navigation bar.

  3. In the sidebar, click Backup under the Database heading.

    The Backup details display.

  4. Click the cluster link.

2

Click the Point in Time Restore button on the far right side of the screen.

3

If you select the Date & Time option, you can specify the time of restore with one minute of granularity. If you select the Oplog Timestamp option, you can specify the time of restore with one second of granularity.

4

Important

You can restore a cluster from any time during its continuous cloud backup window except between when you initiated a restore and when Atlas completes a snapshot after the restore.

5

In the Source Details pane, select Restore database(s)/collection(s).

Under the Write Strategy heading, select the write strategy suitable for your use case. To learn more, see Collection- and Database-Level Restore Considerations.

6

Under the Select Restore Data heading, first choose your preferred entry method.

If you select Checkbox Entry, Atlas displays a list of all databases captured by the snapshot. Each database entry includes a collapsible list of all of its collections to enable collection-level restore.

If you select List Entry, Atlas displays a text entry field in which you provide the names of the databases or collections you want to restore. Enter each name on its own line. Enter databases by their names, enter collections in the database.collection name format.

Click Continue.

7

In the Destination pane, select the project that hosts the restore target cluster from the Destination Project dropdown.

Select the restore target cluster from the Destination Cluster dropdown.

The source project and cluster of the PIT backup appears with the Source label.

If you use the Add as new write strategy and any of your selected databases or collections have the same names as databases or collections already on the destination cluster, Atlas renames these by appending a suffix to each database or collection.

You can also optionally rename databases or collections under the Rename database(s)/collection(s) heading. You can either rename specific databases or collections individually, or batch-rename them by clicking Add a suffix to all source names and entering a suffix into the prompt.

8

In the Restore Details pane, select the set of indexes you want to restore as part of the restore job from the Indexes dropdown menu.

Click Continue.

9

Verify that the details of the restore job are correct. If you choose the Overwrite Existing write strategy, you must type the destination cluster name to confirm the action where prompted.

Click Start Restore.

10

Restart your application and ensure it uses the new target cluster.