BackupPC-users

Re: [BackupPC-users] Problems backing up Windows XP over rsyncd

2008-11-07 11:08:03
Subject: Re: [BackupPC-users] Problems backing up Windows XP over rsyncd
From: Cody Dunne <cdunne AT cs.umd DOT edu>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Fri, 07 Nov 2008 11:03:19 -0500
Heinrich Christian Peters wrote:
>>  > The relevant conifg:
>>  >> $Conf{ClientNameAlias} = 'localhost';
>>  >> $Conf{RsyncdClientPort} = '10012';
>>  >> $Conf{DumpPreUserCmd} = '/etc/backuppc/buildtun $name 22 10012';
>>  >> $Conf{DumpPostUserCmd}= '/usr/bin/pkill -u backuppc -f tun$name';
>>  >> $Conf{RestorePreUserCmd} = '/etc/backuppc/buildtun $name 22 10012';
>>  >> $Conf{RestorePostUserCmd}= '/usr/bin/pkill -u backuppc -f tun$name';
>>  >> $Conf{PingCmd} = 'ping -c 1 -w 3 $name';
>>  >
>>  > with /etc/backuppc/buildtun
>>  >> #!/bin/bash
>>  >> host=$1
>>  >> sshPort=$2
>>  >> locPort=$3
>>  >> remPort=873
>>  >> username=backup
>>  >>
>>  >> /usr/bin/screen -d -m -S tun$host /usr/bin/ssh -q -x -L 
>> $locPort:localhost:873 $username@$host -p $sshPort
>>  >> /bin/sleep 10
>>  >> exit 0
>>
>> Are /usr/bin/screen... and /bin/sleep 10 on separate lines? If they are, 
>> then the goal of making the ssh tunnel wait until BackupPC starts isn't 
>> accomplished.
> 
> Yes they are in separate lines. After opening the ssh-connection (a real
> shell, but I will change this for the future) the script waits 10sec. If
> I remove the "sleep" the connection fails, perhaps the tunnel isn't
> really ready?
> 
If the tunnel is working for you, this probably isn't the problem but 
it's my only idea. I think if you removed the screen command, it would 
wait until the ssh command was finished and tunnel was ready before 
returning. If you put sleep 10 on the same line as the ssh command, 
sleep gets run on the client. That causes the tunnel to remain open for 
10 seconds after the ssh command executes, which gives BackupPC time to 
connect over it which keeps the tunnel open. This would remove your need 
to explicitly kill the tunnel, as it would finish after BackupPC is done.

>> If you do the sleep, I don't think you need screen or the
>> DumpPostUserCmd you have. The tunnel will close automatically if  
>> BackupPC fails to start or once BackupPC finishes or fails. 
> 
> This wasn't working for me, don't know why. But as I already said - I
> don't think, that the ssh-connection is the problem. I can backup my
> linux-pc with the same conifg using a ssh-tunnel, too.
> 
> 
>> My only other ideas for you would be to add -v and and --progress to the 
>> RsyncArgs and run BackupPC_dump like you have been. You could tail 
>> /var/log/rsyncd.log on the client, too.
> 
> I added it, no big different. But in the log of the client I found a
> strange thing: The clients sends 27 (!) files more to the server than he
> receives.

Unfortunately that is the limit of my experience. Does anyone else have 
any ideas for Heinrich?

Cody

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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/

<Prev in Thread] Current Thread [Next in Thread>