Funky rsync problem...

Jerry LeVan <[email protected]>
Newsgroups gmane.comp.macosx.admin
Message-ID <[email protected]>
I am running Lion on a mac book pro. I have a mac mini running Lion and some Fedora boxen.

On the mac book pro my daily.local file contains:

#!/bin/sh
# sync wiki data with server
/usr/local/bin/pullFromServer

export HOME=/var/root
/usr/bin/printenv
/usr/bin/mail -s "Daily Cron Job" jerry <<DOC
 Daily Cron ran on `/bin/date`
DOC

pullFromServer contains:

[mbp:~]$ cat /usr/local/bin/pullFromServer
#!/bin/sh
# Must be run as root we will copy the data directory
# from server to mbp
/usr/bin/rsync -auvgo server::macwiki /usr/local/share/moin/mywiki/data
[mbp:~]$ 

I am copying the moin data directory from my 'server' back to the mbp. 
( A crude sync ).

If I run pullFromServer ( as root ) the data gets pulled back to my mac book pro.

When run from the cron job I find in the daily.log file:
*******
rsync: failed to connect to server: No route to host (65)
rsync error: error in socket IO (code 10) at /SourceCache/rsync/rsync-42/rsync/clientserver.c(105) [receiver=2.6.9]
********
I am running a local name server on the server and in addition there is an entry for the server
in the hosts file on the macbook pro.

I am running almost the same code on the Fedora boxes and they connect ok…

Why is rsync failing when run from cron?

Thanks for any insights…

Jerry
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.