Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am sure there are a lot of way to backup a site, but I am currently overwhelmed of info overflow from Google search. I have a site running on Amazon AWS (EC2, EBS) and would like to have easy and best way to back up my data.

share|improve this question

closed as not a real question by voretaq7, Ward, Shane Madden, GregD, Chris S Aug 17 '11 at 16:37

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

We can't really answer this without knowing your environment. You need to evaluate backup solutions and pick one that fits your needs. If you narrow the field down to 2-3 possible solutions you can post questions about their differences. As Markus said below, make sure you're getting a good OFF SITE backup (getting your data off Amazon's infrastructure) must be a key component of your backup strategy. – voretaq7 Aug 16 '11 at 15:52

Given, that your site already runs on EC2 you can easily snapshot your EBS-Volumes.

But you should also consider backing things up to your local network or hoster to minimize risk coming from EC2-Outages like EBS data-loss.

share|improve this answer

In case you mean website with 'site', and assuming you're running a linux flavour on an EBS backed EC2 instance (which in many cases would mean apache2, PHP and MySQL), i'd suggest the following:

  • As markus suggests, use the EBS snapshots for global backups of your instances. By far the easiest way to recover after a catastrophic failure. Just launch an instance based on the snapshot. Done. Unfortunately, markus is also right about the risks of only using EBS snapshots; AWS was struck by disaster last week, and a lot of snapshots got unusable (including some of my own). So, additionally, you really do want to make backups from individual resources to external locations, like:
  • Your MySQL databases, use a script like automysqlbackup and let it make daily backups, which you write to a NFS mount (originating from an external backup server ofcourse).
  • Your www data. You could use rsync for this, which is pretty easy to set up but might net you unexpected results (e.g: if stuff gets accidentally deleted on the source server, those deletion changes might get rsynced to the backup location, deleting the files there as well), or use a custom backup script that writes to a NFS mount as well.
  • And last, but (as I found out once again last week) not least: Keep a copy of your server configuration around! Generally this would mean keeping a copy of your entire /etc directory around, in a manner much like described in the point above.

I really think that when it comes to AWS/EC2 backup best practice, it's no different from any other server backup plan. Well, except for the handy EBS snapshots ofcourse, which save you lots of time.. But it cannot be stressed enough that snapshots alone do not provide the safety you want; Always take your own precautions as you would on any other server.

edit: And although this may seem as a lot of work, remember that with some effort you only have to set this stuff up on EC2 only once. You can create a base-AMI that takes care of setting up backups during instance installation (and all other base configuration you usually do).

share|improve this answer

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