恢复Elastic Beanstalk RDS [英] Restoring an Elastic Beanstalk RDS

查看:50
本文介绍了恢复Elastic Beanstalk RDS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在重建弹性beantalk环境时,EB将自动重新创建一个新的关联RDS实例.

When rebuilding an elastic beanstalk environment, EB automatically recreates a new and associated RDS instance.

一旦关联,就无法将RDS实例与EB环境解除关联.

Once associated, RDS instances cannot be dissociated from an EB environment.

在重建之前,我具有先前RDS的快照.

I have a snapshot of the previous RDS prior to the rebuild.

您无法将RDS快照还原到现有RDS实例.

You cannot restore RDS snapshots to an existing RDS instance.

然后,如何在附加了所需快照的情况下重建环境?或者,如何使用现有快照,或如何将现有快照数据迁移到新数据库(我尝试使用创建模式进行数据导出,但缺少导入权限).任何适当但理想的简单选择都可以.

How then, can I rebuild the environment with my desired snapshot attached? Or, how can I use my existing snapshot, or how can I migrate the existing snapshot data to the new database (I tried a data export with create schema's but lacked permissions on the import). Any appropriate but ideally simple option will do.

推荐答案

如果您具有RDS DB的快照,则可以使用它创建一个新的环境.为此,您需要指定

If you have a snapshot of your RDS DB, you can create a new environment with it. For this, you need to specify the DBSnapshotIdentifier option setting.

  1. 在项目的根目录中创建文件 .ebextensions/rds_builder.config
  2. 添加以下内容:

  1. Create a file .ebextensions/rds_builder.config in the root of your project
  2. Add the following:

option_settings:
  aws:rds:dbinstance:
    DBSnapshotIdentifier: <snapshot ID here>

您还可以使用创建新的环境.保存的当前模板的配置模板.保存的模板可能包含 aws:rds:dbinstance 中的信息(因为您已经将当前环境与RDS关联了),因此您需要基本修改此位以指向您的快照.这应该可行,并且可能是更好的方法.

You can also create a new environment using a saved configuration template of the present one. It is likely that this saved template will contain information in the aws:rds:dbinstance (since you have associated your present environment with an RDS), so you would need to basically modify this bit to point to your snapshot. This should work, and is probably the better approach.

这篇关于恢复Elastic Beanstalk RDS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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