Re: best migration solution

From: Kashif Zeeshan <kashi(dot)zeeshan(at)gmail(dot)com>
To: "Zwettler Markus (OIZ)" <Markus(dot)Zwettler(at)zuerich(dot)ch>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: best migration solution
Date: 2024-04-25 08:01:01
Message-ID: CAAPsdhcZrHefKuJ33aNbGt7gMqnsZ8-8gE3zX2qGCK_mLA43uQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Apr 25, 2024 at 12:55 PM Zwettler Markus (OIZ) <
Markus(dot)Zwettler(at)zuerich(dot)ch> wrote:

> we have to migrate from hosted PG12 to containerized PG16 on private
> cloud.
>
>
>
> some of the installed PG12 extensions are not offered on the containerized
> PG16, eg. PostGIS related extensions like pg_routing and ogr_fdw.
>
> some of these extensions are not needed anymore. some of these extensions
> were installed in their own schema.
>
> we also need to change the database names and most role names due to
> external requirements.
>
>
>
>
>
> I came up with this solution.
>
>
>
> dump all roles with pg_dumpall.
>
> edit this dumpfile and
>
> - exclude roles not needed
> - change required role names
>
>
>
> dump all required databases with pg_dump
>
> - in plain text
> - exclude all schemas not needed
>
> edit this dump file and
>
> - exclude any "create extension" command for not existing extensions
> - change all required role names on permissions and ownerships
>
>
>
>
>
> any missings?
> any better solutions?
>
Hi

This solution is ok and should work.

Regards
Kashif Zeeshan
Bitnine Global

>
>
>
>
> I wonder whether a plain text dump could lead to conversion problems or
> something similar?
>
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kashif Zeeshan 2024-04-25 08:04:57 Re: could not open file "global/pg_filenode.map": Operation not permitted
Previous Message Zwettler Markus (OIZ) 2024-04-25 07:55:05 best migration solution