简体   繁体   中英

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. 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 ).

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.

Thanks in advance for your sage advice and better wisdom

You can use a connection string with the -d option:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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