Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I just realized that my aws instance count has risen into the double digits. I'm currently backing portions of my folders and dbs and moving them off to a backup instance.

What I think I should be doing is taking a snapshot of the instances (automatically) and persisting them on S3 so I have a running 7 day collection of daily backups.

There is a question asking the same thing here, however the answers don't go into depth.

So the closest answer seems to be: use a cron job to snapshot the instance. So do I run the cron job on the instance itself? or do I have a micro instance to run these snapshots?

Could I get an example script or the command for say a linux flavor? what software must I have installed to get this to run?

Thanks.

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

Amazon has a pretty good walk-through for setting up the Command Line tools. Those can be run from anything with visibility to the web, so could be an instance, could be a VPS hosted at GoGrid, or your laptop. Doesn't matter.

  1. Download and install the Amazon EC2 API Tools, which are java-based and can run with both Linux or Windows.
  2. Set up your API key.
  3. Download your API key.
  4. Set the environment variables needed for the EC2 API Tools to work.
  5. Set up a script invoking ec2-create-snapshot to create your backups.
  6. Add to cron anywhere you choose.
share|improve this answer
add comment

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.