Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

According to the Amazon EC2 FAQ, when an instance is terminated the data is gone. What steps can I take to preserve data in the event my instance is rebooted? I've been looking into EBS and S3 - would either of these be useful to store an active database? How often are instances rebooted anyways?

share|improve this question
2  
A sidenote about terminology: note that terminating an instance is different from merely rebooting it. Terminating wipes the instance storage while rebooting doesn't (see e.g. stackoverflow.com/questions/637790/…). So you don't actually mean rebooting :) – Jonik Apr 24 '10 at 8:18

migrated from stackoverflow.com Jul 27 '09 at 1:24

4 Answers

up vote 21 down vote accepted

Like others have said, EBS--Elastic Block Storage. I am using it myself now that it is released to the general public. It is better than S3 on multiple points:

  • EBS are fast. Faster than even the local mounts, according to Amazon.
  • EBS mounts as proper devices. Unlike S3, which you'll need custom S3 oject access logic in your code, or middleware (JungleDisk, ElasticDisk, et al) which present their own problems and costs
  • EBS are easy to back up. Amazon give one the ability to take snap shots, which are saved on S3
  • EBS are portable between instances--volumes can be unmounted from one instance, and attached to another instance
  • EBS devices can even be RAID'ed together for improved reliability

My experience with EBS so far has been the most positive thing about AWS I've dealt with to date.


Update: While my experience with EBS has been positive, others have had issues. Very specifically EBS do not implement fsync() correctly. Ted Dziuba has some interesting words about this in his blog post Amazon — The Purpose of Pain: Myth 2: Architecture Will Save You from Cloud Failures

This gets even more entertaining with Amazon Elastic Block Store, which, as the Reddit administrators have found, will happily accept calls to fsync(), and lie to your face, saying that the data has been written to disk, when it may not have been.

share|improve this answer
EBS are sometimes fast, sometimes slow. RAIDing multiple volumes together helps a lot. – ceejayoz Oct 26 '11 at 12:58

EBS would certainly work for a database, and is one of the examples in Amazon's EBS Description. "Amazon EBS is particularly suited for applications that require a database..."

EBS will work just like a block device (think hard disk), giving you broad freedom and comfortability using it. S3 is conceptually more like really fast FTP, with a special API. You could conceivably use it as part of a database, but standard databases don't run on it (yet?).

You will want to review Amazon's descriptions of performance (EBS > S3), durability (S3 > EBS) and price (depends).

share|improve this answer

this site - http://www.sunsetlakesoftware.com/2008/09/13/running-drupal-website-amazon-ec2 -- shows how to make an ebs mount as a persistent drive and automatically take snapshots

share|improve this answer

Sounds like if you're worried about losing data then you need the above mentioned EBS. There's a bit of an intro here.

I haven't personally looked into it much more than this thus far, I'm just using S3 for backups currently.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.