title: How to restore PostgreSQL database
body: <p>I'm working in project with a CMS called tendenci using PostgreSQL (it is required) in Ubuntu, and I had to migrate from a Virtual Machine to the production server. But I faced a problems with migrating the database.</p>
  
  <p>I used this command to extract data from VM:</p>
  
  <pre><code>pg_dump -Fc mydb &gt; db.dump
  </code></pre>
  
  <p>but when I tried to import data to my server with this command</p>
  
  <pre><code>psql -d mydb --file=db.dump 
  </code></pre>
  
  <p>this error shows up</p>
  
  <pre><code>The input is a PostgreSQL custom-format dump.
  Use the pg_restore command-line client to restore this dump to a database.
  </code></pre>
  
  <p>and when I use <code>pg_restore</code> command no errors show up, but the database doesn't get restored.</p>
  
  <pre><code>pg_restore -C -d mydb db.dump
  </code></pre>