1

I do have a single node Cassandra EC2 instance (apache-cassandra-3.10), in which I take snapshots (backup) on daily basis and upload it on AWS S3. I also take the backup of complete "schema" and "initial tokens" and keep it over S3.I have managed to create a Bash shell script for the Backup task, which performs all of the above things in a single run.

But I am not able to find any automated way/script to restore the whole backup on a new instance.

1 Answers1

0

Are you taking EBS snapshots, or some other custom snapshot yourself? If you're not taking EBS snapshots, why not?

EBS snapshots are trivial to turn into a working server. This is the easiest, most practical answer to your question. The downside to this is if the volume is being written to when you take a snapshot it might not be consistent. If you can schedule it, and flush / quiescence the application for even a second while the snapshot starts, the server can resume while the snapshot is being made. You'd have to look at how to do that with Cassandra.

I don't bother to flush / quiescence my server for snapshots, but I'm not running anything mission critical. I also have application level backups and a RTO / RPO that means I can restore manually from a snapshot if required.

Alternately you can script building a VPC, server(s) from a custom AMI which includes your software, and installing your data from your application level backup using CloudFormation, but it's beyond the scope of an answer - you'd need to learn CloudFormation.

Tim
  • 30,383
  • 6
  • 47
  • 77
  • No, I am taking Cassandra's own "nodetool" for taking the snapshots , and will there be any other possible way apart from CloudFormation? – Ashutosh Dwivedi Sep 15 '17 at 04:21
  • There are probably dozens of ways. You might be able to use Elastic Beanstalk, for example. You could use any deployment management tool with a custom AMI. Your easiest option by far is the one I outlined above - take automated EBS snapshots and restore if required. I'll edit the answer a little as well. – Tim Sep 15 '17 at 04:25
  • Thanks Tim, a bit elaborated solution of yours would be very much helpful. – Ashutosh Dwivedi Sep 15 '17 at 04:28
  • I've added a bit. In practice: take automatic EBS snapshots, restore with the console if required. Really easy. You'll find how with Google in seconds - you use CloudWatch to automate snapshots, and restores are easy from the snapshot portion of the console. You can do everything using the API if you like. – Tim Sep 15 '17 at 04:29
  • Snapshots are not backups by the way. https://www.veeam.com/blog/why-snapshots-alone-are-not-backups.html – hesoyam Sep 19 '17 at 13:05