for-aws
for-aws copied to clipboard
How to restore snapshot to Cloudstor EBS relocatable volume
I'm in the process of running a cassandra cluster in docker swarm and we're testing using Cloudstor EBS relocatable volumes for performance and durability.
I'm in the process of creating a service to snapshot the Cloudstor EBS volumes using the CloudstorVolumeName attribute to identify the EBS volumes that need to be backed up. What I am wondering and haven't tested yet is how to restore these snapshots as the Cloudstor volume in the event that we need to do so.
Note I have Cassandra running as a replicated service using the template format to specify it's CloudStore volume mount and all of that works great. In fact we tested removing the service altogether and recreating it referencing the previous Cloudstor volumes and it recovered with very little manual labor.
So I'm confident in the fault tolerance of the solution. What that doesn't guard against is code bugs or people bugs messing the data up and requiring a rollback. Which brings me back to snapshotting the EBS volumes periodically for replacement in the event of the human factor.
I've done it manually a few times. As long as you set CloudstorVolumeName and StackID to the correct values, the volumes should show up in a docker volume ls.
Be careful when you create the snapshots, the might get deleted after a few minutes. The only way I found to keep them is creating a snapshot and then making a copying of it, removing the link to the volume.