title: Cant pg_restore on Heroku: "could not read from input file: end of file"
body: <p>I am trying to copy my local PostgreSQL DB to Heroku app with <code>pg_dump</code> / <code>pg_restore</code> utils. Doing according to Heroku's official guide: <a href="https://devcenter.heroku.com/articles/heroku-postgres-import-export" rel="noreferrer">https://devcenter.heroku.com/articles/heroku-postgres-import-export</a></p>
  
  <p>So, i've done the dump:<br>
  <code>pg_dump -Fc --no-acl --no-owner -h localhost -U myuser mydb &gt; mydb.dump</code></p>
  
  <p>Then i've uploaded it on a reachable across the web server (and its really reachable, i've checked it downloading the file with <code>wget</code> and <code>pg_restore</code>ing it - works fine).</p>
  
  <p>Then i've tried to restore in on Heroku and no luck:</p>
  
  <pre><code>kulver@kvb:~/projects/gop/gop_flask$ heroku pg:backups restore 'MY_URL_HERE' postgresql-corrugated-15763
  r010 ---restore---&gt; DATABASE
  An error occurred and your backup did not finish.
  
  Please run `heroku pg:backups info r010` for details.
  </code></pre>
  
  <p>Here are the details:</p>
  
  <pre><code>kulver@kvb:~/projects/gop/gop_flask$ heroku pg:backups info r010
  === Backup info: r010
  
  Database:    BACKUP
  Started:     2016-03-26 20:15:32 +0000
  Finished:    2016-03-26 20:15:32 +0000
  Status:      Failed
  Type:        Manual
  Backup Size: 23.9MB
  === Backup Logs
  ... a bunch of logs here ...
  2016-03-26 20:15:32 +0000: pg_restore: processing data for table "cards"
  2016-03-26 20:15:32 +0000: waiting for restore to complete
  2016-03-26 20:15:32 +0000: pg_restore: [custom archiver] could not read from input file: end of file
  2016-03-26 20:15:32 +0000: restore done
  2016-03-26 20:15:32 +0000: waiting for download to complete
  2016-03-26 20:15:32 +0000: download done
  </code></pre>
  
  <p>I've tried to remake the dump file, reload it - same error. What's wrong? Why can i download it and restore from it on the just created DB, but not on Heroku? </p>
  
  <p>Thank you for any advise.</p>