tried to migrate a PostgreSQL database from a Docker container to a DigitalOcean Managed Database, but when I tested the connection to the source database, it failed to connect.
I followed the migration guide by preparing the source database for migration with the following steps:
However, it still fails to connect to the source database.
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,
Rather than using the live replication migration, have you considered using
pg_dump
and then importing that dump to your managed database?You can do that by following the steps here:
To use
pg_dump
, you need specify the connection details (like admin username and database) and redirect the output of the command to save the database dump. The command will look like this:Then once you have the dump, to import it to the new source database, ensure that you can connect to your target database with psql. Then, you need to find the connection URI for the target database you want to add the existing data into.
To import a source database in custom format, use the
pg_restore
command:If you prefer the live migration, can you share the exact changes that you’ve made to your Docker Postgres instance? And also share the conf file here.
- Bobby