pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Migration struggles
Date: Tue, 3 Aug 2021 09:50:03 -0500
Message-ID: <ecba315b-aa4e-854e-2093-3d17c4b84f27@gmail.com> (raw)
In-Reply-To: <CAEh-Kgt2VHahRGvBmG=EHGPQ56OCk_TG8KXB8SgLQWdU9fQCOA@mail.gmail.com>
References: <CAEh-Kgt2VHahRGvBmG=EHGPQ56OCk_TG8KXB8SgLQWdU9fQCOA@mail.gmail.com>

On 8/3/21 9:31 AM, Christian Lehmann wrote:
> Hi all
> i am currently building a ansible-managed pg13-cluster. Ansible not
> only configures postgres pgbouncer etc but also creates roles and
> manages pg_hba.
>
> Now I am planning and documenting the upcoming migration. Do you have
> a good idea, how i could proceed without a lot of sed'ing or similar
> hacky things?
>
> - if i use pg_dumpall, i have the "create role"-statements which will fail
> - if i use pg_dump i have to backup all db's one by one

In bash, I'd use psql to generate a list of user databases, and then loop 
through that list.

> - pg_dumpall -a only gives me the data, -s is only the schema. This
> might be the most promising approach, backing up schema, then data and
> importing it on the new server. But still it would be more convenient
> to just run one command.
>
> Any other ideas I have not found out yet? And any other comments what
> could possibly go wrong?
>
> thanks a lot
> chris
>

-- 
Angular momentum makes the world go 'round.





view thread (5+ messages)  latest in thread

Message-ID: <ecba315b-aa4e-854e-2093-3d17c4b84f27@gmail.com>
Permalink:  ../ecba315b-aa4e-854e-2093-3d17c4b84f27@gmail.com/
Also on:    postgresql.org/message-id/ecba315b-aa4e-854e-2093-3d17c4b84f27@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Migration struggles
  In-Reply-To: <ecba315b-aa4e-854e-2093-3d17c4b84f27@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox