Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set sslmode=allow with pg_dump

I need to specify sslmode=allow when using psql to connect to my PostgreSQL DB, like: psql sslmode=allow -h localhost -p 5432 otherwise I get server does not support SSL, but SSL was required

I tried specifying the same option to pg_dump but it doesn't recognize the option.

How do I specify sslmode to pg_dump?

like image 299
qwertzguy Avatar asked Apr 24 '17 18:04

qwertzguy


1 Answers

You need to use the environment variable PGSSLMODE like this:

PGSSLMODE=allow pg_dump -h localhost -p 5432

like image 192
qwertzguy Avatar answered Nov 16 '22 03:11

qwertzguy