Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this awesome python script obtained from

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 Hope some of you could help

share|improve this question
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


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.