N
Neon17mo ago
quickest-silver

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 Ben
3 Replies
optimistic-gold
optimistic-gold17mo 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-silver
quickest-silverOP17mo ago
done
optimistic-gold
optimistic-gold17mo 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

Did you find this page helpful?