我正在使用heroku,我想从我的应用程序(heroku)下载数据库,以便对其进行一些更改,我已经安装了PGBackup,但每次下载heroku pgbackups:url
次.转储文件
如何下载或翻译postgresql文件.转储到postgresql文件中?
我正在使用heroku,我想从我的应用程序(heroku)下载数据库,以便对其进行一些更改,我已经安装了PGBackup,但每次下载heroku pgbackups:url
次.转储文件
如何下载或翻译postgresql文件.转储到postgresql文件中?
如果您正在使用Heroku的PGBackup(您可能应该使用它):
$ heroku pg:backups capture
$ curl -o latest.dump `heroku pg:backups public-url`
将其"翻译"成postgres db
$ pg_restore --verbose --clean --no-acl --no-owner -h localhost -U myuser -d mydb latest.dump
见https://devcenter.heroku.com/articles/heroku-postgres-import-export