Sync not working on cron schedule

  •  jasbur

    jasbur - 2011-04-09

    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?

  • Michal Ludvig

    Michal Ludvig - 2011-04-10


    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.


  •  jasbur

    jasbur - 2011-04-12

    That was it! Thanks a million. I just added

    --config /root/.s3cfg

    to the command and it works great.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks