Dominik Roszkowski
Dominik Roszkowski

Reputation: 2563

GCP migration password limit prevents me from reading from Heroku PostgreSQL

I'm trying to migrate data from Heroku's hosted PostgreSQL to GCP's CloudSQL via migration tool.

The credentials that can be generated via Heroku always use "a dynamically generated, 65-byte alphanumeric character string". However, the GCP migration tool allows to use passwords with a length of maximum 32 characters.

I was wondering if there's either a way to:

enter image description here

Upvotes: 0

Views: 36

Answers (1)

Dion V
Dion V

Reputation: 824

Instead of using the UI for migration, there is this article with the steps provided on migrating Heroku PostgreSQL to GCP Cloud SQL:

  1. Take the dump from Heroku Postgres.

    pg\_dump

    -U USERNAME

    --format=plain

    --no-owner -h HEROKU\_DB\_HOST

    --no-acl SOURCE\_DATABASE\_NAME \| sed -E ‘s/(DROP\|CREATE\|COMMENT ON) EXTENSION/--\\1 EXTENSION/g’ \> YOUR\_OUTPUT\_FILE.sql

  2. Upload/drop the .sql file to cloud storage.

  3. Import the file to the database of your choice.

As it seems that making GCP accept longer passwords is not yet possible.

Upvotes: 1

Related Questions