Amazon EC2 - 图像和卷之间的差异
顺便说一句,我目前正在 m1.Small(在 Amazon AMI 32 位上运行)上运行我的 LAMP 服务器。 (EBS)
有关此问题的数据 Linux 及其配置(例如时区) 我安装的应用程序(例如 s3cmd、apache) “/var/www/html” - 我的网站的存储位置 mysql数据 经过几个小时的谷歌搜索和阅读他们的帮助手册后,我对以下概念感到困惑。 * 图像有 1,2,3,4 * 体积有 2,3,4? (即卷中没有操作系统数据)
我的理解正确吗?
所以如果我想回到特定的快照。使用卷。 (即仅当它们共享相同的 AMI 时才有效) 1. 从快照创建卷 2. 从实例中分离卷 3.
使用映像将上述过程创建的新卷附加到实例。 1. 从快照创建映像 2. 从映像启动实例 3. 将旧弹性 IP 关联到新实例 4. 终止旧实例等
我确信我在这里误解了一些内容。图像和卷之间基本上有什么区别?
BTW, I'm running my LAMP server on m1.Small (running on Amazon AMI 32bit) at the moment. (EBS)
Data regarding this question
Linux and its configuration (e.g. Timezone)
apps I install (e.g. s3cmd, apache)
"/var/www/html" - where my Web is stored
mysql data
After hours of googling and reading their help manuals I am confused with concepts as the following. * Images have 1,2,3,4 * Volumes have 2,3,4? (i.e. No OS data in Volume)
Is my understanding correct?
So if I want to go back to a specific snapshot. Using Volumes. (i.e. only works if they share the same AMI) 1. create the Volume from the snapshot 2. detach a Volume from the instance 3. attach the new Volume created by above process to the instance
Using Images. 1. create Image from snapshot 2. launch an instance from the Image 3. Associate Old Elastic IP to the New instance 4. Terminate Old instance etc
I'm sure I am misunderstanding something here. Basically what the difference between Images and Volumes?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您对如何返回系统旧副本的描述几乎是正确的,您只是需要在术语上进行一些澄清。
EBS 卷就像连接到您的实例的硬盘驱动器。
您可以在不同的安装点同时连接多个卷,就像在物理服务器上一样。
其中一个卷的根文件系统包含您正在运行的操作系统的核心。它还可能包含您的网页和 MySQL 数据,或者您可以将它们配置在单独的附加卷上。
快照就像硬盘驱动器的副本,可用于创建具有相同内容的新硬盘驱动器(卷)。您可以拍摄任何卷、操作系统根目录或数据的快照。当您创建新的 AMI(映像)时,它是使用快照完成的。
AMI 是根 EBS 卷的快照,它也以特殊方式注册,以便可用于启动新实例。注册的 AMI 还可以引用应复制到新卷并附加到新实例的其他快照。
您可以在实例运行时将非根卷与实例分离或附加到实例。您还可以分离和附加根 EBS 卷,但只能在实例停止时进行(不常见,但偶尔有用)。
即使实例没有运行相同的 AMI,也可以在实例之间移动或复制数据卷。
Your descriptions of how to get back to old copies of the system are pretty much correct, you just ned a little clarification in terminology.
An EBS volume is like a hard disk drive connected to your instance.
You can have multiple volumes attached at the same time at different mount points, just like on a physical server.
One of those volumes has the root file system with the core of the OS you are running. It might also have your web pages and MySQL data or you might configure those on a separate attached volume.
A snapshot is like a copy of a hard disk drive that can be used to create new hard disk drives (volumes) with the same content. You can take snapshots of any volume(s), os root or data. When you create a new AMI (image) it is done using snapshots.
An AMI is a snapshot of the root EBS volume that is also registered in a special way so that it can be used to start new instances. The registered AMI can also reference additional snapshots that should be copied to new volumes and attached to the new instance.
You can detach and attach non-root volumes from/to instances while they are running. You can also detach and attach root EBS volumes, but only while the instance is stopped (not common, but occasionally useful).
A data volume can be moved or copied between instances even if they are not running the same AMI.