Postgres to mysql , portaldb migration fails


Article ID: 222521


Updated On:


CA API Developer Portal


We are trying to migrate from a postgres db  to a mysql instance. 

We are following the steps provided in the documentation:

The migration log shows no clue and all the json files contains 

Error: Internal server error: Resource VPC_SETTINGS_res is based on a table (vpc_settings) that no longer exists. To fix this problem, edit the resource and connect it with a valid table.


Release :

Component :


You will get this error when the migration container can not connect to the postgress database which runs in portal_portaldb container.

if you use the default hostname  the connection will fail !    PostgreSQL hostname [default: portaldb]: 

This needs to be the IP of the host running the portal containers.


You can use the alias name specified in step 2 to connect 

docker network connect --alias migrationdb migrationnetwork  <Postgres master container ID>

  1. Make the main portaldb externally accessible: docker service update –publish-add “5432:5432” portal_portaldb;
  2. Create an new docker network: docker create migrationnetwork
  3. Find the main contain id for primary postgres container: docker container ls | grep postgres
  4. Connect the primary postgres container to the new network: docker network connect –alias migrationdb migrationnetwork  Postgres master container ID>
  5. Run the upgrade container: docker run -rm -it -v migdb:/opt/store –network:migrationnetwork  caapim/apim-portal-migration:5.0.cr1
    Input for the migration container:
    PostgreSQL hostname [default: portaldb]: migrationdb
    PostgreSQL port [default: 5432]: 5432
    PostgreSQL username [default admin]: admin
    PostgreSQL password [default 7layer]: 7layer
    Mysql hostname: <fqdn for mysql host>
    MySql port: 3306
    Mysql user name: portal_admin
    Mysql password: some_secret_password