Comments (2)
What is happening is that you are executing the ec2-automate-backup using the "sh" shell that does not support the "[[" test I'm using for if statements. A simple remedy would be to define what shell should run the command - in this case, you'd simply run:
bash /home/ubuntu/aws-missing-tools-master/ec2-automate-backup/ec2-automate-backup.sh -s tag "Backup-Daily=true"
as opposed to
sudo sh /home/ubuntu/aws-missing-tools-master/ec2-automate-backup/ec2-automate-backup.sh -s tag "Backup-Daily=true"
This should do the trick for you. I ran a quick test which I've included below - essentially, I created two files, running one file under sh and the other under bash. Sure enough, the "[[" test produces an error.
#!/bin/sh
var="working"
if [[ $var = "working" ]]
then echo "working"
fi
results in:
./test.sh: 3: ./test.sh: [[: not found
Compared to:
#!/bin/bash
var="working"
if [[ $var = "working" ]]
then echo "working"
fi
results in:
#./test.sh: 3: ./test.sh: [[: not found
from aws-missing-tools.
Sorry. That was a stupid error on my part. I should have ignored the file extension and looked at the shebang in the file. :) As a recommendation maybe rename the files to be .bash or remove the extension all together??
Awesome work by the way!
from aws-missing-tools.
Related Issues (20)
- wish: update docs to mention RAID
- Create Tool to Identify Public S3 Objects
- aws-ha-update gets wrong instance-id HOT 2
- Missing File HOT 2
- awscli cannot authenticate HOT 1
- Feature Request: AWS ec2-automate-backup
- The problem with the description of snapshot HOT 6
- Transfer Custom tags to backup HOT 4
- purge option HOT 4
- ec2-automate-backup: tags not applied to snapshots HOT 1
- ec2-automate-backup.sh doesnt delete snapshots HOT 6
- Ubuntu - aws location HOT 3
- Instruction for ec2-automate-backup on Ubuntu 14 server HOT 7
- Error message is cutted (not complete)
- Backup doesn't work under cron HOT 4
- Purge option doesn't appear to be working? HOT 2
- tags not working? HOT 1
- aws-ha-release doesn't support new application load balancer HOT 1
- AWS HA Release does not support multiple ELB's HOT 1
- AWS missing? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-missing-tools.