亚马逊ec2 实例删除_自动化Amazon EC2实例备份和恢复,第二部分

亚马逊ec2 实例删除

第二部分:从快照恢复EC2实例。 (Part Two: Recovering an EC2 Instance from a Snapshot.)

Skill Level: Intermediate.Operating System(s): Linux.

技能水平:中级。 操作系统: Linux。

第一部分的最后一次… (Last Time in Part One…)

We left off at the end of part one with a scheduled snapshot running from cron once every day. In part two, we will learn how to recover a failed AWS EBS-backed EC2 instance from a snapshot with just a few commands.

在第一部分的结尾,我们每天定时从cron运行一次计划的快照。 在第二部分中,我们将学习如何仅用几个命令从快照中恢复失败的AWS EBS支持的EC2实例。

灾难场景 (Disaster Scenarios)

What are some of the situations which would force us to do a full instance recovery? Here are just a few:

在哪些情况下会迫使我们执行完整实例恢复? 这里仅仅是少数:

  • Filesystem corruption

    文件系统损坏
  • Malicious intrusion

    恶意入侵
  • Hardware failure

    硬件故障
  • Extended Amazon general outage affecting your instance but not others

    扩展的Amazon一般中断影响您的实例,但不影响其他实例
  • Human error

    人为错误

恢复方案 (Recovery Scenarios)

您还有另一个EC2实例 (You have another EC2 instance)

This is my preferred approach. Since I maintain multiple instances, they all have the cron backups running, and so therefore all have the ability to perform recovery tasks as well. If you have another instance, but it does not yet have the EC2 API tools installed and working, please review Part One for instructions on how to set this up.

这是我的首选方法。 由于我维护多个实例,因此它们都具有正在运行的cron备份,因此它们都具有执行恢复任务的能力。 如果您有另一个实例,但尚未安装并运行EC2 API工具,请查看第1部分,以获得有关如何进行设置的说明。

您没有其他实例 (You do not have another instance)

Below are some possible options to consider:

以下是一些可以考虑的选项:

  • Create an new T1.micro “admin-only” instance. They are quite inexpensive on a monthly basis and still give you full functionality. They are cheap enough to keep running full time so you don’t have to fuss during a crisis.

    创建一个新的T1.micro“仅管理员”实例。 它们每月非常便宜,但仍然为您提供全部功能。 它们足够便宜,可以保持全时运行,因此您在危机期间不必大惊小怪。
  • Use these instructions to clone your existing single instance. This could potentially be costly if you are running a large instance and make an exact RUNNING copy of it. A less costly way would be to clone the instance and keep it powered off until needed.

    使用以下说明克隆您现有的单个实例。 如果您正在运行大型实例并为其创建精确的RUNNING副本,则这可能会造成很高的成本。 成本较低的方法是克隆实例并关闭其电源,直到需要时为止。
  • Use your home system to provide the functionality. Please see John Degner’s excellent tutorial for instructions. Detailed instructions for this solution are beyond the scope of this tutorial, but these examples can easily be used in this situation.

    使用您的家庭系统来提供功能。 有关说明,请参见John Degner的出色教程。 此解决方案的详细说明超出了本教程的范围,但是在这种情况下可以轻松使用这些示例。

选择一种方法– AWS控制台或命令行 (Choose a Method – AWS Console or Command-Line)

Included in this tutorial are both methods – GUI and CLI. Each has advantages, and I leave it up to you to pick the one you prefer…

本教程中包括两种方法– GUI和CLI。 每一种都有优点,我让您选择自己喜欢的一种…

先决条件: (Prerequisites:)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值