为EC2 + EB实例创建测试副本 [英] Create a testing copy for EC2 + EB instance

查看:116
本文介绍了为EC2 + EB实例创建测试副本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在AWS(EB和EC2)上安装了应用程序.我的数据库是PostgreSQL,它存储在AWS提供的EBS服务中.

I've my application setup on AWS (EB and EC2). My database is PostgreSQL and it is stored in the EBS service provided by AWS.

我将对我的应用程序进行重大更改(包括侵入性迁移),以确保最终不会丢失数据,我想创建整个应用程序的副本并为此更新代码.

I'm going to push a major change to my application (including invasive migrations), to ensure that I don't end up losing data I want to create a copy of my whole application and update the code for that.

我到目前为止的步骤:

  1. 克隆EB实例
  2. 创建我的EBS的快照,并使用该快照创建新卷
  3. 更新我的EB实例的配置设置以指向新卷,并将新代码部署到EB实例
  1. Clone an EB instance
  2. Create a snapshot of my EBS and use that to create a new volume
  3. Update the configuration settings of my EB instance to point to the new volume and deploy the new code to the EB instance

AWS上找不到有关如何执行这些操作的适当文档,因此我正在寻找有关确保我不会破坏任何东西的步骤的确认.

I can't find proper documentation for how to do these things on AWS so I'm looking for some confirmation about the steps I have ensure that I don't end up wrecking something.

推荐答案

因此,它的工作方式是创建快照,使用从该快照还原的磁盘创建新的EC2,并且具有一个新的EC2运行实例,该实例具有相同的数据库.

So the way it works, you create snapshot, create a new EC2 with Disk restored from that snapshot and you have a new EC2 running instance with same DB.

但是我建议,如果可能的话,在拍摄快照之前先停止postgresql或实例,这将确保数据库的状态是完整的.

But I would suggest if possible stop the postgresql or the instance before taking a snapshot, this will ensure the state of the DB is intact.

两个EC2实例将没有关系,并且在一个数据库中所做的更改不会影响另一个.

The two EC2 instances will have no relation and changes made in one DB will not impact the other.

这篇关于为EC2 + EB实例创建测试副本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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