title: How to download the schema of a postgres database on google cloud sql?
body: <p>I'm trying to use <code>pg_dump -s</code>, but I don't know how to connect.</p>
  
  <p>The manpage gives these connection options:</p>
  
  <pre><code>  -d, --dbname=DBNAME      database to dump
    -h, --host=HOSTNAME      database server host or socket directory
    -p, --port=PORT          database server port number
  </code></pre>
  
  <p>How do I find out this data for google sql cloud?</p>
  
  <p>One attempt:</p>
  
  <pre><code>pg_dump -s -h=IPADDRESS -d=postgres
  </code></pre>
  
  <p>Leads to this error:</p>
  
  <pre><code>pg_dump: [archiver (db)] connection to database "" failed: invalid connection option ""
  </code></pre>