This article was written by Darshan Jayarama.
Reflecting on my tenure as a MongoDB TSE, I recall a specific incident where a DBA mistakenly dropped a production collection instead of a UAT one. At the time, we were compelled to restore the total cluster to a secondary instance, isolate the required data, and then re-import it into the live environment. The process was inefficient and expensive. We had to recover an entire 760GB cluster just to retrieve a single 50MB collection. You can imagine the massive resource drain involved.
One might wonder why we couldn't restore a single collection or select databases. That’s the new feature I am going to share with you today.
What is partial restore?
As explained in the MongoDB documentation, you can now simply restore any database or collection from the cloud backup; there is no need to restore the full cluster.
It means that if one collection is all you want, you can recover it without touching the entire dataset from the cloud backup.
Real-World Example
A production cluster will have a combination of multiple databases:
Live Production Environment
├── Customer_Profiles
├── Transaction_History
├── Stock_Management
├── Billing_Records
└── Data_Insights
If someone accidentally drops Billing_Records.invoices collection. To resolve this:
Before the Partial Restore feature:
- Restore the entire cluster to a temporary Atlas cluster.
- Wait for the restore to complete.
- Export the required collection.
- Import it back into production.
- Delete the temporary cluster.
With the Partial Restore feature,simply choose:
- Backup Snapshot
- Database
- Collection
- Restore
Here is the workflow:
Click on the Backup tab, select the cluster, and select the backup snapshot as shown below.
Click the 3 dots per the selected snapshot, then click Restore.
In the next window, select the Restore Databases/Collection tab:
You will now have 2 options:
- Create as new: With this option, you can choose not to remove the existing collection. If the restoring collection/DB name already exists, Atlas automatically renames the restoring collection to avoid a conflict.
- Overwrite existing: Atlas replaces the existing collection with the restored version.
If you want to compare the existing and restored collection, then choose the "Create as new" option. If you want to replace the existing collection, then choose the "Overwrite existing" option. But please be aware that all the data written after the snapshot time will no longer exist.
After choosing your option, you can go ahead and select exactly the data you need. You have two ways to do this:
- Using the UI: Just tick the checkboxes for the database or collection you want. Or, if you prefer, you can use the search bar to find what you need using a regex pattern.
- Using List Entry: Type the database name or the database. collection name, one per line. For example, if you want everything from the Billing_records database, but only the NRI and HNI collections from the Customer_profile database, you just enter it like this:
Billing_recordsCustomer_profile.NRICustomer_profile.HNI
Keep one thing in mind —you cannot use a dot in your database name. If you use a dot, the system will treat it as a combined DB and collection name.
Once you are done with this part, just click Next. On the next screen, you will need to select the Destination details.



Top comments (0)