Re: Version upgrade: is restoring the postgres database needed?

From: Vick Khera <vivek(at)khera(dot)org>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Version upgrade: is restoring the postgres database needed?
Date: 2018-03-01 16:37:56
Message-ID: CALd+dcfKfqru3Nyetr3ocDuznOivahnzREX0niHw_U11WJ6HMQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Mar 1, 2018 at 11:15 AM, Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net> wrote:

> No, I do:
>
> $ pg_dump -Fc PROD > PROD.pgdump
> $ pg_dump --globals-only postgres > globals.sql
> $ pg_dump -Fc postgres > postgres.pgdump
>
>
That's how I back them up as well. You are correct that all you need to do
is restore the globals.sql, then each "pgdump" file individually. Just
ignore the warning when it tries to restore your initial postgres
superuser, since it was created by the initdb already.

You probably don't need the "postgres" db at all, since it is just there to
allow the client to connect to something on initial install. Normally you
don't use it in production.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2018-03-01 16:43:25 Re: Enforce primary key on every table during dev?
Previous Message Steven Lembark 2018-03-01 16:22:58 Re: Enforce primary key on every table during dev?