We have this Rsync command that does what is desired when ran either directly OR with a shell script. /usr/local/bin/rsync -vvv -P --stats -zrtpl --delete --password-file=/export/home/webuser/.appprod - -log-file=/exp*/h*/web*/logs/rsync-log --exclude "*.htacc*" /exp*/h*/xter*/htdocs/ webuser at appprod:: dprweb_www > /exp*/h*/web*/logs/rsync-output But no matter how we put it into a cron task, we get nothing. No errors, no logs, no output, just nothing. 14 15 * * * cd /usr/local/doc/rsync/; ./rsyncjob.sh #WebMirror Can anybody shed some light on where we can find out why this doesn't do anything? TIA Ian
On Tue, 21 Sep 2010, Ian Skinner wrote:> We have this Rsync command that does what is desired when ran either directly OR with a shell script. > > /usr/local/bin/rsync -vvv -P --stats -zrtpl --delete --password-file=/export/home/webuser/.appprod --log-file=/exp*/h*/web*/logs/rsync-log --exclude "*.htacc*" /exp*/h*/xter*/htdocs/ webuser at appprod::dprweb_www > /exp*/h*/web*/logs/rsync-output > > But no matter how we put it into a cron task, we get nothing. No > errors, no logs, no output, just nothing. > > 14 15 * * * cd /usr/local/doc/rsync/; ./rsyncjob.sh #WebMirror > > Can anybody shed some light on where we can find out why this doesn't > do anything?Check to see where your cron processes are being logged. Often it's to local sendmail and/or via syslog. Try capturing stderr as well: rsync [...etc...] > /path/to/rsync-output 2> /path/to/rsync-error-out (or possibly:) rsync [...etc...] &> /path/to/rsync-output-and-errors More diagnosis will probably require finding the cron logs. (For linux and others, often /var/log/messages will have basic diagnostics per cron job.) General cron advice: Via the shell script, under cron, it's often necessary to specify full paths (for security and/or just-because). Cron user also usually has different privileges than a regular user. Perhaps there are permissions problems with where rsync is installed in /usr/local.
On Tue, 2010-09-21 at 15:38 -0700, Ian Skinner wrote:> We have this Rsync command that does what is desired when ran either directly OR with a shell script. > > /usr/local/bin/rsync -vvv -P --stats -zrtpl --delete --password-file=/export/home/webuser/.appprod - > -log-file=/exp*/h*/web*/logs/rsync-log --exclude "*.htacc*" /exp*/h*/xter*/htdocs/ webuser at appprod:: > dprweb_www > /exp*/h*/web*/logs/rsync-output > > But no matter how we put it into a cron task, we get nothing. No errors, no logs, no output, just nothing. > > 14 15 * * * cd /usr/local/doc/rsync/; ./rsyncjob.sh #WebMirror > > Can anybody shed some light on where we can find out why this doesn't do anything? > > TIA > Ian > >I'm using the below as the command for my backup cron job. Are you sure you need the ./? Try using the whole path as I've done below and see if that works. cd /usr/local/bin; /usr/local/bin/rsync_local_backup_v2.sh HTH Chris -- Chris KeyID 0xE372A7DA98E6705C -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://lists.samba.org/pipermail/rsync/attachments/20100921/e2bc5830/attachment.pgp>