0
votes

On an AWS EC2 instance I have a large (10's of GiB) Solr index that I would like to backup daily. In order to do so, I need an additional 200 GiB of storage space, for the span of about 6 minutes (replicate, tarball, then FTP elsewhere and rm the new directory and tarball).

Is there any way to request a 200 GiB EBS volume, then mount it, then unmount it and remove it from our account, all from a BASH script or Python script? Would a different approach (i.e. not EBS) be better?

1

1 Answers

1
votes

Yes, it is possible to provision and mount an EBS volume via script or using various SDK's.

Here are the instructions for using the command line tools to creating an EBS volume:

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-volume.html

And here are the instructions for using the command line tools to attach a volume.

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html

Finally, here are the instruction to delete the volume once done with it:

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-volume.html

In all cases just scroll down to the "Command Line Tools" section.