How to Manually Restore MongoDB Database Clusters from Backups

MongoDB is a source-available cross-platform document-oriented database program for high-volume storage. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas.

DigitalOcean Managed Databases automatically handle recovery from hardware and software failures by replacing degraded nodes with new ones that resume directly from the point of failure. To recover from situations like a database administrator or application accidentally destroying data, you can manually restore a MongoDB database cluster from backups.

MongoDB cluster backups are automatically created once per day and retained for 7 days. Backups do not result in downtime or performance degradation, and the time of day at which they run is set automatically by DigitalOcean and cannot be changed.

Restore a MongoDB Cluster from Backups

To restore from a backup, from the Databases page, click the name of the MongoDB database you want to restore to go to its Overview page, then click the Actions button and choose Restore from backup from the menu.

Screenshot of MongoDB Actions page
If you cannot select Restore from backup, it means that you have hit the limit of database clusters for the account or team, or that your cluster is new and doesn’t have backups yet. You can delete a cluster or contact our support team for a limit increase.

In the Restore from backup window that opens, choose one of the available backups from the Select a backup field, then choose a name for the new database. By default, the name is the original databases’s name appended with the date of the backup and the word “backup”, like originalname-aug-13-backup.

When you’re ready, click Restore to New Cluster to begin the restoration. The time it takes to create the new cluster depends on the amount of data in the original.

Destroying a database cluster will destroy the backups of that database. Make sure you’ve downloaded any important data before you destroy.