gpt4 book ai didi

ruby-on-rails - 如何让我的暂存和生产具有相同的数据? (英雄)

转载 作者:太空狗 更新时间:2023-10-30 01:43:43 26 4
gpt4 key购买 nike

我看过 Heroku 的 Taps 项目 ( http://devcenter.heroku.com/articles/taps )但是外键有很大的限制,所以我不太愿意使用它。

我想做的就是安全地获取我的生产数据并将其放在我的暂存应用程序中,以便两者更加匹配。有什么建议吗?

最佳答案

Thoughtbot 几周前发布了这个:

您需要 pgbackups 插件(免费),并使用它从生产转移到暂存

heroku addons:add pgbackups --remote staging
heroku addons:add pgbackups --remote production
heroku pgbackups:capture --remote production
heroku pgbackups:restore DATABASE `heroku pgbackups:url --remote production` --remote staging

要点在这里:https://gist.github.com/1095522

编辑:确保您的 git 分支“staging”和“production”指向 heroku 应用程序。

git remote add production production_heroku_app
git remote add staging staging_heroku_app

关于ruby-on-rails - 如何让我的暂存和生产具有相同的数据? (英雄),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6930624/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com