Re: Stream pg_dumpall directly from CentOS7 to Red Hat server

From: Wasim Devale <wasimd60(at)gmail(dot)com>
To: Holger Jakobs <holger(at)jakobs(dot)com>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Stream pg_dumpall directly from CentOS7 to Red Hat server
Date: 2024-07-28 17:00:28
Message-ID: CAB5fag5yO3aZj_SNoPHtGTJsCycmaiePgBAJSOQ2eMq2QzEh+g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Both major versions are the same postgresql 12.8 on CentOS7 and 12.19 on
Red hat.

Thanks,
Wasim

On Sun, 28 Jul, 2024, 7:28 pm Holger Jakobs, <holger(at)jakobs(dot)com> wrote:

> Am 28.07.24 um 14:29 schrieb Laurenz Albe:
> > On Sun, 2024-07-28 at 13:09 +0530, Wasim Devale wrote:
> >> Can I use below command directly stream pg_dumpall from CentOS7 to
> RedHat 9:
> >>
> >> pg_dumpall -U postgres | ssh postgres(at)redhat_ip_address "psql -U
> postgres"
> > No idea, but the correct way is
> >
> > pg_dumpall -U postgres | psql -h redhat_ip_address -U postgres
> >
> > Yours,
> > Laurenz Albe
> >
> This way the (old) psql tool of the current system (CentOS) would be
> used. If in doubt, it's better to use the psql of the destination (Red
> Hat) machine. Therefore, the idea using ssh isn't a bad one.
>
> You could also execute the following command on the Red Hat machine:
>
> pg_dumpall -h centos_ip_address -U postgres | psql -U postgres
>
> This way, you'll use the newer versions of pg_dumpall and psql installed
> on the Red Hat machine.
> --
>
> Holger Jakobs, Bergisch Gladbach
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ron Johnson 2024-07-28 20:55:28 Re: Faster pg_resore with autovacuum off?
Previous Message Wells Oliver 2024-07-28 16:35:41 Re: Faster pg_resore with autovacuum off?