I have a bash script at /etc/cron.hourly/hourlybackup
/root/s3cmd-1.0.0/s3cmd sync /var/flexshare/shares s3://[s3 bucket]/backup/
/root/s3cmd-1.0.0/s3cmd sync /home s3://[s3 bucket]/backup/
But after waiting it never seems to trigger. However, if I execute the script manually everything works great. I have a feeling this might be more of a cron issue than s3cmd, but I can't seem to spot it. What am I missing?
You may need to give it an explicit path to a config file:
s3cmd -config /root/.s3cfg sync …
The runtime environment is a little different when running from cron than on the console and s3cmd may in some cases be unable to find the config file automatically.
That was it! Thanks a million. I just added
to the command and it works great.