EC2 - 拍摄 EBS 快照,保存到 S3,然后从 S3 启动实例

发布于 2024-08-24 22:36:59 字数 126 浏览 8 评论 0原文

我喜欢拍摄 AMI 快照的便利 - 但理想情况下我不想为附加到我正在运行的实例的卷付费。

有没有一种方法可以将快照实例保存到 S3,然后从 S3 启动,而无需将卷附加到正在运行的实例 - 获得快照的便利 - 无需运行成本?

I like the convenience of taking an AMI snapshot - but ideally I do no want to pay for the volume to be attached to my running instance.

Is there a way to save a snapshot instance to S3 and then launch from S3 without attaching a volume to the running instance - gaining the convenience of snapshots - without the running costs?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

℡寂寞咖啡 2024-08-31 22:36:59

EBS 快照已持久保存到 S3 (http://aws.amazon.com/ebs/)
来自 ebs 文档:

Amazon EBS 还提供了以下功能
创建时间点快照
卷,持久保存到亚马逊
S3。这些快照可以用作
新 Amazon EBS 的起点
卷,并保护数据
长期耐用。相同
快照可用于实例化为
任意卷数

和 AMI 也存储在 S3 中。

EBS snapshots are already persisted to S3 (http://aws.amazon.com/ebs/)
from ebs docs:

Amazon EBS also provides the ability
to create point-in-time snapshots of
volumes, which are persisted to Amazon
S3. These snapshots can be used as the
starting point for new Amazon EBS
volumes, and protect data for
long-term durability. The same
snapshot can be used to instantiate as
many volumes as you wish

and AMIs are also stored in S3.

花心好男孩 2024-08-31 22:36:59

确实,对于 EBS 卷,您需要为分配的空间付费,即使您仅将其中的一小部分用于数据。

如果您只是想存储数据,您可以使用任何工具将数据直接“备份”到S3,然后在需要时将其恢复到卷。 S3sync 对此效果很好,创建 tarball 也很有效。

It's true that with an EBS volume you are paying for the allocated space, even if you are just using a fraction of it for data.

If you are just looking to store the data, you can use any tool to "backup" the data to S3 directly, then restore it to a volume when you need to. S3sync works well for this, so does creating a tarball.

雪落纷纷 2024-08-31 22:36:59

这不仅仅是分配空间与已使用空间的问题。使用 EBS,您还需要在安装卷时为 I/O 操作付费。

我正在尝试做同样的事情——将 EBS 支持的实例迁移到 S3 支持的实例。 此处的其他线程SO 声明这是无法完成的,而是对 Eric Hammond 的 AWS 论坛帖子的回应 表明还有希望

使用在正在运行的 EC2 实例中交换启动磁盘的概念,如以下线程中所述

<块引用>

http://developer.amazonwebservices.com/connect/thread.jspa?threadID=42437

您可以使用旧区域卷中的原始位副本在新区域中创建 EBS 卷,然后将新卷交换到新区域中已停止的 Windows 实例中。

一旦工作正常,就可以从正在运行的实例正常创建 AMI

不适合胆怯的人,但如果这很重要,您也许可以找到可以帮助完成这些步骤的 EC2 Windows 专家。

不完全确定,但埃里克知道他在说什么,所以如果这对你来说足够重要,你可以尝试一下。

It's not just an allocated vs used space issue. With EBS you are also paying for I/O ops while the volume is mounted.

I am trying to do the same thing -- migrate an EBS-backed instance to an S3-backed instance. Other threads here on SO state that this can't be done, but a response to an AWS forum post by Eric Hammond suggests that there is hope:

Using the concepts of swapping out a boot disk in a running EC2 instance as described in the following thread

http:// developer.amazonwebservices.com/connect/thread.jspa?threadID=42437

you might be able to create an EBS volume in the new region with a copy of the raw bits from the old region's volume, then swap the new volume into a stopped Windows instance in the new region.

Once that's working, normal AMI creation from the running instance should be possible

Not for the timid, but if it's important you might be able to find an EC2 Windows expert who can help with the steps.

Not exactly definitive, but Eric knows what he's talking about, so if it's important enough to you you can give it a try.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文