ruby-on-rails – Heroku – 如何将数据从数据库提取到本地数据
发布时间:2020-12-17 01:32:52 所属栏目:百科 来源:网络整理
导读:我正在尝试从Heroku上获取数据库,并从那里获取数据以保存到我的本地数据库中. 当我尝试 heroku db:pull 并确认应用程序的名称,我得到: ! db:push and db:pull have been removed and replaced with pg:push and pg:pull. ! For more information,please see
我正在尝试从Heroku上获取数据库,并从那里获取数据以保存到我的本地数据库中.
当我尝试 heroku db:pull 并确认应用程序的名称,我得到: ! db:push and db:pull have been removed and replaced with pg:push and pg:pull. ! For more information,please see: ! devcenter.heroku.com/articles/heroku-postgresql#pg-push-and-pg-pull 好的,所以: pg:pull 收益: -bash: pg:pull: command not found heroku pg:pull 回报 ! `pg:pull` is not a heroku command. ! Perhaps you meant `db:pull` or `pg:psql`. ! See `heroku help` for a list of available commands. 那么,如何正确提取数据呢? 解决方法
根据
Heroku Postgres help,您必须指定要从中拉出的数据库,以便pg:pull to work.
$heroku pg:pull HEROKU_POSTGRESQL_MAGENTA mylocaldb --app sushi 此命令将创建一个名为mylocaldb的新本地数据库,然后从应用程序寿司中的DATABASE_URL数据库中提取数据.为防止意外数据覆盖和丢失,本地数据库不得存在.在继续之前,系统将提示您删除已存在的本地数据库. 这也假设您在本地计算机上有Postgres. heroku pg:info将在Heroku数据库中为您提供所有可用信息,例如名称. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- ruby-on-rails – 如何在Facebook上的电影部分列出应用程序
- 如何在iOS半透明中制作PhoneGap状态栏?
- Cocos2d-3.x_Android物理按键回调
- Oracle数据库里面查询字符串类型的字段不为空和为空的SQL语
- c – std :: list,std :: vector方法和malloc()
- ruby-on-rails – 将options_for_select更改为单选按钮
- Ajax之X-Requested-With请求头
- oracle 11.2.0.4(CentOS release 6.8) 打24006111补丁
- 初步探索fastJson
- 使用DragonBones开发FLASH骨骼动画入门教程