| Home
| Calendar
| Mail Lists
| List Archives
| Desktop SIG
| Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings Linux Cafe | Meeting Notes | Linux Links | About BLU |
Is the exec bit set?
You could also add "-x" as the second line, and then check root's mail to
see what it actually tried to do.
Also, you might make sure that ruby et al are in the $PATH that cron is using...
HTH,
Matt
James Kramer wrote:
> I have a script that I use to backup my data files to the Amazon S3.
> For it to work I need to run is as sudo (root). I placed this script
> into /etc/cron.weekly. It does not run in cron. How can I get the
> script to run. Here is the script
>
> #!/bin/bash
>
> # This script backups /jdata to Amazon S3
>
> EXCMDS="-vs" # you can add -n in here for testing, remove s for
> non-ssl, remove verbosity, etc
> SENDMAIL=/usr/sbin/sendmail
> EMAIL=root@localhost
>
> cd /usr/local/s3sync
>
> echo -e "To: ${EMAIL}\nSubject: s3backup results\nContent-type:
> text/plain\n\n" > /tmp/s3backup.log
>
> #pg_dumpall -Ucdmoyer | gzip > /opt/www/db/pg_dumpall.gz
> #/root/.pgpass is needed for this
> ./s3sync.rb ${EXCMDS} --delete -r /etc/ jdata_backup:etc >> /tmp/s3backup.log
> ./s3sync.rb ${EXCMDS} --delete -r /jdata/ jdata_backup:jdata >>
> /tmp/s3backup.log
> ./s3sync.rb ${EXCMDS} --delete -r /home/jmkramer/.tomboy
> jdata_backup:tomboy >> /tmp/s3backup.log
>
> cat /tmp/s3backup.log | ${SENDMAIL} "${EMAIL}"
>
> Thanks for the help
> Jay
>