Giter VIP home page Giter VIP logo

ebs-snapshots's Introduction

EBS-Snapshot and Rotation

Tasks

  1. Taking EBS timely snapshots
  2. Deleting them based on the age
  3. Tag them appropriately
  4. Do a dry run

SYNOPSIS

ebs_snapshot.rb -c config.yaml --dry

λ: ruby ebs_snapshot.rb --help
Usage: ebs_snapshot.rb [options]

    -c, --config CONFIG              read the options from file
        --dry                        do a dry run and dont do anything
    -h, --help                       show this message
λ:

Example config

# AWS credentials
provider: 'aws'
aws_access_key_id: '<AWS_ACCESS_KEY_ID>'
aws_secret_key: '<AWS_SECRET_KEY>'
aws_region: '<AWS_REGION>'

# specify the volumes
volumes:
  <volume_id>:
    :lifetime: "<retention_time>"
    :host: "<hostname>"
    :type: "<frequency for taking snapshots>"
# Example
  vol-ebb71aa7:
    :lifetime: 1
    :host: "blah.foo.com"
    :type: "hourly" # you can specify daily as well
  • Two types of lifetime daily and hourly
    • if snapshot type is daily ,then lifetime is considered in days
    • if snapshot type is hourly ,then lifetime is considered in hours.

Example Runs

λ: ruby ebs_snapshot.rb -c config.yaml

Creating snapshots 2014-04-20 23:27:10 +0530
Snapshot created Successfully
Checking snapshot es01p:hourly:2014-04-20:23:27
Checking snapshot es02p:daily:2014-04-20:23:27
Checking snapshot es02p:daily:2014-04-19:12:41
Checking snapshot es01p:hourly:2014-04-19:12:41
deleteing snapshot snap-1c4878c0
Deleted old snapshots

λ: ruby ebs_snapshot.rb  -c config.yaml  --dry

Below are the volumes id for snapshots
	vol-ebb71aa7,vol-826fccce

	Checking snapshot es01p:hourly:2014-04-20:23:27

	Checking snapshot es02p:daily:2014-04-20:23:27

	Checking snapshot es02p:daily:2014-04-19:12:41

Nothing to delete

Dependencies

  • ruby
  • fog

ebs-snapshots's People

Contributors

toddlers avatar

Watchers

James Cloos avatar fookloong avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.