From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Andrus <kobruleht2(at)hot(dot)ee>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: How to restore to empty database |
Date: | 2020-01-31 17:12:37 |
Message-ID: | c63fd4dd-978d-f01d-79af-02808297479e@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 1/30/20 10:21 PM, Andrus wrote:
> Hi!
>
>> These days 37 GB is relatively small, so you maybe getting into the
>> realm of premature optimization. Do the 24 databases represent an
>> entire cluster you are trying to transfer?
>
> Basically yes.
> Cluster contains also small test database which actually does not need
> transferred but I can delete it manually after transfer.
> Also postgres, template0 and template1 are not used directly by
> applications and probably does not need to be transferred.
They are created with a new cluster anyway. That being said you may want
to recreate them if you have installed objects in them. For that see the
--clean option to pg_dumpall. If you do use that make sure and fully
read the Notes and Examples here:
https://www.postgresql.org/docs/11/app-pg-dumpall.html
>
>> If so have you looked at pg_dumpall?:
>> https://www.postgresql.org/docs/12/app-pg-dumpall.html
>> It is a text based backup, but it will include all the databases and
>> the globals.
>
> Source cluster is in old Debian 6 Squeeze running Postgres 9.1
> Should I create pipe using pg_dumpall and restore everything from old
> using pipe instead of pg_dump/pg_restore ?
That would depend on how stable and fast the connection is between the
two machines.
What sort of time frame are you working with?
>
> Andrus.
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2020-01-31 17:27:33 | Re: Add column with default value in big table - splitting of updates can help? |
Previous Message | Geoff Winkless | 2020-01-31 15:34:44 | Re: combination join against multiple tables |