Report this

What is the reason for this report?

Optimal way to replicate a MANAGED DO MYSQL DB to other DBs, such as localhost or any other DB with a connection

Posted on March 19, 2022

I want to mirror my main database to my localhost so I have similar data throughout my development environment. Curious what the best way to do that with a managed DB, because I don’t have access to SSH so i can’t follow some of the replication tutorials out there.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Hi there,

What you could do is to follow the steps here on how to export and import a collection from MongoDB:

https://www.digitalocean.com/community/tutorials/how-to-import-and-export-a-mongodb-database-on-ubuntu-20-04

The tutorial is not specifically for a managed cluster, but you can run the mongoexport command as described there, just specify the cluster connection details with --uri "cluster-connection-string" flag.

For an example on how to use MongoDB CLI tools with a managed cluster, you can take a look that eh documentation here:

https://docs.digitalocean.com/products/databases/mongodb/how-to/import-collections/

Hope that this helps!

Best,

Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.