Question

Restore MongoDB via API

Posted September 11, 2021 78 views
MongoDBAPIBackups

Hi, how can I restore my mongodb cluster using Digital Ocean’s API? I am using a managed database but I can’t seem to find the endpoint for restoring in the API docs. Thanks!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Found the solution (have not tried it yet). There is no ‘restore’ endpoint - instead you create a new db cluster with a 'backup_restore’ key.

https://docs.digitalocean.com/reference/api/api-reference/#operation/create_database_cluster

  • Still struggling with this. I’ve created a new database using the restore point from the backups but I run into a couple of problems:

    1 - the new database does not seem to complete setup (it hangs)
    2 - when updating my App Spec to use the new database, I get a ‘cannot create and delete database in same spec’ error.