BackupPC-users

Re: [BackupPC-users] shadowmountrsync

2013-02-13 18:12:30
Subject: Re: [BackupPC-users] shadowmountrsync
From: <backuppc AT kosowsky DOT org>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Wed, 13 Feb 2013 18:11:06 -0500
Shawn T Perry wrote at about 20:15:42 -0700 on Tuesday, February 12, 2013:
 > I think that will let go of the connection before rsync is actually setup.
 > 
 > I have a VERY hackish solution, though I would definately like
 > something cleaner.  I have added a command to find and kill the sshd
 > it came in on.  It works, but I need to add in an sshd restart every
 > morning.

First of all, this is an *awful* hack and as I mentioned in my
previous response, the problem is not ssh but that something (at? vss?
dosdev? rsyncd?) is hanging in the script preventing return of
control.

Second, it seems like you are killing both the ssh client and the sshd
daemon -- not so clever. If you just killed the ssh client then you
wouldn't need to restart the daemon...

Third, killing ssh means you don't get any feedback on whether the
shadows and rsyncd set up correctly... this can lead to *bad* results
since backuppc will have no way of knowing if the shadows actually set
up properly.

Remind me again why you have not posted a copy of the log so we can
see *exactly* what is going wrong... the log pretty clearly traces
what is happening, in which recursive iteration of calls, and where...
You can get even more detail by adding "set +x" as a first line in the
bash script then you will see each line of the script printed as
executed...

 > 
 >         if [ $RETURN -le 0 ] ; then  #No error
 >                 for ((WAIT=1; WAIT <=SHORTTIME; WAIT++)) ; do # Wait
 > for rsync to set up
 >                         if [ -e "$RSYNCDPID" ]; then
 >                                 [ -n "$LOG" ] && echo -e "..Rsyncd
 > started successfully (PID=$(< $RSYNCDPID))...$PASS\n" >> $LOG
 > ->                                ps -s |grep sshd |tail -n 1 | cut
 > -c-8 | xargs kill -f
 >                                 exit 0 # Exit 0 on success
 >                         fi
 >                         sleep 1
 >                 done
 >                 [ -n "$LOG" ] && echo -e "--Rsyncd failed to
 > start...$PASS\n" >> $LOG
 >                 RETURN=10 # Rsyncd failed to start
 >         fi
 >         clean_up # Clean up on failure...
 >         exit $RETURN # Return failure code
 > 
 > 
 > On Tue, Feb 12, 2013 at 8:55 AM, Les Mikesell <lesmikesell AT gmail DOT com> 
 > wrote:
 > > On Tue, Feb 12, 2013 at 9:42 AM, Shawn T Perry <shawn AT redmop DOT com> 
 > > wrote:
 > >> Does anyone else have any idea on how to solve this problem?
 > >>
 > >
 > > Did you try the I/O redirection on any commands that will keep
 > > running?  Or using 'ssh -n'?
 > >
 > > --
 > >    Les Mikesell
 > >      lesmikesell AT gmail DOT com
 > >
 > > ------------------------------------------------------------------------------
 > > Free Next-Gen Firewall Hardware Offer
 > > Buy your Sophos next-gen firewall before the end March 2013
 > > and get the hardware for free! Learn more.
 > > http://p.sf.net/sfu/sophos-d2d-feb
 > > _______________________________________________
 > > 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/
 > 
 > ------------------------------------------------------------------------------
 > Free Next-Gen Firewall Hardware Offer
 > Buy your Sophos next-gen firewall before the end March 2013 
 > and get the hardware for free! Learn more.
 > http://p.sf.net/sfu/sophos-d2d-feb
 > _______________________________________________
 > 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/

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
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/