从中自动化EBS快照的实例本身 [英] Automating EBS snapshot from it's instance itself

查看:154
本文介绍了从中自动化EBS快照的实例本身的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是好主意,以创建从同一个实例它是连接到EBS卷的快照周期?有没有在快照过程中的任何停机时间?基本上,我想保持有规律可每日或EC2实例的每周快照,以便如果有任何病毒或黑客攻击或安全问题,我可以从快照旋转另一个实例。

Is it good idea to create periodic snapshot of the EBS volume from same instance it is attached to? Is there any downtime during snapshot process? I basically wanted to keep a regular may be daily or weekly snapshot of the ec2 instance so that If there is any virus or hacking or security issue I could spin another instance from the snapshots.

推荐答案

当然是肯定的。这是一个很好的做法(我个人认为这是必须的)创建点的时间点快照,并使用它们来创建新卷或还原旧的卷。还有就是快照过程中无需停机。如需更详细的解释,你可以看看这里,特别强调该部分:

Absolutely yes. It's a good practice (personally, I consider it a must) to create point-in-time snapshots and to use them to create new volumes or restore old volumes. There is no downtime during the snapshot process. For a more detailed explanation you may take a look here, with particular emphasis on this part:

您可以采取的附加卷正在使用的快照。然而,   快照只能捕获已写入到您的Amazon EBS数据   当时发出快照命令卷。这可以排除   已经缓存由任何应用程序或操作系统的任何数据   系统。如果可以暂停任何文件写入体积足够长,以   拍摄快照,您的快照,应该是完整的。但是,如果   不能暂停所有文件写入卷,您应该卸载   从实例内体积,发出快照的命令,然后   重新安装该卷以确保一致的和完整快照。您   可以重新安装和使用量,而快照状态为正在申请中。

You can take a snapshot of an attached volume that is in use. However, snapshots only capture data that has been written to your Amazon EBS volume at the time the snapshot command is issued. This may exclude any data that has been cached by any applications or the operating system. If you can pause any file writes to the volume long enough to take a snapshot, your snapshot should be complete. However, if you can't pause all file writes to the volume, you should unmount the volume from within the instance, issue the snapshot command, and then remount the volume to ensure a consistent and complete snapshot. You may remount and use your volume while the snapshot status is pending.

在做操作涉及的数据,我认为这是非常重要的是要知道的一切,你要使用的技术。因此,我想借此机会,把重点放在一些问题,从官方AWS EBS文档拍摄,这是非常重要的:

Before doing operation involving data I think it's very important to know everything about a technology that you are going to use. So, I would like take this opportunity to put the focus on some points, taken from the official AWS EBS documentation, that are very important:

亚马逊EBS卷被设计为高可用性和可靠性。   在无需支付额外费用给你,亚马逊EBS卷的数据复制   横跨在可用区以prevent的损失多台服务器   从任何单个组件的失效数据

Amazon EBS volumes are designed to be highly available and reliable. At no additional charge to you, Amazon EBS volume data is replicated across multiple servers in an Availability Zone to prevent the loss of data from the failure of any single component.

如果你想获得更高的耐用性,您可以使用Amazon EBS   快照功能。快照存储在Amazon S3和也   在多个可用区域自动复制。您可以   把你卷的频繁快照的方便,   成本效益的方式来提高数据的长期耐久性。   在万一您的Amazon EBS卷中出现故障,所有的   该卷的快照保持不变,并可以重新创建   量从上次快照。

If you wish to achieve greater durability, you can use the Amazon EBS Snapshot capability. Snapshots are stored in Amazon S3 and are also replicated automatically among multiple Availability Zones. You can take frequent snapshots of your volume for a convenient and cost-effective way to increase the long-term durability of your data. In the unlikely event that your Amazon EBS volume does fail, all snapshots of that volume remain intact and you can re-create your volume from the last snapshot.

下面,关于EBS卷的持久性的一些注意事项:

Here, some notes about the durability of EBS volumes:

卷的耐用性既取决于音量大小   而数据自上次发生了变化的百分比   快照。作为一个例子,卷带20 GB的或更少操作   修改后的数据,因为他们最近的亚马逊EBS快照可以期待   0.5%,其中失败 - 之间的0.1%的年故障率(AFR)   指的是体积的完全丧失。与此相比,大宗商品   与AFR通常失败的4%左右的硬盘,使得EBS   体积10倍,比一般商品的磁盘驱动器更加可靠。

The durability of your volume depends both on the size of your volume and the percentage of the data that has changed since your last snapshot. As an example, volumes that operate with 20 GB or less of modified data since their most recent Amazon EBS Snapshot can expect an annual failure rate (AFR) of between 0.1% – 0.5%, where failure refers to a complete loss of the volume. This compares with commodity hard disks that typically fail with an AFR of around 4%, making EBS volumes 10 times more reliable than typical commodity disk drives.

关于价格的重要细节:

亚马逊EBS快照是增量存储:只有块   上次快照之后已经改变被保存,和你结算   仅在更改块。如果你有一个设备具有100 GB的数据   但只有5 GB上次快照之后发生了变化,随后的   快照只消耗增加5 GB,你只为计费   另外5 GB的快照存储的,即使两个较早,   后来快照显示完整的。

Amazon EBS Snapshots are stored incrementally: only the blocks that have changed after your last snapshot are saved, and you are billed only for the changed blocks. If you have a device with 100 GB of data but only 5 GB has changed after your last snapshot, a subsequent snapshot consumes only 5 additional GB and you are billed only for the additional 5 GB of snapshot storage, even though both the earlier and later snapshots appear complete.

下面就是为什么你会留下来,当你删除快照的一个安全:

Here is why you may stay secure when you delete one of your snapshots:

当你删除一个快照,仅卸下不需要的任何数据   其他快照。所有活动快照包含的所有信息   到卷恢复至即时在哪些该快照是需要   拍摄。的时间来恢复更改的数据,工作容积是   适用于所有的快照。

When you delete a snapshot, you remove only the data not needed by any other snapshot. All active snapshots contain all the information needed to restore the volume to the instant at which that snapshot was taken. The time to restore changed data to the working volume is the same for all snapshots.

快照的另一个重要的优点:

Another important advantage of snapshots:

快照可以用来实例多个新卷,展开   跨可用区域的体积大小,或移动卷。当一个   创建新卷,你可以选择它的基础上的创造   现有的亚马逊EBS快照。在那种情况下,新的卷开始   作为快照的精确副本。

Snapshots can be used to instantiate multiple new volumes, expand the size of a volume, or move volumes across Availability Zones. When a new volume is created, you may choose to create it based on an existing Amazon EBS snapshot. In that scenario, the new volume begins as an exact replica of the snapshot.

好吧,我觉得这些都是一些最重要的事情使用Amazon EBS的时候就知道了。对于进一步的细节来看看这里。支付在亚马逊EBS快照部分特别注意。

Ok, I think that these are some of the most important things to know when using amazon EBS. For further details take a look here. Pay particular attention on the "Amazon EBS Snapshots" section.

这篇关于从中自动化EBS快照的实例本身的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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