By napjon
I am trying to migrate postgre db from DO VM into DO’s PostgreSQL managed database.
I used pg_dump for specific database, and use pg_restore to load the data.
All went well, except until I turn off the old VM, querying the data from new managed database lead to
could not translate host name: <address> to address: Temporary failure in name resolution
Whereas if querying from the VM that I’ve turned off, lead to expected result,
could not connect to server: Connection timed out
Confusingly, if I turn back on the VM, the managed database works without any issue.
I’m using command below to dump database,
pg_dump -h <> -U <> -p <> -Fc <> > <>.bak
And to restore,
psql -d <connection-string> -f <>.bak
Is it a firewall issue, or have I misunderstood something about DO’s managed database?
I read https://www.digitalocean.com/docs/databases/postgresql/resources/troubleshoot-connections/#could-not-translate-hostname-to-address, the hostname is no issue since I can pull data if the VM is on.
I’m using PostgreSQL 10.12 on VM, 11 on Managed, and Ubuntu 16.04
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!
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.