3

I am not a Linux admin, although I wish I was, and I have seen these questions

And this suggestion http://alestic.com/2009/09/ec2-consistent-snapshot

I tried using command line + crontab (the command line works, but crontab for some reason, doesn't)

But I'm still pretty lost, all I want is an automated, rolling backup of my amazon EC2 (EBS) data

(by rolling I mean keep 3-4 weeks back, but delete old snapshots as new ones come for cost control)

And as things usually go, if there is something that is hard and painful, someone creates a solution for it.

My question is simple, is there a way using a tool like Puppet to do it without a painful learning curve?

(or via other tools like http://ylastic.com)

If yes, how?

Eran Medan
  • 173
  • 1
  • 1
  • 8
  • 1
    Take a look at Skeddly http://www.skeddly.com for automated, rolling EBS snapshots. (Disclaimer, I am associated with this product) – Matt Houser Oct 01 '12 at 18:45
  • @MattHouser please put this as an answer, it fits the question (I modified it to be less specific) and exactly what I was looking for – Eran Medan Oct 02 '12 at 01:41
  • I created PHP based script and easy to install instruction. It will create backups and delete old. Fully configurable. http://serverfault.com/questions/237246/automate-amazon-ebs-snapshot-creation – Sergey Romanov Mar 26 '14 at 16:31

3 Answers3

2

Take a look at Skeddly for automated, rolling EBS snapshots.

Disclaimer, I am associated with this product

Matt Houser
  • 10,053
  • 1
  • 28
  • 28
1

Puppet isn't a backup solution, although you could use Puppet to deploy, configure, and maintain a backup solution. This could be as simple as scripts that use the EC2 API command line tools and cron (not sure what problem you had here, but it certainly could be done this way). Or use the AWS SDK for whatever programming language you prefer.

It sounds like Ylastic or a service for this would suit you best. Ylastic works for us. We use EC2 tags for volumes we want to snapshot and Ylastic handles the rest (including rolling backups).

czervik
  • 241
  • 1
  • 3
1

Create a script which uses "ec2-consistent-snapshot" and add it to crontab to run once a day (or any suitable interval).

To remove old snapshots use "ec2-describe-snapshots" and check the date to remove old snapshots.

horte
  • 471
  • 1
  • 3
  • 3
  • yes, tried it, no matter what I do, the crontab doesn't run, and as I said I'm not a linux Admin, and simply couldn't find out why (checked the logs, tried different users / paths, nothing), I know that with enough time I will figure it out, but I was looking for something that will spare me that... – Eran Medan Oct 02 '12 at 01:40
  • Where are you setting the needed env variables? Have you checked so all env variables that is needed to run ec2 cmd tools are set when rc.local is run. I usually create a script file which sets all needed env variables and then lets rc.local call that script. – horte Oct 02 '12 at 07:47