August 2018
M T W T F S S
« Jul    
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categories

WordPress Quotes

The two most important requirements for major success are: first, being in the right place at the right time, and second, doing something about it.
Ray Kroc

Recent Comments

August 2018
M T W T F S S
« Jul    
 12345
6789101112
13141516171819
20212223242526
2728293031  

Short Cuts

2012 SERVER (64)
2016 windows (9)
AIX (13)
Amazon (31)
Ansibile (18)
Apache (128)
Asterisk (2)
cassandra (2)
Centos (208)
Centos RHEL 7 (256)
chef (3)
cloud (2)
cluster (3)
Coherence (1)
DB2 (5)
DISK (25)
DNS (9)
Docker (24)
Eassy (11)
EXCHANGE (3)
Fedora (6)
ftp (5)
GIT (3)
GOD (2)
Grub (1)
Hacking (10)
Hadoop (6)
horoscope (23)
Hyper-V (10)
IIS (15)
IPTABLES (15)
JAVA (6)
JBOSS (32)
jenkins (1)
Kubernetes (2)
Ldap (5)
Linux (189)
Linux Commands (167)
Load balancer (5)
mariadb (14)
Mongodb (4)
MQ Server (21)
MYSQL (82)
Nagios (5)
NaturalOil (13)
Nginx (29)
Ngix (1)
openldap (1)
Openstack (6)
Oracle (34)
Perl (3)
Postfix (19)
Postgresql (1)
PowerShell (2)
Python (3)
qmail (36)
Redis (12)
RHCE (28)
SCALEIO (1)
Security on Centos (29)
SFTP (1)
Shell (64)
Solaris (58)
Sql Server 2012 (4)
squid (3)
SSH (10)
SSL (14)
Storage (1)
swap (3)
TIPS on Linux (28)
tomcat (59)
Uncategorized (29)
Veritas (2)
vfabric (1)
VMware (28)
Weblogic (38)
Websphere (71)
Windows (19)
Windows Software (2)
wordpress (1)
ZIMBRA (17)

WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.

Who's Online

23 visitors online now
4 guests, 19 bots, 0 members

Hit Counter provided by dental implants orange county

Backup Amazon EBS Volume Snapshots from Amazon Ec2

ata is the most important factor in any business and taking its backup on a regular interval of time is a handsome practice. We have come up the technique to auto backup Amazon EBS volume snapshots from running Amazon Ec2 instance using AWS CLI.

Prerequisite

  • Amazon AWS account for creating Access key ID and Secret access key.
  • Running Amazon Ec2 Instance.
  • AWS Command Line Interface.

Create Access key ID and Secret access key

  • Log in to your Amazon Dashboard Console Account.
  • Click on IAM management console.
  • Click on ADD Users to create a new user for backing up EBS Volume.

 

 

Installing AWS Command Line Interface

We are using centos7 machine for the demonstration

 

python –version
curl “https://bootstrap.pypa.io/get-pip.py” -o “get-pip.py”
python get-pip.py
pip -V
pip install awscli
pip install –upgrade awscli

Configure AWS CLI on Linux

After installing awscli, there is a requirement of configuring awscli on Amazon Ec2 instance. Hit command aws configure and Enter the AWS Access Key ID, AWS Secret Access Key, and Default region name when prompted. Default output format can be left blank.

aws configure
AWS Access Key ID [None]: AKIAIUARU2RSR74GQRXA
AWS Secret Access Key [None]: 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
Default region name [None]: us-east-1
Default output format [None]:

We are done with all the Prerequisite, now we will go ahead and schedule auto backups for Amazon EBS volume from Amazon Ec2 instances using awscli.


Auto Backup Amazon EBS Volumes From Amazon Ec2

Use the below command to create a snapshot of Amazon EBS volume from Ec2 Instance. Enter your EBS volume ID for which you want to take backup or create a snapshot and give a right description message.

Command

aws ec2 create-snapshot --volume-id vol-xxxxxxxx --description "Relevant description Message"


How to obtain the EBS volume ID

Log into AWS Dashboard >> Clicking on service Ec2 >> Select the Ec2 instance >> Choose Block Device

 

 

Apply Cronjob to Auto Backup Snapshots of Amazon EBS.

crontab -e
######## Automating EBS Volume Snapshots ########

00 09 * * * aws ec2 create-snapshot --volume-id vol-0234f278482d2e197 --description "Disk Backup for Linux Together Demo Server"

This brings an end to the tutorial. In the above tutorial, we have elaborated the technique to backup Amazon EBS volume using awscli. Write down your questions and queries in the comment section. Do like and share the share the blog, We will be back with more interesting tutorials asap.  Thanks!

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  

  

  

Blue Captcha Image
Refresh

*

Protected by WP Anti Spam