Heroku Postgres pg_backup on Amazon S3 Bucket

时间:2015-12-10 01:54:50

标签: amazon-s3 heroku-postgres

I have a production application (Java Play Framework2 with multi-tenancy) hosted on Heroku with PostgreSQL database. I want to be able to do a pg_dump of a certain schema directly to Amazon S3 bucket. However, it doesn't accept the file location.

The code that I am trying is: $ pg_dump -Fc --no-acl --no-owner (host) --port=(port num) --dbname=(database) > s3-us-west-1.amazonaws.com://(bucket name)/output.sql.

1 个答案:

答案 0 :(得分:0)

您可以使用goofys将S3存储桶挂载为本地文件系统,这样您就可以使用pg_dump写入它。