如何将Heroku数据库连接到本地机器?我有一个Django应用(不是Rails)

时间:2023-01-12 19:01:27

How do I get my database off Heroku? I'm trying to figure out how to sync with my local machine.

如何让我的数据库离开Heroku?我想知道如何与本地机器同步。

I easily found instructions for a rails app, but not Django.

我很容易找到rails应用程序的说明,但Django没有。

2 个解决方案

#1


1  

While convenient, using taps may not replicate your data exactly and may run into errors for larger transfers. To import or export data from your production system, we highly recommend using pgbackups instead. https://devcenter.heroku.com/articles/pgbackups

虽然很方便,但是使用tap可能不能准确地复制您的数据,并可能在较大的传输过程中遇到错误。要从生产系统导入或导出数据,我们强烈建议使用pgbackup代替。https://devcenter.heroku.com/articles/pgbackups

#2


0  

The heroku cli provides the "db" command to move your data between your local machine and heroku.

heroku cli提供了“db”命令,用于在本地计算机和heroku之间移动数据。

See their help: https://devcenter.heroku.com/articles/taps

看到他们的帮助:https://devcenter.heroku.com/articles/taps

And their blog post from a couple years ago: http://blog.heroku.com/archives/2009/3/18/push_and_pull_databases_to_and_from_heroku/

他们几年前的博客:http://blog.heroku.com/archives/2009/3/18/push_and_pull_databases_to_and_from_heroku/

#1


1  

While convenient, using taps may not replicate your data exactly and may run into errors for larger transfers. To import or export data from your production system, we highly recommend using pgbackups instead. https://devcenter.heroku.com/articles/pgbackups

虽然很方便,但是使用tap可能不能准确地复制您的数据,并可能在较大的传输过程中遇到错误。要从生产系统导入或导出数据,我们强烈建议使用pgbackup代替。https://devcenter.heroku.com/articles/pgbackups

#2


0  

The heroku cli provides the "db" command to move your data between your local machine and heroku.

heroku cli提供了“db”命令,用于在本地计算机和heroku之间移动数据。

See their help: https://devcenter.heroku.com/articles/taps

看到他们的帮助:https://devcenter.heroku.com/articles/taps

And their blog post from a couple years ago: http://blog.heroku.com/archives/2009/3/18/push_and_pull_databases_to_and_from_heroku/

他们几年前的博客:http://blog.heroku.com/archives/2009/3/18/push_and_pull_databases_to_and_from_heroku/