BackupPC-users

Re: [BackupPC-users] rsync via ssh and sudo aborted: "fatal error during xfer (Unable to read 4 bytes)"

2008-04-26 13:28:11
Subject: Re: [BackupPC-users] rsync via ssh and sudo aborted: "fatal error during xfer (Unable to read 4 bytes)"
From: Ryan Manikowski <rmanikowski AT proteus DOT com>
To: Guido Schmidt <gs AT schalloch DOT de>
Date: Sat, 26 Apr 2008 13:06:06 -0400
Guido,

The "--server --sender" options are merely security measures to ensure 
that if someone were to gain access to the backuppc account on a host, 
they could not run the rsync command as root with any and all switches. 
BTW, if you are using linux, the syntax is wrong in the FAQ. The line 
should read as follows:

backuppc   ALL=NOPASSWD:   /usr/bin/rsync --server --sender ?*

Note the question more before the asterisk. Hope this helps you out.

Ryan Manikowski




Guido Schmidt wrote:
> I'm using backuppc 3.0 successfully for some time with our LAN-clients 
> via rsyncd. Now I'm trying to backup a WAN-client with rsync via SSH as 
> explained in the FAQ (http://backuppc.sourceforge.net/faq/ssh.html).
>
> The ssh-login connects cleanly with no prompts to a restricted account. 
>  From that account invoking rsync is enabled with sudo (as suggested by 
> Martin Hansen in the FAQ):
>
>    backupuser ALL=NOPASSWD: /usr/bin/rsync --server --sender *
>
> The rsync version on the client is 2.6.9, on the backuppc-server 2.6.8.
>
> XferLOG.bad:
>
> full backup started for directory /
> Running: /usr/bin/ssh -q -x -l backupuser example.com /usr/bin/sudo 
> /usr/bin/rsync --server --sender --numeric-ids --perms --owner --group 
> -D --links --hard-links --times --block-size=2048 --recursive 
> --checksum-seed=32761 --ignore-times . /
> Xfer PIDs are now 17383
> Rsync command pid is 17383
> Fetching remote protocol
> Read EOF: Die Verbindung wurde vom Kommunikationspartner zurückgesetzt
>            [lengthy german for "connection reset by peer"]
> Tried again: got 0 bytes
> Done: 0 files, 0 bytes
> Got fatal error during xfer (Unable to read 4 bytes)
> Backup aborted (Unable to read 4 bytes)
>
> I logged in manually and managed to sudo rsync. As long as I left out 
> the options --server and --sender in /etc/sudoers I was able to do some 
> rsyncs locally on that client, but with these options enabled rsync 
> seems to just hang. I don't know how they affect the behaviour, I could 
> not find any documentation.
>
> Thank you for any suggestions.
> Guido
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> Don't miss this year's exciting event. There's still time to save $100. 
> Use priority code J8TL2D2. 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> BackupPC-users mailing list
> BackupPC-users AT lists.sourceforge DOT net
> List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
> Wiki:    http://backuppc.wiki.sourceforge.net
> Project: http://backuppc.sourceforge.net/
>   



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/