| From: | Brock Henry <brock(dot)henry(at)gmail(dot)com> |
|---|---|
| To: | pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
| Subject: | Re: Stream pg_dumpall directly from CentOS7 to Red Hat server |
| Date: | 2024-07-29 00:48:29 |
| Message-ID: | CAAFiYLGLjsvDuALdJmJXA6Yo0meGuHYob0zQa1KMvf2gJuhg+g@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin |
I personally would create an ssh tunnel for port 5432, if ssh was open but
5432 was not.
ssh -L 5432:localhost:5432 redhat_ip_address
pg_dumpall -U postgres | psql -h localhost -U postgres
The two commands in separate windows/sessions.
On Sun, 28 Jul 2024 at 22:33, Ron Johnson <ronljohnsonjr(at)gmail(dot)com> wrote:
> On Sun, Jul 28, 2024 at 8:30 AM Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
> wrote:
>
>> 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
>>
>>
> The correct way, if port 5432 is open. Which isn't always the case.
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2024-07-29 02:11:54 | Re: Stream pg_dumpall directly from CentOS7 to Red Hat server |
| Previous Message | Ron Johnson | 2024-07-28 20:55:28 | Re: Faster pg_resore with autovacuum off? |