Invalid dump format pgbackups:restore even with Dropbox download link

空扰寡人 提交于 2019-12-23 03:18:30

问题


I'm trying to transfer data from my local postgresql dump file to a Heroku database. I've been trying to use pgbackups:restore using the tips I found in SO but this error below is a brick-wall: "INVALID DUMP FORMAT HTML document text". I think the problem definitely lies in dropbox.

I try to copy the URL From this Dropbox screen (the link on the Download button), after clicking the "Share" link. But the 'Invalid Dump Format HTML document text' error shown below is persisting. I've tried different permutations of the URL (https www, https dl, http www ... they all give me the same errors)

$ heroku pgbackups:restore HEROKU_POSTGRESQL_BLUE_URL 'https://dl.dropbox.com/s/80vy8mm6enwsdfo/mydb.dump'

HEROKU_POSTGRESQL_BLUE_URL (DATABASE_URL) <---restore--- mydb.dump

! WARNING: Destructive Action ! This command will affect the app: terrysquotes ! To proceed, type "appName" or re-run this command with --confirm appName

$ appName

Retrieving... done

! An error occurred and your restore did not finish. ! Please run heroku logs --ps pgbackups for details.

$ heroku logs --ps pgbackups

2014-06-22T16:44:11+00:00 app[pgbackups]: psql: bin//pg-latest/psql 2014-06-22T16:44:11+00:00 app[pgbackups]: --------+------+------+------ 2014-06-22T16:44:11+00:00 app[pgbackups]: pg_restore: env LD_LIBRARY_PATH=bin//9.3 bin//9.3/pg_restore 2014-06-22T16:44:12+00:00 app[pgbackups]: Invalid dump format: /tmp/4XHVprPkdu/mydb.dump: HTML document text 2014-06-22T16:44:12+00:00 app[pgbackups]: download_progress: done 2014-06-22T16:44:11+00:00 app[pgbackups]: Started: Sun Jun 22 16:44:11 UTC 2014 2014-06-22T16:44:11+00:00 app[pgbackups]: download_progress: start 2014-06-22T16:44:12+00:00 app[pgbackups]: download_progress: 486.0bytes 2014-06-22T16:44:11+00:00 app[pgbackups]: Location: 0d306785-c6e9-42a6-ab66-3fb55f7f0f6e:/tmp/4XHVprPkdu 2014-06-22T16:44:11+00:00 app[pgbackups]: Schema | Name | Type | Info 2014-06-22T16:45:39+00:00 app[pgbackups]: psql: bin//pg-latest/psql 2014-06-22T16:45:39+00:00 app[pgbackups]: download_progress: 496B 2014-06-22T16:45:39+00:00 app[pgbackups]: (0 rows) 2014-06-22T16:45:39+00:00 app[pgbackups]: Schema | Name | Type | Info 2014-06-22T16:45:38+00:00 app[pgbackups]: Location: 41095e94-2a25-42c5-a778-0f37d6d0fbd9:/tmp/bI1zFet590 2014-06-22T16:45:39+00:00 app[pgbackups]: download_progress: start 2014-06-22T16:45:38+00:00 app[pgbackups]: Started: Sun Jun 22 16:45:38 UTC 2014 2014-06-22T16:45:39+00:00 app[pgbackups]: 2014-06-22T16:45:39+00:00 app[pgbackups]: pg_restore: env LD_LIBRARY_PATH=bin//9.3 bin//9.3/pg_restore 2014-06-22T16:45:39+00:00 app[pgbackups]: --------+------+------+------ 2014-06-22T16:45:39+00:00 app[pgbackups]: pv: bin//pv-latest 2014-06-22T16:45:40+00:00 app[pgbackups]: download_progress: 496.0bytes 2014-06-22T16:45:39+00:00 app[pgbackups]: 2014-06-22T16:45:40+00:00 app[pgbackups]: Invalid dump format: /tmp/bI1zFet590/mydb.dump: HTML document text 2014-06-22T16:45:40+00:00 app[pgbackups]: download_progress: done 2014-06-22T16:47:32+00:00 app[pgbackups]: 2014-06-22T16:47:32+00:00 app[pgbackups]: psql: bin//pg-latest/psql 2014-06-22T16:47:32+00:00 app[pgbackups]: download_progress: 226.0bytes 2014-06-22T16:47:32+00:00 app[pgbackups]: pg_restore: env LD_LIBRARY_PATH=bin//9.3 bin//9.3/pg_restore 2014-06-22T16:47:32+00:00 app[pgbackups]: download_progress: done 2014-06-22T16:47:32+00:00 app[pgbackups]: pv: bin//pv-latest 2014-06-22T16:47:32+00:00 app[pgbackups]: Schema | Name | Type | Info 2014-06-22T16:47:32+00:00 app[pgbackups]: Invalid dump format: /tmp/wahMuTNOLf/mydb.dump: HTML document text 2014-06-22T16:47:32+00:00 app[pgbackups]: Started: Sun Jun 22 16:47:32 UTC 2014 2014-06-22T16:47:32+00:00 app[pgbackups]: 2014-06-22T16:47:32+00:00 app[pgbackups]: download_progress: 226B 2014-06-22T16:47:32+00:00 app[pgbackups]: download_progress: start 2014-06-22T16:47:32+00:00 app[pgbackups]: Location: 3a91ccfa-a2c0-4277-b84b-d2be43e4a834:/tmp/wahMuTNOLf 2014-06-22T16:47:32+00:00 app[pgbackups]: (0 rows) 2014-06-22T16:47:32+00:00 app[pgbackups]: --------+------+------+------ 2014-06-22T16:50:48+00:00 app[pgbackups]: psql: bin//pg-latest/psql 2014-06-22T16:50:49+00:00 app[pgbackups]: download_progress: done 2014-06-22T16:50:48+00:00 app[pgbackups]: Location: ff26e7c9-51b1-49a9-8eac-96380e518059:/tmp/e940S4ziPp 2014-06-22T16:50:48+00:00 app[pgbackups]: --------+------+------+------ 2014-06-22T16:50:48+00:00 app[pgbackups]: download_progress: 486B 2014-06-22T16:50:48+00:00 app[pgbackups]: Schema | Name | Type | Info 2014-06-22T16:50:48+00:00 app[pgbackups]: download_progress: start 2014-06-22T16:50:48+00:00 app[pgbackups]: Started: Sun Jun 22 16:50:48 UTC 2014 2014-06-22T16:50:49+00:00 app[pgbackups]: download_progress: 486.0bytes 2014-06-22T16:50:48+00:00 app[pgbackups]: pg_restore: env LD_LIBRARY_PATH=bin//9.3 bin//9.3/pg_restore 2014-06-22T16:50:48+00:00 app[pgbackups]: 2014-06-22T16:50:48+00:00 app[pgbackups]: 2014-06-22T16:50:48+00:00 app[pgbackups]: pv: bin//pv-latest 2014-06-22T16:50:48+00:00 app[pgbackups]: (0 rows) 2014-06-22T16:50:49+00:00 app[pgbackups]: Invalid dump format: /tmp/e940S4ziPp/mydb.dump: HTML document text 2014-06-22T16:53:27+00:00 app[pgbackups]: --------+------+------+------ 2014-06-22T16:53:27+00:00 app[pgbackups]: download_progress: 386B 2014-06-22T16:53:27+00:00 app[pgbackups]: Started: Sun Jun 22 16:53:27 UTC 2014 2014-06-22T16:53:27+00:00 app[pgbackups]: pg_restore: env LD_LIBRARY_PATH=bin//9.3 bin//9.3/pg_restore 2014-06-22T16:53:27+00:00 app[pgbackups]: 2014-06-22T16:53:27+00:00 app[pgbackups]: download_progress: 386.0bytes 2014-06-22T16:53:27+00:00 app[pgbackups]: Location: 44aaa82b-b329-4ea8-b869-af74a2291d2d:/tmp/ar3nXH75CR 2014-06-22T16:53:27+00:00 app[pgbackups]: Schema | Name | Type | Info 2014-06-22T16:53:27+00:00 app[pgbackups]: download_progress: start 2014-06-22T16:53:28+00:00 app[pgbackups]: Invalid dump format: /tmp/ar3nXH75CR/mydb.dump: HTML document text 2014-06-22T16:53:27+00:00 app[pgbackups]: psql: bin//pg-latest/psql 2014-06-22T16:53:27+00:00 app[pgbackups]: 2014-06-22T16:53:27+00:00 app[pgbackups]: pv: bin//pv-latest 2014-06-22T16:53:27+00:00 app[pgbackups]: (0 rows) 2014-06-22T16:53:27+00:00 app[pgbackups]: download_progress: done 2014-06-22T17:01:39+00:00 app[pgbackups]: download_progress: start 2014-06-22T17:01:38+00:00 app[pgbackups]: pv: bin//pv-latest 2014-06-22T17:01:39+00:00 app[pgbackups]: download_progress: 486B 2014-06-22T17:01:39+00:00 app[pgbackups]: --------+------+------+------ 2014-06-22T17:01:38+00:00 app[pgbackups]: Started: Sun Jun 22 17:01:38 UTC 2014 2014-06-22T17:01:39+00:00 app[pgbackups]: pg_restore: env LD_LIBRARY_PATH=bin//9.3 bin//9.3/pg_restore 2014-06-22T17:01:39+00:00 app[pgbackups]: 2014-06-22T17:01:38+00:00 app[pgbackups]: psql: bin//pg-latest/psql 2014-06-22T17:01:39+00:00 app[pgbackups]: Schema | Name | Type | Info 2014-06-22T17:01:3 9+00:00 app[pgbackups]: download_progress: 486.0bytes 2014-06-22T17:01:39+00:00 app[pgbackups]: download_progress: done 2014-06-22T17:01:38+00:00 app[pgbackups]: Location: aa3c5322-1899-4811-b74e-fff91218fc6c:/tmp/wqC9ziSvIA 2014-06-22T17:01:39+00:00 app[pgbackups]: 2014-06-22T17:01:39+00:00 app[pgbackups]: (0 rows) 2014-06-22T17:01:39+00:00 app[pgbackups]: Invalid dump format: /tmp/wqC9ziSvIA/mydb.dump: HTML document text 2014-06-22T17:01:56+00:00 app[pgbackups]: psql: bin//pg-latest/psql 2014-06-22T17:01:56+00:00 app[pgbackups]: download_progress: start 2014-06-22T17:01:56+00:00 app[pgbackups]: 2014-06-22T17:01:56+00:00 app[pgbackups]: Location: d5f20719-b1b1-4a8f-9e92-bb45d19a5479:/tmp/S2eb3hRqgP 2014-06-22T17:01:56+00:00 app[pgbackups]: pg_restore: env LD_LIBRARY_PATH=bin//9.3 bin//9.3/pg_restore 2014-06-22T17:01:56+00:00 app[pgbackups]: (0 rows) 2014-06-22T17:01:56+00:00 app[pgbackups]: Started: Sun Jun 22 17:01:56 UTC 2014 2014-06-22T17:01:56+00:00 app[pgbackups]: pv: bin//pv-latest 2014-06-22T17:01:56+00:00 app[pgbackups]: Schema | Name | Type | Info 2014-06-22T17:01:56+00:00 app[pgbackups]: --------+------+------+------ 2014-06-22T17:01:56+00:00 app[pgbackups]: download_progress: 386B 2014-06-22T17:01:56+00:00 app[pgbackups]: 2014-06-22T17:01:56+00:00 app[pgbackups]: download_progress: 386.0bytes 2014-06-22T17:01:56+00:00 app[pgbackups]: download_progress: done 2014-06-22T17:01:56+00:00 app[pgbackups]: Invalid dump format: /tmp/S2eb3hRqgP/mydb.dump: HTML document text


回答1:


I think you want https://dl.dropboxusercontent.com/s/80vy8mm6enwsdfo/mydb.dump. See https://www.dropbox.com/help/201/en for details.



来源:https://stackoverflow.com/questions/24353698/invalid-dump-format-pgbackupsrestore-even-with-dropbox-download-link

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!