I’m trying to dump a database using PostgreSQL and need to connect with an SSL certificate.
I successfully connect and dump the database using the following command:
pg_dump "port=<port> host=<host> user=<user> dbname=<db> sslcert=<cert> sslkey=<key> sslrootcert=<ca.crt> sslmode=require" -f <file>
However, I need to use pg_dumpall, and this format doesn’t seem to work. How can I connect pg_dumpall using an SSL certificate?
I tryed to run
pg_dumpall "port=<port> host=<host> user=<user> dbname=<db> sslcert=<cert> sslkey=<key> sslrootcert=<ca.crt> sslmode=require"
this is the error what return:
pg_dumpall: error: too many command-line arguments (first is "port=<port> host=<host> user=<user> dbname=<db> sslcert=<cert> sslkey=<key> sslrootcert=<ca.crt> sslmode=require") pg_dumpall: hint: Try "pg_dumpall --help" for more information.