Ninefold에서 Heroku 친화적인 Postgres 덤프를 내보내는 방법은 무엇입니까?

Ninefold에서 Heroku 친화적인 Postgres 덤프를 내보내는 방법은 무엇입니까?

내 postgres 데이터베이스를 ninefold에서 heroku로 마이그레이션하려고 합니다.

내보내는 데 사용하는 명령은 다음과 같습니다.

PGPASSWORD=password pg_dump -h ipaddress -p port -U user -d database -Fc --no-acl --no-owner -x -O -N postgis > ninefold-backup.dump

그런 다음 S3에 업로드하고 다음 명령을 실행합니다.

heroku pg:backups restore 'https://s3-us-west-2.amazonaws.com/bucket/ninefold-backup.dump' DATABASE_URL -a app --confirm app

그런 다음 heroku는 다음과 같이 보고합니다.

An error occurred and your backup did not finish.

Please run `heroku pg:backups info r003` for details.

로그에는 다음과 같은 오류가 표시됩니다.

2015-05-23 22:32:36 +0000: pg_restore: creating COMMENT EXTENSION xml2
2015-05-23 22:32:36 +0000: pg_restore: [archiver (db)] Error from TOC entry 5157; 0 0 COMMENT EXTENSION xml2
2015-05-23 22:32:36 +0000: pg_restore: [archiver (db)] could not execute query: ERROR:  extension "xml2" does not exist
2015-05-23 22:32:36 +0000: Command was: COMMENT ON EXTENSION xml2 IS 'XPath querying and XSLT';

2015-05-23 22:32:36 +0000: pg_restore: processing data for table "spatial_ref_sys"
2015-05-23 22:32:36 +0000: pg_restore: [archiver (db)] Error from TOC entry 4958; 0 19010 TABLE DATA spatial_ref_sys postgres
2015-05-23 22:32:37 +0000: pg_restore: [archiver (db)] could not execute query: ERROR:  relation "spatial_ref_sys" does not exist
2015-05-23 22:32:37 +0000: Command was: COPY spatial_ref_sys (srid, auth_name, auth_srid, srtext, proj4text) FROM stdin;

2015-05-23 22:07:39 +0000: pg_restore: processing data for table "topology"
2015-05-23 22:07:39 +0000: pg_restore: [archiver (db)] Error from TOC entry 4959; 0 20039 TABLE DATA topology postgres
2015-05-23 22:07:39 +0000: pg_restore: [archiver (db)] could not execute query: ERROR:  relation "topology" does not exist
2015-05-23 22:07:39 +0000: Command was: COPY topology (id, name, srid, "precision", hasz) FROM stdin;

내가 무엇을 놓치고 있나요?

답변1

방법을 찾았습니다. 나인폴드가 사용하고 있는 확장 기능에 문제가 있는 것 같아 옵션을 추가하면 -n public공개 스키마만 백업하게 됩니다.

PGPASSWORD=password pg_dump -h ipaddress -p port -U user -d database -Fc --no-acl --no-owner -x -O -N postgis -n public > ninefold-backup.dump

관련 정보