-
Notifications
You must be signed in to change notification settings - Fork 405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backup doesn't work under cron #133
Comments
same issue |
I spent a damn load of time trying to resolve this issue. The problem was in In addition my command seems to redirect only STDOUT output to log file only and when error had place i saw an empty file that pissed me off. As a final workaround-solution i just used |
I had the same issue - it does not seem to be reading the cron-primer file. Maybe there is a change that is breaking it, because I have used this script in the past in different situations without issue. My quick workaround to get it working with Cron was to export the path |
ran into the same issue, had a lot of fun playing with crontab until I found |
Hi there,
Love the script, it seems to work great when I run it normally. I'm having an issue with it not running in a cron job. I've checked many other related issues and didn't see anything directly related to my issue. I have to admit that I'm not the most familiar with cron jobs, so it could be something I just haven't done yet.
This is what I'm running from crontab -e, as user ubuntu (running it every minute temporarily until I get it working):
* * * * * /home/ubuntu/ec2-automate-backup.sh -r us-east-1 -s tag -t Backup,Values=true -k 7 -p -n -c /home/ubuntu/cron-primer.sh >> /home/ubuntu/backup.log
This is my cron-primer.sh. I added /usr/local/bin to the path as per this issue
#!/bin/bash -
# export PATH=/bin is required for cut, date, grep
# export PATH=/usr/bin is required for AWS Command Line Interface tools
export PATH=/bin:/usr/bin:/usr/local/bin
# AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY needed for AWS CLI tools
export AWS_ACCESS_KEY_ID=xxxxxx
export AWS_SECRET_ACCESS_KEY=xxxxx
# AWS_CONFIG_FILE required for AWS Command Line Interface tools (f.e. ".aws")
export AWS_CONFIG_FILE=/home/ubuntu/.aws/config
Thanks for looking!
The text was updated successfully, but these errors were encountered: