HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

pg_dump with ssl certificates

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
withcertificatessslpg_dump

Problem

I would like to run the pg_dump command from a remote host off my database server that only allows fully verified certificate based connections. How should I go about doing this? The man pages for 9.1 state the instructions for connecting via password from what I could see.

Solution

The following worked for me:

pg_dump "port= host= user= dbname= sslcert= sslkey= sslrootcert= sslmode=verify-ca" -f 

Code Snippets

pg_dump "port=<port> host=<host> user=<user> dbname=<db> sslcert=<cert> sslkey=<key> sslrootcert=<ca.crt> sslmode=verify-ca" -f <file>

Context

StackExchange Database Administrators Q#107411, answer score: 7

Revisions (0)

No revisions yet.