这个问题已经被here和here解决了,但是没有任何结果可供我处理。
我按照Heroku文档中的要求使用进行备份。
pg_dump -Fc --no-acl --no-owner --no-privileges -h [HOST] -U [DB_USER] [DB_NAME] > backup.dump当我像这样恢复时(文件大小约为100MB):
heroku pg:backups --app [APP_NAME] restore 'https://[DUMP_URL]' [HEROKU_DATABASE_URL]我在19.4MB的上传进度停止后收到错误消息,日志状态为:
$ heroku pg:backups --app [APP_NAME] info r081
=== Backup info: r081
Database: BACKUP
Started: 2016-04-29 10:10:37 +0000
Finished: 2016-04-29 10:11:31 +0000
Status: Failed
Type: Manual
Backup Size: 19.4MB
=== Backup Logs
2016-04-29 10:10:39 +0000: pg_restore: connecting to database for restore
2016-04-29 10:10:41 +0000: pg_restore: creating SCHEMA public
2016-04-29 10:10:41 +0000: pg_restore: creating EXTENSION plpgsql
2016-04-29 10:10:41 +0000: pg_restore: creating COMMENT EXTENSION plpgsql
2016-04-29 10:10:41 +0000: pg_restore: [archiver (db)] Error while PROCESSING TOC:
2016-04-29 10:10:41 +0000: pg_restore: [archiver (db)] Error from TOC entry 2474; 0 0 COMMENT EXTENSION plpgsql
2016-04-29 10:10:41 +0000: pg_restore: [archiver (db)] could not execute query: ERROR: must be owner of extension plpgsql
2016-04-29 10:10:41 +0000: Command was: COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
2016-04-29 10:10:41 +0000:
2016-04-29 10:10:41 +0000:
2016-04-29 10:10:41 +0000:
2016-04-29 10:10:41 +0000: pg_restore: creating SEQUENCE answer_seq
[...]
2016-04-29 10:10:48 +0000: pg_restore: executing SEQUENCE SET category_seq
2016-04-29 10:10:49 +0000: pg_restore: processing data for table "file"
2016-04-29 10:11:31 +0000: out of memory
2016-04-29 10:11:31 +0000: waiting for restore to complete
2016-04-29 10:11:31 +0000: restore done
2016-04-29 10:11:31 +0000: waiting for download to complete
2016-04-29 10:11:31 +0000: download done我最初认为这可能是由于包含BLOBS的表文件造成的。但我似乎不明白为什么这会成为一个问题。最大的文件是4MB。日志还指出,仅导入了100MB中的19.4。
我使用以下版本的heroku工具带:
heroku-toolbelt/3.43.0 (x86_64-linux-gnu) ruby/2.1.5
heroku-cli/4.30.0-2dfc0f4 (amd64-linux) go1.6.2
=== Installed Plugins
heroku-apps@2.0.3
heroku-cli-addons@0.3.0
heroku-fork@4.1.3
heroku-git@2.5.1
heroku-local@5.0.2
heroku-orgs@1.1.0
heroku-pg-extras
heroku-pipelines@1.1.5
heroku-run@3.2.3
heroku-spaces@2.1.2
heroku-status@2.1.4发布于 2016-04-29 22:56:20
我想我的database plan was not big enough来支持这个操作。我可以排除heroku FAQ中的其他问题状态集。
https://stackoverflow.com/questions/36936213
复制相似问题