如何弹性魔豆恢复数据库? [英] How to restore database in Elastic Beanstalk?

查看:188
本文介绍了如何弹性魔豆恢复数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在亚马逊弹性魔豆运行的Ruby 1.9.3和Rails 3.2.8。经过几个问题我这边的数据,我做了耙分贝:重装

I am running Ruby 1.9.3 and Rails 3.2.8 on Amazon Elastic Beanstalk. After several issues with my side of the data, I did a rake db:reload

现在我想抓住我在数据库pre重载已经创建的数据。我按照亚马逊的文档中的说明。

Now I am trying to grab the data that I had already created in the database pre-reload. I have followed the instructions in the Amazon documentation .

然而,在第6步:输入在数据库实例标识符文本框中恢复的数据库实例的名称。 - 提示力赋予了新的名称实例 - 从而创造一个新的实例。

However, on step 6: Type the name of the restored DB instance in the DB Instance Identifier text box. - The prompt forces to give a new name to the Instance - thus creating a new instance.

这是所有好,但我不能改变我使用与弹性青苗数据库实例,因此它接缝对我没用。除非我失去了一些东西。

That is all good, except I cannot change the db instance I am using with Elastic Beanstalk, so it seams useless to me. Unless I am missing something.

帮助,请!

推荐答案

浇过interwebs几天后 - !我试过一些作品

After pouring over the interwebs for several days - I tried something that works!

比方说,被破坏的情况下被称为badinstance。它有一个名为端点:badinstance.c5taqjjaja1d.us-west-2.rds.amazonaws.com:3306

Let's say the corrupted instance is called "badinstance". It has an endpoint called: badinstance.c5taqjjaja1d.us-west-2.rds.amazonaws.com:3306

一旦恢复在时间点数据库,RDS将创建一个新的实例,让我们说你把它叫做的newInstance。

Once you have restored the database to point in time, RDS will create a new instance, let's say you called it "newinstance".

您弹性魔豆仍将指向badinstance.c5taqjjaja1d.us-west-2.rds.amazonaws.com:3306 首先删除badinstance - 可怕的,我知道 - 我做了多重备份之前,我其实打删除。 然后点击的newInstance,然后选择修改。你将能够实例标识符变更为badinstance。确保在这一点上,在数据库实例的安全组匹配你必须弹性青苗组。

Your Elastic Beanstalk will still be pointing to badinstance.c5taqjjaja1d.us-west-2.rds.amazonaws.com:3306 First delete "badinstance" - scary I know - I did multiple backups before I actually hit "delete. Then click on "newinstance" and select modify. You will be able to change the instance identifier to "badinstance". Make sure at this point that the security groups on the db instance match the group you have to Elastic Beanstalk.

名称变更花了很长时间的时间(我在下午3点左右左右的请求,并看到它经历了大约上午03时50分,第二天早上)。

The name changing took a long time to take place (I made the request around 3 pm or so and saw that it went through at around 3:50 am the next morning).

我重新启动弹性魔豆的应用程序服务器,瞧:数据已恢复

I restarted the Elastic Beanstalk app-server and voila: the data had been restored.

希望这将有助于别人的道路。

Hopefully this will be helpful to someone down the road.

山姆

这篇关于如何弹性魔豆恢复数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆