Database restore with Elastic Beanstalk
So you have an Elastic Beanstalk environment with an RDS instance with automated backup and you just hosed your database and need to restore.
At first you may think this should be a quick and simple process until you try to restore your database. With RDS you can only restore a backup to a new instance. This seems reasonable until you figure out there's no way to change your RDS endpoint in your Beanstalk environment, or at least no solution was readily available in the documentation. You also can't create a new environment from an automated backup.
Here's the steps I used to solve this problem:
- Restore the database to a new RDS instance.
- Make a manual backup of this new RDS instance.
- Create a new Beanstalk environment using your manual RDS backup.
- Test to make sure everything is working as expected.
- Update URLs or DNS to make sure traffic is routed to your new environment.
Need some help?
Do you need help with crafting your next high-performance app? Are you struggling to determine the right architecture for your next project? Contact us to discuss how we can help!