BackupPC-users

Re: [BackupPC-users] Restore completes but doesn't end

2013-01-13 23:23:39
Subject: Re: [BackupPC-users] Restore completes but doesn't end
From: Adam Goryachev <mailinglists AT websitemanagers.com DOT au>
To: backuppc-users AT lists.sourceforge DOT net
Date: Mon, 14 Jan 2013 15:21:49 +1100
On 14/01/13 14:38, backuppc AT sundquist.imapmail DOT org wrote:
>> Try logging into the destination machine and checking the processes that
>> are running. 
> Thanks for the response.  Here are the only processes running since I
> ssh-ed into "temp":
>
>  2019 ?        S      0:00 /usr/bin/rsync --no-detach --daemon --config
>  /etc/rsyncd.conf
>  2027 ?        S      0:01 /usr/sbin/smbd -D
>  2044 ?        S<     0:00 udevd --daemon
>  2046 ?        S<     0:00 udevd --daemon
>  2093 ?        S      0:18 /usr/bin/rsync --no-detach --daemon --config
>  /etc/rsyncd.conf
>  2094 ?        S      0:01 /usr/bin/rsync --no-detach --daemon --config
>  /etc/rsyncd.conf
>  2125 pts/2    S      0:00 su
>  2133 pts/2    S      0:00 bash
>  2207 pts/2    R+     0:00 ps ax
> root@temp:/#
You might like to use "ps axf" which will show a nice tree (ie, you can
see which process is related to each other)...
> before that there are just the kde apps that started up when I rebooted
> the machine and other usual processes.
>
>> Use strace to see what is actually happening.
>>
>> ie, if you use rsync:
>> strace -p `pidof rsync`
> rsync has three pids as we saw above:
>
> root@temp:/# pidof rsync
> 2094 2093 2019
>
> Trying 2094, strace keeps timing out.  Here it is before I killed it:
>
> root@temp:/# strace -p 2094
> Process 2094 attached - interrupt to quit
> select(7, [6], [], NULL, {55, 525938})  = 0 (Timeout)
> select(7, [6], [], NULL, {60, 0})       = 0 (Timeout)
> select(7, [6], [], NULL, {60, 0}
>
> Same with 2093
>
> root@temp:/# strace -p 2093
> Process 2093 attached - interrupt to quit
> select(5, [4], [], NULL, {39, 26433})   = 0 (Timeout)
> select(5, [4], [], NULL, {60, 0})       = 0 (Timeout)
> select(5, [4], [], NULL, {60, 0})       = 0 (Timeout)
> select(5, [4], [], NULL, {60, 0})       = 0 (Timeout)
> select(5, [4], [], NULL, {60, 0})       = 0 (Timeout)
> select(5, [4], [], NULL, {60, 0}
So these two are not yet dead, they are waiting for something to happen
which hasn't. They will eventually timeout, or get what they are waiting
for. See below.
> The oldest, 2019 just gave me one line and sat there without a
> "timeout":
>
> root@temp:/# strace -p 2019
> Process 2019 attached - interrupt to quit
> select(6, [4 5], NULL, NULL, NULL
Looks like you are using rsyncd instead of rsync over ssh, so this is
probably waiting for new TCP connections, and is not relevant to
backuppc (at this stage in the process).
> Over at the machine running backuppc, there's only one rsync PID and it
> gives a similar response:
>
> root@eeebox:/# pidof rsync
> 24053
> root@eeebox:/# strace -p 24053
> Process 24053 attached - interrupt to quit
> select(6, [4 5], NULL, NULL, NULL
>
> Not being a developer, this means nothing to me.  Anything useful there?
>
> If I recall correctly, doesn't backuppc implement its own rsync in perl
> (I thought I remember reading that when I first set it up).
Yes...
>> Also, if that doesn't tell you anything, then strace the process on the
>> backuppc machine itself. I think there are some additional settings
>> modified on each file, or verification or similar, after the restore
>> completes. Either way, the strace will tell you exactly what (if
>> anything) is happening.
> Over at the backuppc box, the latest running processes are:
>
>  9397 ?        S      0:46 /usr/bin/perl
>  /usr/share/backuppc/bin/BackupPC -d
>  9403 ?        S      3:33 /usr/bin/perl
>  /usr/share/backuppc/bin/BackupPC_trashClean
> 12196 ?        S      0:04
> /usr/lib/notification-daemon/notification-daemon
> 14634 ?        S      0:00 network-admin
> 14636 ?        S      0:00 /usr/sbin/system-tools-backends
> 14638 ?        S      0:00 /usr/bin/perl
> /usr/share/system-tools-backends-2.0/scripts/SystemToolsBackends.pl -m
> Platform
> 23091 ?        S      0:00 /usr/sbin/apache2 -k start
> 23101 ?        Sl     0:00 /usr/sbin/apache2 -k start
> 23102 ?        Sl     0:01 /usr/sbin/apache2 -k start
> 24004 ?        S<     0:00 udevd --daemon
> 24005 ?        S<     0:00 udevd --daemon
> 24006 ?        Ss     0:00 sshd: JS [priv]
> 24012 ?        S      0:00 sshd: JS@pts/2
> 24013 pts/2    Ss     0:01 -bash
> 24038 pts/2    S      0:00 su
> 24045 pts/2    S      0:00 bash
> 24053 ?        S      0:00 /usr/bin/rsync --no-detach --daemon --config
> /etc/rsyncd.conf
> 24076 ?        S      0:11 /usr/bin/perl
> /usr/share/backuppc/bin/BackupPC_restore temp temp restoreReq.24065.0
> 24280 pts/2    R+     0:00 ps ax
> root@eeebox:/#
>
> Thanks again for the quick response.

Again, use ps axf for an easier to read list... but it looks like the
interesting process is pid 24076 which is the backuppc process talking
to rsyncd on the remote host. Use strace to see what it is doing....

Hope that helps...

Regards,
Adam

-- 
Adam Goryachev
Website Managers
www.websitemanagers.com.au


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
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/