By Motash
How to download a database from Managed Database Cluster (PostgreSQL)?
And
How to upload existing database to Managed Database Cluster (PostgreSQL)?
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!
Accepted Answer
Hi there @Motash,
You should be able to achieve both of these by using the pg_dump
and pg_restore
command-line tools.
A command similar to the following should allow you to dump all the data from your remote PostgreSQL database to a single dump file:
- pg_dump -h use_your_host -U use_your_username -Fc use_your_dbname > dbdump.pgsql
You can restore a dump file to the default database and user by running a command similar to this:
- pg_restore -d 'use_your_connnectionURI' --jobs 4 use_your_dump_file
We cover both importing and exporting databases more detail in our product documentation for our managed databases (PostgreSQL):
https://www.digitalocean.com/docs/databases/how-to/postgresql/import-databases/
Hope that helps! - Matt.
Heya,
You can check our docs on export/import and also on how ti migrate your MySQL cluster:
https://docs.digitalocean.com/products/databases/mysql/how-to/import-databases/
https://docs.digitalocean.com/products/databases/mysql/how-to/migrate/
Regards
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.