* Added multi-level incrementals. Still needs testing.
[BackupPC.git] / lib / BackupPC / Xfer / Tar.pm
index bc4f787..e9b2945 100644 (file)
@@ -29,7 +29,7 @@
 #
 #========================================================================
 #
-# Version 2.1.0, released 20 Jun 2004.
+# Version 3.0.0alpha, released 23 Jan 2006.
 #
 # See http://backuppc.sourceforge.net.
 #
@@ -122,9 +122,10 @@ sub start
            $args = $conf->{TarFullArgs};
             $logMsg = "full backup started for directory $t->{shareName}";
         } else {
-            $incrDate = $bpc->timeStamp($t->{lastFull} - 3600, 1);
+            $incrDate = $bpc->timeStamp($t->{incrBaseTime} - 3600, 1);
            $args = $conf->{TarIncrArgs};
-            $logMsg = "incr backup started back to $incrDate for directory"
+            $logMsg = "incr backup started back to $incrDate"
+                    . " (backup #$t->{incrBaseBkupNum}) for directory"
                     . " $t->{shareName}";
         }
        push(@$tarClientCmd, split(/ +/, $args));
@@ -221,8 +222,13 @@ sub readOutput
             $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 2 );
             $t->{fileCnt}++;
         } else {
-            $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 0 );
-            $t->{xferErrCnt}++;
+            #
+            # Ignore annoying log message on incremental for tar 1.15.x
+            #
+            if ( !/: file is unchanged; not dumped$/ ) {
+                $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 0 );
+                $t->{xferErrCnt}++;
+            }
            #
            # If tar encounters a minor error, it will exit with a non-zero
            # status.  We still consider that ok.  Remember if tar prints