Cannot connect to source database
I've created a postgreSQL db, which server is running on my machine, and i want to migrate it to Neon, with the schema and all data in it.
But, the Migration Assistant doesn't seem to accept the two formats of connection strings i've inserted until now, those being:
"postgres://user:password@host:port/db" and
"postgresql://username:password@host:port/database?sslmode=require&application_name=myapp"
It's my first time using PostgreSQL and Neon π
2 Replies
like-goldβ’7mo ago
I suggest trying a dump locally to see if you can get that working:
pg_dump -Fc -v -d <source_database_connection_string> -f <dump_file_name>
Then try a restore to your Neon database:
pg_restore -v -d <neon_database_connection_string> <dump_file_name>
You can follow the instructions here: https://neon.tech/docs/import/migrate-from-postgres#export-data-with-pgdump
For how to find your Neon database connection string, see: https://neon.tech/docs/connect/connect-from-any-app
Neon
Connect from any application - Neon Docs
Where to find database connections details Where to find example connection snippets Protocols supported by Neon Choosing a driver and connection type Connect to Neon securely Connection pooling Conne...
Neon
Migrate data from Postgres with pg_dump and pg_restore - Neon Docs
This topic describes migrating data from one Postgres database to another using the pg_dump and pg_restore. Avoid using pg_dump over a pooled connection string (see PgBouncer issues 452 & 976 for deta...
narrow-beigeOPβ’7mo ago
It worked! Thanks a lot π