Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to define the database name in GCP Migration tool

Hi there, 

We are trying to connect an onpremise postgresql for migration to GCP using migration tool. The database name is "defaultdb" instead of "postgres" and there is no option to define the database name to connect to on the migration tool and it keeps trying to connect to postgres database and fails. Is there a way to specifically mention the database name in the migration tool?

Help would be greatly appreciated.

Solved Solved
0 1 422
1 ACCEPTED SOLUTION

DMS currently does not provide an option to specify the database name for migration. The service defaults to migrating the "postgres" database when working with PostgreSQL.

As a workaround, you may consider other methods of migrating your database to Google Cloud. For instance, you could use the pg_dump and pg_restore tools to manually export your database from your on-premises PostgreSQL instance, and then import it into a new Cloud SQL instance on Google Cloud. Alternatively, you could look into third-party database migration tools that provide more flexibility in specifying the source database.

View solution in original post

1 REPLY 1

DMS currently does not provide an option to specify the database name for migration. The service defaults to migrating the "postgres" database when working with PostgreSQL.

As a workaround, you may consider other methods of migrating your database to Google Cloud. For instance, you could use the pg_dump and pg_restore tools to manually export your database from your on-premises PostgreSQL instance, and then import it into a new Cloud SQL instance on Google Cloud. Alternatively, you could look into third-party database migration tools that provide more flexibility in specifying the source database.