BackupPC-users

Re: [BackupPC-users] Odd 'unexpected repeated share name error'

2010-02-14 16:40:34
Subject: Re: [BackupPC-users] Odd 'unexpected repeated share name error'
From: Craig Barratt <cbarratt AT users.sourceforge DOT net>
To: John Rouillard <rouilj-backuppc AT renesys DOT com>
Date: Sun, 14 Feb 2010 13:39:23 -0800
John writes:

> The reason for the current layout is to allow the existing critical
> backups to complete even if it takes days to backup the newer shares
> (filesystems). So it's a temporary thing, but I could see somebody
> wanting to put /home first to prioritize it's backup over say /.
> Is the bug going to be fixed for the beta3 or final release?

Yes.

> Also on another topic, is the elimination of zombie processes on the
> todo list for the 3.2 release?

Yes.

If you want to try the two fixes, here's a patch against 3.2.0beta1
(note: I haven't tested this yet - just did this sitting on a plane).

Craig

--- bin/BackupPC_dump   2010-01-24 17:30:43.000000000 -0800
+++ bin/BackupPC_dump   2010-02-14 12:02:14.859375000 -0800
@@ -623,6 +623,7 @@
 #
 # Now backup each of the shares
 #
+my $shareDuplicate = {};
 for my $shareName ( @$ShareNames ) {
     local(*RH, *WH);
 
@@ -632,11 +633,17 @@
     $shareName = encode("utf8", $shareName);
     $stat{xferOK} = $stat{hostAbort} = undef;
     $stat{hostError} = $stat{lastOutputLine} = undef;
-    if ( -d "$Dir/new/$shareName" ) {
+    if ( $shareName eq "" ) {
+        print(LOG $bpc->timeStamp,
+                  "unexpected empty share name skipped\n");
+        next;
+    }
+    if ( $shareDuplicate->{$shareName} ) {
         print(LOG $bpc->timeStamp,
                   "unexpected repeated share name $shareName skipped\n");
         next;
     }
+    $shareDuplicate->{$shareName} = 1;
 
     UserCommandRun("DumpPreShareCmd", $shareName);
     if ( $? && $Conf{UserCmdCheckStatus} ) {
@@ -915,6 +922,10 @@
         #
         last;
     }
+    #
+    # Wait for any child processes to exit
+    #
+    1 while ( wait() >= 0 );
 }
 
 #

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
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/