How to restore database in Elastic Beanstalk?

后端 未结 2 1944
闹比i
闹比i 2021-01-15 20:40

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

Now I am trying to grab th

2条回答
  •  时光取名叫无心
    2021-01-15 20:55

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

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

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

    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.

    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.

    Sam

提交回复
热议问题