Re: Stream pg_dumpall directly from CentOS7 to Red Hat server

From: Wasim Devale <wasimd60(at)gmail(dot)com>
To: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Stream pg_dumpall directly from CentOS7 to Red Hat server
Date: 2024-07-29 18:00:46
Message-ID: CAB5fag4Gv2vdrYqnHZdiOtkhjqGXzOQTV07cQLkFK1p8wz1_6w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Thanks everyone for your valuable inputs

On Mon, 29 Jul, 2024, 9:04 am Ron Johnson, <ronljohnsonjr(at)gmail(dot)com> wrote:

> (Before I answer: *WHY?*)
>
> Not intrinsically. You might be able to play weird games with ssh
> tunneling, but then I'd say "find a different solution to your problem."
>
> On Sun, Jul 28, 2024 at 11:13 PM Zaid Shabbir <zaidshabbir(at)gmail(dot)com>
> wrote:
>
>> Hello,
>>
>> One relevant question..
>>
>> Is there any way to Stream pg_dumpall directly from single CentOS7 to
>> Multiple RHEL server directly through a single command ?
>>
>> On Mon, Jul 29, 2024 at 7:12 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>
>>> Brock Henry <brock(dot)henry(at)gmail(dot)com> writes:
>>> > I personally would create an ssh tunnel for port 5432, if ssh was open
>>> but
>>> > 5432 was not.
>>>
>>> +1, but I think your example is not quite right:
>>>
>>> > ssh -L 5432:localhost:5432 redhat_ip_address
>>> > pg_dumpall -U postgres | psql -h localhost -U postgres
>>>
>>> If you have a local PG server, it's probably using 5432 so that ssh
>>> can't bind to that. I think you want something like
>>>
>>> ssh -L 5433:localhost:5432 redhat_ip_address
>>> pg_dumpall -U postgres | psql -h localhost -p 5433 -U postgres
>>>
>>> where "5433" can be any locally-unused port number (caution: untested;
>>> the ssh arguments may still not be quite right).
>>>
>>> regards, tom lane
>>>
>>>
>>>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Muhammad Waqas 2024-07-30 12:32:59 Re: DR setup in RHOS
Previous Message Laurenz Albe 2024-07-29 05:12:59 Re: Faster pg_resore with autovacuum off?