通过网络服务器的隧道postgresql流量

发布于 2025-01-28 20:32:07 字数 552 浏览 4 评论 0原文

我有以下情况,想知道这是否可能。 我在不同的云铸造环境中有两个应用程序:

  • app1(env1)
  • app2(env2)

我在这些环境中有两个postgresql db。

  • DB1(ENV1)
  • DB2(ENV2)

  • 这些应用只能通过NAT-IP的端口443和80到达。
  • DB无法从外部到达,只能通过这些环境中的应用程序到达。

我可以通过给定应用程序的网络服务器以某种方式为这些DB创建隧道吗? 因此,例如,在 app1 上,我可以通过访问 url.app2.com/pgsql 来达到 db2

我的最终目标是: app1 创建 db1 的备份,并将其直接输送到 db2 以恢复它。并通过网络服务器。 我已经在Localhost上成功地工作了。

I have the following scenario and wonder if this is even possible.
I have two apps in different cloud foundry environments:

  • app1 (env1)
  • app2 (env2)

I have two postgresql db´s in those environments.

  • db1 (env1)
  • db2 (env2)

  • The apps are only reachable via port 443 and 80 over nat-ip´s.
  • The db´s are not reachable from outside and can only be reached through the apps in those environments.

Can I somehow create a tunnel to those db´s through the webserver of the given apps?
So that for example on app1 I can reach db2 by accessing url.app2.com/pgsql ?

My ultimate goal would be:
app1 creates backup of db1 and pipes it directly to db2 to restore it. And that through the webserver.
I got this already successfully working tunneling over localhost.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文