pg_dump needs certificate
Hi
I'm trying to run
pg_dump and getting the following error:
$ pg_dump -d 'sslmode=require host=abc.neon.tech dbname=foo' > prod_backup.sql
pg_dump: error: connection to server at "abc.neon.tech", port 5432 failed: SSL error: certificate verify failed
How do I specify the certificate? I'm on zsh on macos....
Thanks
Ben3 Replies
optimistic-gold•17mo ago
Hey Ben, can you DM me the exact host you used? You shouldn't need to specify the certificate as it's signed by Lets Encrypt. Thanks
quickest-silverOP•17mo ago
done
optimistic-gold•17mo ago
Thanks, looking into it now
Hmm. I don't see any connection attempts from you for pg_dump - but it's possible I'm missing it. 2 suggestions:
1. Copy the string directly from the console, eg
pg_dump "postgresql://.../foo?sslmode=require" > prod_backup.sql
2. If that fails, download https://letsencrypt.org/certs/isrgrootx1.pem into ~/.postgresql/root.crt and try sslmode=verify-full