Last Comment

Jon, Just run 'sudo ldconfig' ...

2012-11-27 @ 05:12:47 pm
by Admin


I get this after compileing trying ...

2012-11-27 @ 03:54:49 pm
by Jon


Nice article. That worked for me.

2012-11-27 @ 01:50:19 pm
by Arunroy


Calendar

June 2017
SunMonTueWedThuFriSat
 << < > >>
    123
45678910
11121314151617
18192021222324
252627282930 

Who's Online?

Member: 0
Visitor: 1

Announce

Tags

No tags in this Blog

rss Syndication

Categories

Archives

Links

    Nov282012

    01:14:54 pm

    AWS Automated EBS Snapshot Script

    The term 'Cloud Computing' has been used so much over the past few years. Several articles were written about the cloud, many cloud cloud service provders are emerged including some enterprise giants like Amazon, Rackspace etc. In this article we cover some points about EBS (Elastic Bloack Store).

    AWS allows users to hold/store  data in EBS, S3 etc. Here, EBS is mainly used for storing data that are part of application. S3 is much cheaper and  gives different types of availabilities which you can choose according to your need. Since most of the users stores data in EBS, it is important to find out a way which will help us to take care of the backup mechanism. Fortunately AWS provides a way called 'EBS snapshot' for this. At the moment, we need to log on to the aws console to take the snapshot of a particular EBS.

    This is a simple shell script which makes the job of taking EBS snapshot a lot easier. This can be configured to run as a cron job which can  make the EBS snapshot process automated. The script is given below,

    ********************************
    #!/bin/bash

    #Setting parameters to run ec2 commands
    export JAVA_HOME=/path/to/jdk
    export EC2_HOME=/path/tp/ec2-api-tools
    export PATH=$PATH:$EC2_HOME/bin
    export EC2_CERT=/path/to/cert-file
    export EC2_PRIVATE_KEY=/path/to/privatekey file
    export PATH=$PATH:$JAVA_HOME/bin:/EC2_HOME/bin

    #Specifying the certificates
    MY_CERT=/path/to/cert-file
    MY_KEY=/path/to/privatekey file

    #Instance & EBS Volume details
    MY_INSTANCE_ID=i-XXXXXXXX
    VOLUME_LIST=vol-XXXXXXXX

    sync
    DAY="$(date +"%d-%m-%Y")"
    #creating the snapshots
    for volume in $(echo $VOLUME_LIST); do
    ec2-create-snapshot -C $MY_CERT -K $MY_KEY $volume -d snapshot-description-$DAY
    done

    *********************************

    Make sure that you will be replacing the values of the variables defined accordingly to match your aws instances & volumes.

    I have also posted the same script on aws forum. please find the link below,

    https://forums.aws.amazon.com/thread.jspa?messageID=265739




    Admin · 6626 views · 0 comments
    Categories: Cat, Tech

    Permanent link to full entry

    http://jayaraj.sosblogs.com/My-Blogs-b1/AWS-Automated-EBS-Snapshot-Script-b1-p3.htm

    Comments

    No Comment for this post yet...


    Leave a comment

    New feedback status: Awaiting moderation





    Your URL will be displayed.


    Please enter the code written in the picture.


    Comment text

    Options
       (Set cookies for name, e-mail and url)