Backup/Recovery with EBS

November 7, 2016


Understanding what AWS provides for backing up EBS volumes is an important concept for DevOps.

Data safety with EBS - Backup/Recovery (Snapshots)

Amazon EBS allows you to easily backup data. You do this by taking snapshots. Snapshots are point-in-time backups. Data written to an EBS volume can be periodically used to create a snapshot. Snapshots provide incremental backups of your data. Snapshots just saves the blocks that have changed. Only changed blocks since the last snapshot are saved in the new snapshot.

Even though snapshots are saved incrementally, only the last snapshot is needed in order to restore the volume. You can delete older snapshot, and still use the latest snapshot.

Taking Snapshots

Snapshots are done with: * AWS Management Console * Scheduled snapshots * AWS API * AWS CLI

EBS snapshots are backed by S3 in AWS-controlled storage. You can see these snapshots your account’s Amazon S3 buckets. It is hidden from you but backed by S3. You use the snapshot tools to manage snapshots not S3.

Snapshots are stored per region. You use snapshots to create new EBS volumes. Snapshots can be copied to other regions.

Using snapshots

Snapshots are used to create new EBS volumes. The volume is created and the data is transferred lazily into the EBS volume. Data accessed before the transfer is restored on request. If you need to increase the size of a volume, you create a snapshot and then recreate a larger volume from the snapshot. Then replace the original volume with the new volume from the snapshot.

Cloudurable provides Cassandra training, Cassandra consulting, Cassandra support and helps setting up Cassandra clusters in AWS.

Tag snapshots to help manage them later. Describing the original volume of the snapshot with the device name (/dev/sdd).

The AWS console can be used to take snapshots or the command line.

Using command line to create a snapshot of a volume

aws ec2 create-snapshot --volume-id vol-1234567890abcdef0 --description "Hadoop RAID 0 volume 5."

Restoring volumes from snapshots

Amazon EBS volumes persist beyond the EC2 instance lifecycle. Thus you can recover data of an instance that fails. Before the instance is terminated, the volume should be detached. Then the volume can attached as a data volume to another instance and then the data can be recovered.

We hope this information on EBS volumes useful. Check out our Casandra training and Kafka training. We also provide Casandra consulting and Kafka consulting. We specialize in AWS DevOps Automation for Cassandra and Kafka.

Backing up root devices

To create a snapshot from a root devices EBS volume, should unmount the volume before taking the snapshot so the OS or application that have outstanding / cached blocks can flush them.

To unmount the volume in Linux, use the following command:

umount -d /dev/sdc

Best practices for Backup and Recovery

There are best practices for dealing with EBS. Back up your EC2 instance regularly using Amazon EBS snapshots. Test the process of recovering your instances from snapshots if the Amazon EBS volumes fail. Use separate volumes for the operating system versus your data. Make sure that the data persists after instance termination. Don’t use instance store for database storage, unless you are using replication.

## Slide deck that covers backing up Amazon Cassandra nodes in AWS

## About us Cloudurable™ streamline DevOps for Cassandra running on AWS provides AMIs, CloudWatch Monitoring, CloudFormation templates and monitoring tools to support Cassandra in production running in EC2. We also teach advanced Cassandra courses which teaches how one could develop, support and deploy Cassandra to production in AWS EC2.

#### More info

Please take some time to read the Advantage of using Cloudurable™. Cloudurable provides:

#### Feedback
We hope you enjoyed this article. Please provide feedback.
#### About Cloudurable Cloudurable provides Cassandra training, Cassandra consulting, Cassandra support and helps setting up Cassandra clusters in AWS. Cloudurable also provides Kafka training, Kafka consulting, Kafka support and helps setting up Kafka clusters in AWS.

Check out our new GoLang course. We provide onsite Go Lang training which is instructor led.


Apache Spark Training
Kafka Tutorial
Akka Consulting
Cassandra Training
AWS Cassandra Database Support
Kafka Support Pricing
Cassandra Database Support Pricing
Non-stop Cassandra
Advantages of using Cloudurable™
Cassandra Consulting
Cloudurable™| Guide to AWS Cassandra Deploy
Cloudurable™| AWS Cassandra Guidelines and Notes
Free guide to deploying Cassandra on AWS
Kafka Training
Kafka Consulting
DynamoDB Training
DynamoDB Consulting
Kinesis Training
Kinesis Consulting
Kafka Tutorial PDF
Redis Consulting
Redis Training
ElasticSearch / ELK Consulting
ElasticSearch Training
InfluxDB/TICK Training TICK Consulting