[英]Transfer heroku database from one bamboo app to another cedar app
Is there a faster way to transfer database on one app to another, without using capture and restore process which is taking 3hrs in my case. 有没有一种更快的方法可以将一个应用程序上的数据库转移到另一个应用程序,而无需使用捕获和还原过程,我的情况需要3个小时。
We are trying to move to Cedar app and can't afford a 3hrs downtime. 我们正在尝试使用Cedar应用程序,并且无法承受3个小时的停机时间。
Is it possible to: 1. create a follower on current prod app 2. allow to catch up. 是否可以:1.在当前的产品应用上创建关注者2.允许赶上。 3. maintenace on 4. unfollow the follower on current prod app that I created on step 1 5. Promote that follower to another app.
3.维护4.在我在步骤1创建的当前prod应用程序上取消关注该关注者。5.将该关注者升级到另一个应用程序。 6. maintenance off
6.维护关闭
Similar to this link: https://devcenter.heroku.com/articles/fast-database-changeovers but trying to promote it to another app. 类似于此链接: https : //devcenter.heroku.com/articles/fast-database-changeovers,但尝试将其升级到另一个应用程序。
Is it possible? 可能吗?
Regards 问候
If you are on one of the production plans for your database, you're in luck. 如果您正在使用数据库的生产计划之一,那么您很幸运。 There is a secret flag that you can use.
您可以使用一个秘密标志。 It doesn't work for the dev plans, only crane and above.
它不适用于开发计划,仅适用于起重设备。 If your Bamboo app has a crane or better database, you can create a fork of it by grabbing the DATABASE_URL, and then running:
如果Bamboo应用程序具有Crane或更好的数据库,则可以通过获取DATABASE_URL,然后运行来创建它的分支:
heroku addons:add heroku-postgresql:crane --fork="<PASTE DATABASE_URL HERE>" --app your-cedar-app
Or if you prefer, for minimal downtime using a procedure similar to our fast changeover : 或者,如果您愿意,可以使用类似于我们快速转换的过程来最大程度地减少停机时间:
heroku addons:add heroku-postgresql:crane --follow="<PASTE DATABASE_URL HERE>" --app your-cedar-app
heroku pg:wait --app your-cedar-app # let the new database boot
heroku pg:info --app your-cedar-app # Make sure it's caught up, Behind By should be =~ 0.
heroku maintenance:on --app your-cedar-app
heroku pg:unfollow HEROKU_POSTGRESQL_<color of new database> --app your-cedar-app
heroku pg:promote HEROKU_POSTGRESQL_<color of new database> --app your-cedar-app # make it the primary
heroku maintenance:off --app your-cedar-app
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.