小编use*_*534的帖子

如何在heroku上获得纯文本postgres数据库转储?

由于我的postgres数据库在heroku(9.1)和我的本地安装(8.4)上的版本不兼容,我需要一个纯文本sql数据库转储文件,所以我可以将我的生产数据的副本放在我的本地测试环境中.

看来在heroku上我无法使用pg_dump进行转储,但只能这样做:

$ heroku pgbackups:capture
$ curl -o my_dump_file.dump `heroku pgbackups:url`
Run Code Online (Sandbox Code Playgroud)

......这给我的"自定义数据库的转储文件格式",而不是"纯文本格式",所以我不能够做到这一点:

$ psql -d my_local_database -f my_dump_file.sql
Run Code Online (Sandbox Code Playgroud)

sql postgresql heroku

41
推荐指数
4
解决办法
2万
查看次数

标签 统计

heroku ×1

postgresql ×1

sql ×1