Insights Hub Migrate the Service Instance to another PostgreSQL version into new PostgreSQL instance

2021-09-03T19:05:15Z
Developer Tools

Summary


Details

How to migrate to the new PostgreSQL version?

Solution

Please find below information on how to properly do the migration.

How to migrate to the new version.

  1. First please read the documentation available at this link.

    https://developer.mindsphere.io/paas/a9s-postgresql/using.html#migrate-the-service-instance-to-another-postgresql-version-into-new-postgresql-instance

     

    Prepare the migration

    How the migration should happen?

    There is no automatic switchover (un-/binding apps).

    Data might be losing if something is written during the migration . So to avoid that, this is the generic procedure that requires app downtime : The downtime depends on the size of the backing Service and can take up to 10 hours. So we strongly recommend planning this maintenance outside of the work time. In the best case is the weekend.

    1. Stop all apps and unbind them from the old service instance: this is to ensure no new data is written to the database during migration as there is no automatic sync after the new instance has been created.
      1. Create the new service instance with the copy from the parameter ( see step 3)
        1. When successfully completed, verify data
          1. Bind all apps to the new service instance
            1. Verify everything is functional
              1. Download a manual backup from the old service instance delete it

                 

                Create new instance

                1. Retrieve host, username, and password

                  First, you need to execute cf env app_name (App on which the service is bound)  to display the information about the host, username, and password for the backing service (that will be needed for the CLI command line.

                  1.  Command line Windows:

                    cf create-service postgresql11 postgresql-xs new_instance_name  -c "{\"copy_from \":

                    {\"*host*\": \"rad46.service.dc1.a9ssvc\", \"*username*\": \"a9s-brk-usr-54bce05afb23a773426e2d055e\", \"*password*\": \"a9s79c44cc031ebd2f58717\"}

                    }"

                    Notes

                    KB Article ID# PL8564892

                    Contents

                    SummaryDetails

                    Associated Components

                    Cloud Foundry Developer Tools - Other