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?



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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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