[clue] [TECH] rsync command runs from command line but not via cron

Shawn Perry shawn at redmop.com
Wed Jun 1 19:22:27 MDT 2011


I'm just checking...  the IP 0.0.0.0 has been changed to protect the
innocent, right?

Lets try this:
echo the rsync command so it will show up on the log.
"echo RSYNC Exit Code: $?" after the rsync in your cron job

That leaves you with this:

#!/bin/sh
echo '****************************************'
echo 'BEGIN BACKUP'
date
echo '****************************************'

# ssh uses public/private key authentication
echo /mnt/DroboFS/Shares/DroboApps/rsync/rsync -avz -e 'ssh -i
/root/rsync-key' --rsync-path=/mnt/DroboFS/Shares/DroboApps/rsync/rsync
root at 0.0.0.0:/mnt/DroboFS/Shares /mnt/DroboFS/
/mnt/DroboFS/Shares/DroboApps/rsync/rsync -avz -e 'ssh -i /root/rsync-key'
--rsync-path=/mnt/DroboFS/Shares/DroboApps/rsync/rsyncroot at 0.0.0.0:/mnt/DroboFS/Shares
/mnt/DroboFS/
echo rsync exit code: $?

echo '****************************************'
echo 'END BACKUP'
date
echo '****************************************'

Shawn T Perry
Red Mop Computing Services
email: shawn at redmop.com
office: 720-319-7627
cell: 303-881-2623
web: http://www.redmop.com
facebook:
http://www.facebook.com/pages/Red-Mop-Computing-Services/114352628589778
linkedin: http://www.linkedin.com/in/shawnperry


On Wed, Jun 1, 2011 at 6:14 PM, Collins Richey <crichey at gmail.com> wrote:

> On Wed, Jun 1, 2011 at 12:38 PM, Brian Gibson <bwg1974 at hotmail.com> wrote:
> > OK I have a pair of Drobo FS NAS devices.
> >
> >
> > Kernel  :Linux Drobo-FS 2.6.22.18
> > BusyBox v1.14.2 (2009-07-29 17:47:47 PDT) multi-call binary
> >
> > One is the file server, the other is the backup device.  I can manually
> > rsync between the two via the command line during a ssh session to the
> > backup device.  It works if I call the rsync command directly or via the
> > shell script that calls the rsync command.
> >
> ****************'
> >
> > # ssh uses public/private key authentication
> > /mnt/DroboFS/Shares/DroboApps/rsync/rsync -avz -e 'ssh -i
> /root/rsync-key'
> > --rsync-path=/mnt/DroboFS/Shares/DroboApps/rsync/rsync
> > root at 0.0.0.0:/mnt/DroboFS/Shares /mnt/DroboFS/
>
> Wow, you've got me stumped. The usual problem in cron scripts is the
> lack of environment settings but you've got a fully qualified path to
> the executable.
>
> I'll be curious to know the answer.
>
> --
> Collins Richey
>      If you fill your heart with regrets of yesterday and the worries
>      of tomorrow, you have no today to be thankful for.
> _______________________________________________
> clue mailing list
> clue at cluedenver.org
> http://cluedenver.org/mailman/listinfo/clue
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cluedenver.org/pipermail/clue/attachments/20110601/a04b95f8/attachment.html 


More information about the clue mailing list