简体   繁体   English

从需要 ssl 和 ssl 模式的托管 postgresql 实例转储

[英]Dump from a managed postgresql instance with ssl and ssl mode required

Hello fellow programmers,各位程序员好,

I am trying to dump from a postgres instance which is requiring me to connect with a ssl certificate.我正在尝试从要求我连接 ssl 证书的 postgres 实例进行转储。 The problem that occurs is that the --sslcert and --sslmode that exists on older documentation for pg_dump doesn't seem to exist for version 14 ( https://www.postgresql.org/docs/14/libpq-ssl.html ).发生的问题是版本 14 似乎不存在pg_dump旧文档中存在的--sslcert--sslmode ( https://www.postgresql.org/docs/14/libpq-ssl.html ).

My question is how can I dump a database from such a database that is requiring users to have a certificate?我的问题是如何从需要用户拥有证书的数据库中转储数据库?

I cannot install anything on the server since it's managed.我不能在服务器上安装任何东西,因为它是托管的。 Connecting through psql works fine with ssl so I am kind of confused.通过psql连接可以正常使用 ssl,所以我有点困惑。

Thanks in advance for your sage advice and better wisdom提前感谢您的明智建议和更好的智慧

You can use a connection string with the -d option:您可以使用带有-d选项的连接字符串:

pg_dump -d 'sslmode=require sslcert=/my/certificate host=xyz' -F c -f dumpfile

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM