BackupPC-users

Re: [BackupPC-users] Rsync backup won't run

2010-05-26 16:18:44
Subject: Re: [BackupPC-users] Rsync backup won't run
From: David Wraige <david AT wraige DOT com>
To: Les Mikesell <lesmikesell AT gmail DOT com>
Date: Wed, 26 May 2010 21:16:52 +0100
Thanks very much for the extra tips, Les. I've got it working now - your
comment on the strace got me thinking that it must be waiting for a
password.

The one bit of info I forgot to mention was that I had ssh-agent
supplying the password (or not). I had assumed it was working because
ssh didn't ask for a password when invoked from the command line.

But it turns out that because the BackupPC server was starting before
the ssh-agent provided its hooks that BackupPC was left in the dark when
it came to the password. I just needed to stop the BackupPC server,
re-start the ssh-agent and then re-start BackupPC and off it went.

It's taken me days to get this far, and I'm quite embarrassed that I
didn't work it out sooner since it was quite simple. Anyway, thanks very
much.

Regards,
David

Les Mikesell wrote:
> On 5/25/2010 5:27 PM, David Wraige wrote:
>>
>>>> full backup started for directory /home
>>>> Running: /usr/bin/ssh -q -x -l david aragorn /usr/bin/rsync --server
>>>> --sender --numeric-ids --perms --owner --group -D --links --hard-links
>>>> --times --block-size=2048 --recursive --ignore-times . /home/
>>>> Xfer PIDs are now 660
>>>> Read EOF:
>>>> 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)
>>>
>>> Are you sure these two runs are started by the same user - or that you
>>> don't have a passphrase required?  The one above looks like it's ssh
>>> identity did not match, where the one below at least started the remote
>>> rsync command.
>>>
>>
>> Thanks very much for replying Les. I'm as sure as I can be that they're
>> running as the same user. The run below is definitely run as user
>> "backuppc". The one above I assume is kicked off by the "backuppc" user
>> as Apache is running as backuppc:
> 
> I'm not really sure how ssh finds it's identity file, but I'd guess it
> needs HOME or USER set.   But this isn't really done by apache.  Apache
> just sends the server a message and even that only happens when you
> force a run from the web page.  How do you start the backuppc service?
> 
>>>> It hangs forever at that point. If I understand correctly that means
>>>> that the rsync server has started on the client and the following
>>>> confirms this:
>>>
>>> You aren't running as root.  Does the 'david' user have permission to
>>> access the target directory?  Could some mandatory lock or hung nfs
>>> mount be making it wait?
>>>
>>
>> That was simply laziness on my behalf because aragorn is an Ubuntu host,
>> which has a disabled root account. The "david" user at least has read
>> permission. I've enabled the root account just to check and I get
>> identical results, both for the Apache-started run and the
>> manually-started one.
> 
> I thought the apache-started run didn't even negotiate a protocol - so
> you shouldn't see a running remote rsync unless it is left from some
> other invocation.
> 
>>> If aragorn is linux, you might 'strace -p' the process id of the hung
>>> rsync to see what system call it is waiting for.
>>>
>>
>> I ran the strace -p command and got the following:
>>
>> david@aragorn:~$ pgrep -l rsync
>> 23874 rsync
>> david@aragorn:~$ strace -p 23874
>> Process 23874 attached - interrupt to quit
>> select(1, [0], [], NULL, {52, 380000})  = 0 (Timeout)
>> select(1, [0], [], NULL, {60, 0})       = 0 (Timeout)
>> select(1, [0], [], NULL, {60, 0})       = 0 (Timeout)
>> select(1, [0], [], NULL, {60, 0}^C<unfinished ...>
>> Process 23874 detached
>>
>> Do you have any idea what that means?
> 
> That just means it is waiting for something to happen on one of its open
> files or sockets.  Since you have an unusual version on the server side,
> maybe there is something wrong with your perl modules and it hasn't sent
> the request correctly.
> 

------------------------------------------------------------------------------

_______________________________________________
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/