简体   繁体   English

具有持久数据的Amazon EC2免费服务器

[英]amazon ec2 free server with persistent data

I will install a website in the free EC2 from amazon but I read something not good: I have a simple website which uses a database. 我将在来自Amazon的免费EC2中安装一个网站,但我读到的内容不好:我有一个使用数据库的简单网站。 Users come inside my website and post information, send commetns... if for some reason the instance breaks or amazon shuts it down, will I lose all information posted in my website and database? 用户进入我的网站并发布信息,发送commetns ...如果由于某种原因实例损坏或亚马逊将其关闭,我会丢失发布在我的网站和数据库中的所有信息吗? All files users uploaded and information saved will be gone? 用户上传的所有文件和保存的信息都将消失?

If so, why would someone use EC2 if you lose all your data if some problem happens, and because problems always happen, sometime I will certainly lose my data! 如果是这样,如果发生某些问题而丢失了所有数据,为什么有人会使用EC2,并且由于问题总是会发生,所以有时我肯定会丢失我的数据!

I know I can save an image of my current OS in AWS but do I need to save the image everytime a user posts something to my website? 我知道我可以在AWS中保存当前操作系统的映像,但是每次用户向我的网站发布内容时是否需要保存该映像? It's ridiculous. 太荒谬了 I know I am missing something here, but I looked into google and people all the time say I should use EBS but it's not in the free plan. 我知道我在这里遗漏了一些东西,但是我一直在研究Google,人们一直在说我应该使用EBS,但它不在免费计划中。 So how is it good idea using AWS EC2 free plan if my data will always be at risk of being lost? 那么,如果我的数据总是有丢失的风险,那么使用AWS EC2免费计划是一个好主意吗?

Typically you would want to use an EBS backed instance. 通常,您将要使用EBS支持的实例。 Since the free tier does not support that, but does offer EBS storage, create your database on an EBS partition for data you cannot lose 由于免费层不支持该功能,但是提供EBS存储,因此请在EBS分区上创建数据库,以存储您不会丢失的数据

30 GB of Amazon Elastic Block Storage, plus 2 million I/Os and 1 GB of snapshot storage* 30 GB的Amazon Elastic Block Storage,200万个I / O和1 GB的快照存储*

http://aws.amazon.com/free/ http://aws.amazon.com/free/

You should have a means to quickly launch a new instance, and you should back up the data on your EBS partition because EBS volumes can and do fail from time to time. 您应该有一种快速启动新实例的方法,并且应该备份EBS分区上的数据,因为EBS卷有时会失败,而且确实会失败。

UPDATE 更新

It seems that Micro instances are in fact EBS backed. 似乎Micro实例实际上是由EBS支持的。

It is still advisable to attach a separate EBS volume, because it makes it much more convenient to backup the database (you create a snapshot of the EBS volume... you can find scripts online to accomplish that, which vary a bit depending on your choice of database and file system). 仍然建议附加一个单独的EBS卷,因为这样可以更方便地备份数据库(您可以创建EBS卷的快照...可以在线找到脚本来完成此操作,具体取决于您的选择数据库和文件系统)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM