heroku db:pull to Ubuntu postgresql

问题描述:

我想将我的应用程序从Heroku迁移到我自己的Ubuntu服务器。什么是使用taps/heroku db:pull来做到这一点的正确语法?heroku db:pull to Ubuntu postgresql

您只需执行heroku db:pull即可将数据库从Heroku中提取到您的本地数据库中,然后您可以备份并恢复到您自己的服务器。如果它是一个大型数据库,您可能希望查看Heroku pgbackups作为替代方案,因为它会为您提供可下载的备份。

注意:如果你想在数据库之间迁移,即postgres => mysql,那么你将不得不使用db:pull方法。

如果在本地和云数据库两者是Postgres的你应该遵循Heroku的Devcenter指令之间移动数据:

https://devcenter.heroku.com/articles/migrating-data-between-plans