Groups
Groups
Sign in
Groups
Groups
weewx-user
Conversations
About
Send feedback
Help
rsync not working from python code
383 views
Skip to first unread message
Bill W
unread,
May 9, 2014, 2:49:01 PM
5/9/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to weewx...@googlegroups.com
May 9 14:34:27 localhost weewx[27291]: wxengine: Starting up weewx version 2.6.3
...
May 9 14:40:18 localhost weewx[27291]: reportengine: Running report RSYNC
May 9 14:40:18 localhost weewx[27291]: reportengine: Found configuration file /etc/weewx/skins/Rsync/skin.conf for report RSYNC
May 9 14:40:18 localhost weewx[27291]: rsyncupload: rsync invocation: rsync --archive --delete -e ssh /var/www/html/weewx/ bi...@myhost.com:/var/www/html
May 9 14:40:18 localhost weewx[27291]: rsyncupload: rsync reported: rsync: Failed to exec ssh: Permission denied (13)#012rsync error: error in IPC code (code 14) at pipe.c(84) [sender=3.0.6]#012rsync: connection unexpectedly closed (0 bytes received so far) [sender]#012rsync error: error in IPC code (code 14) at io.c(600) [sender=3.0.6]
So this looks like a problem on the receiver.
[root@localhost weewx]# rsync --archive --delete -e ssh /var/www/html/weewx/ bi...@myhost.com:/var/www/html
[root@localhost weewx]#
Hmmm, this command actually works. So what is causing this?
From a post I found I did a python test:
import os
os.system( "rsync -e 'ssh -v' --archive --delete /var/www/html/weewx/ bi...@myhost.com:/var/www/htm")
Sure enough,
debug1: Sending command: rsync --server -logDtpre.iLs --delete . /var/www/htm
rsync: mkdir "/var/www/htm" failed: Permission denied (13)
rsync error: error in file IO (code 11) at main.c(576) [receiver=3.0.6]
So instead of just using ssh for transfer this is trying to start an rsync server on the receiver.
So there is the problem. Unfortunately I have no idea of how to fix. I can certainly crontab the rsync but can I make this behave correctly instead?
Thanks,
Bill
Bill W
unread,
May 9, 2014, 3:05:55 PM
5/9/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to weewx...@googlegroups.com
Amendment:
From the python instance this DOES work when I type the correct directory.
os.system( "rsync -e 'ssh -v' --archive --delete /var/www/html/weewx/ bi...@myhost.com:/var/www/html"
So this works but still fails from the weewx code as stated above.
Sorry for the confusion.
Bill
Reply all
Reply to author
Forward
0 new messages