Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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