- Significant documentation changes for 2.0.0beta0
[BackupPC.git] / lib / BackupPC / Xfer / Rsync.pm
index c1dd22b..f6ad740 100644 (file)
@@ -52,9 +52,9 @@ BEGIN {
         $RsyncLibOK = 0;
         $RsyncLibErr = "File::RsyncP module doesn't exist";
     } else {
         $RsyncLibOK = 0;
         $RsyncLibErr = "File::RsyncP module doesn't exist";
     } else {
-        if ( $File::RsyncP::VERSION < 0.20 ) {
+        if ( $File::RsyncP::VERSION < 0.30 ) {
             $RsyncLibOK = 0;
             $RsyncLibOK = 0;
-            $RsyncLibErr = "File::RsyncP module version too old: need 0.20";
+            $RsyncLibErr = "File::RsyncP module version too old: need 0.30";
         } else {
             $RsyncLibOK = 1;
         }
         } else {
             $RsyncLibOK = 1;
         }
@@ -228,6 +228,7 @@ sub start
         # transferred, even though it is a full dump.
         #
        $rsyncArgs = $conf->{RsyncArgs};
         # transferred, even though it is a full dump.
         #
        $rsyncArgs = $conf->{RsyncArgs};
+       $rsyncArgs = [@$rsyncArgs, @fileList] if ( @fileList );
         $rsyncArgs = [@$rsyncArgs, "--ignore-times"]
                                     if ( $t->{type} eq "full" );
        $rsyncClientCmd = $conf->{RsyncClientCmd};
         $rsyncArgs = [@$rsyncArgs, "--ignore-times"]
                                     if ( $t->{type} eq "full" );
        $rsyncClientCmd = $conf->{RsyncClientCmd};
@@ -364,14 +365,17 @@ sub run
     #
     my $stats = $rs->statsFinal;
     if ( !defined($error) && defined($stats) ) {
     #
     my $stats = $rs->statsFinal;
     if ( !defined($error) && defined($stats) ) {
-       $t->{xferOK}  = 1;
+       $t->{xferOK} = 1;
     } else {
     } else {
-       $t->{xferOK}  = 0;
+       $t->{xferOK} = 0;
     }
     }
-    $t->{byteCnt} = $stats->{childStats}{TotalFileSize}
-                 + $stats->{parentStats}{TotalFileSize};
-    $t->{fileCnt} = $stats->{childStats}{TotalFileCnt}
-                 + $stats->{parentStats}{TotalFileCnt};
+    $t->{xferErrCnt} = $stats->{remoteErrCnt};
+    $t->{byteCnt}    = $stats->{childStats}{TotalFileSize}
+                    + $stats->{parentStats}{TotalFileSize};
+    $t->{fileCnt}    = $stats->{childStats}{TotalFileCnt}
+                    + $stats->{parentStats}{TotalFileCnt};
+    my $str = "Done: $t->{fileCnt} files, $t->{byteCnt} bytes\n";
+    $t->{XferLOG}->write(\$str);
     #
     # TODO: get error count, and call fio to get stats...
     #
     #
     # TODO: get error count, and call fio to get stats...
     #