I have this awesome python script obtained from http://aws-musings.com/manage-ebs-snapshots-with-a-python-script/

I would like to back up the root EBS volume of my EC2 instances into EBS snapshots.

I suppose I should not put the script anywhere in the root EBS volume itself (I wonder how a script can back up something that contains the script itself). I have another EBS volume mounted to /mnt/data/ directory in my server.

Can I put my backup script there in /mnt/data/ directory? If not, where else should I put it?

I reckon the following could be relevant although my limited knowledge about Linux stopped me from getting anything out of it: Where to put my backup.sh? Hope some of you could help


In this scenario, there is nothing that will prevent the script from backing up itself. One might even argue that it is beneficial to have the script back itself up, so that any changes you make to the script will also be backed up.

Therefore, it is reasonable to keep the script on the root volume. The next question is under what directory, which is addressed by the question you linked to. The preferred location would probably be /usr/local which is meant for user data specific to the local machine. If you have other related scripts, you may keep it with those (e.g. with other cron scripts (in /etc/cron.*); in the home directory of your backup user; or with the other aws scripts (in /opt/aws))

(Unless there are a specific relative paths in your backup script, it should be able to run from anywhere, including /mnt/data. Interestingly enough, most of the AWS API tools can be run on a remote machine, instead of the instance in question).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.