agora inbox for pgsql-admin@postgresql.org
help / color / mirror / Atom feedFrom: Tom Lane <tgl@sss.pgh.pa.us>
To: Brock Henry <brock.henry@gmail.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Stream pg_dumpall directly from CentOS7 to Red Hat server
Date: Sun, 28 Jul 2024 22:11:54 -0400
Message-ID: <2454665.1722219114@sss.pgh.pa.us> (raw)
In-Reply-To: <CAAFiYLGLjsvDuALdJmJXA6Yo0meGuHYob0zQa1KMvf2gJuhg+g@mail.gmail.com>
References: <CAB5fag4b0bhFx7UVP=45_LL_aNdt60v421p2bM0PTqPrP-3ALQ@mail.gmail.com>
<d3077ef8746e982190144b050b59b06df0e96237.camel@cybertec.at>
<CANzqJaAO0AGKq3S946sM-7tsZpSi+S0uG_PcsRaAqzo+Zpo6gw@mail.gmail.com>
<CAAFiYLGLjsvDuALdJmJXA6Yo0meGuHYob0zQa1KMvf2gJuhg+g@mail.gmail.com>
Brock Henry <brock.henry@gmail.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
view thread (12+ messages) latest in thread
Message-ID: <2454665.1722219114@sss.pgh.pa.us>
Permalink: ../2454665.1722219114@sss.pgh.pa.us/
Also on: postgresql.org/message-id/2454665.1722219114@sss.pgh.pa.us
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, brock.henry@gmail.com
Subject: Re: Stream pg_dumpall directly from CentOS7 to Red Hat server
In-Reply-To: <2454665.1722219114@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox