BackupPC-users

Re: [BackupPC-users] Not backing up more that first module/directory (rsyncd)

2009-04-12 15:44:21
Subject: Re: [BackupPC-users] Not backing up more that first module/directory (rsyncd)
From: Holger Parplies <wbppc AT parplies DOT de>
To: Boniforti Flavio <flavio AT piramide DOT ch>
Date: Sun, 12 Apr 2009 21:32:52 +0200
Hi,

Boniforti Flavio wrote on 2009-04-12 10:20:12 +0200 [[BackupPC-users] Not 
backing up more that first module/directory (rsyncd)]:
> I¹ve succesfully set up BackupPC to get data from remote Windows hosts with
> ssh tunnel and rsyncd.
> 
> What I¹m now experiencing is that after having correctly completed first
> module/directory, it doesn¹t connect anymore to the subsequent one.
> Here log excerpt:
> 
> [...]
> incr backup started back to 2009-04-10 17:33:03 (backup #2) for directory
> ExchBkp
> Error connecting to rsync daemon at localhost:8874: inet connect:
> Connessione rifiutata
> Got fatal error during xfer (inet connect: Connessione rifiutata)
> Backup aborted (inet connect: Connessione rifiutata)
> 
> I thought it was the ssh tunnel being closed, therefore I changed the ³sleep
> 20² command to ³sleep 60², but didn¹t change anything.

I agree that it is the ssh tunnel closing when the last (= only) tunnelled
connection closes. Changing the sleep parameter to 60 should only make a
difference if the first module takes less than 60 seconds to back up.
Remember that it's not the time between the two shares you're gapping, it's
the time between DumpPreUserCmd and the first connection. After running the
command (sleep 20), ssh waits for any tunnelled connections to close and then
terminates.

> What do you people suggest?

I haven't got a working implementation, but I'd suggest running a command that
does *not* complete (ever, basically) over ssh in the DumpPreUserCmd and
killing that command (or the ssh) in the DumpPostUserCmd. That would also get
rid of the race condition you currently have: if the backup, for some reason,
takes more than 20 seconds to start (from the time the DumpPreUserCmd is run),
it will fail. That is probably highly unlikely, but it *is* possible.

Alternatively, set up the tunnel in DumpPreShareCmd instead of DumpPreUserCmd.
Then you will be using a new tunnel for each share.

Regards,
Holger

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
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/