Advertisement
Guest User

BackupPC abort on XFer errors

a guest
Jan 26th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.95 KB | None | 0 0
  1. --- BackupPC_dump.bak   2018-01-25 17:33:45.908872201 +0100
  2. +++ BackupPC_dump       2018-01-26 10:14:21.072250040 +0100
  3. @@ -1198,6 +1198,9 @@
  4.          }
  5.      }
  6.  
  7. +    # patch to let BackupPC exit abort even with Xfer Errors
  8. +    $stat{xferOK} = 0 if ( $stat{hostError} || $stat{hostAbort} || $stat{xferErrCnt} > 0 );
  9. +
  10.      if ( $NeedPostCmd ) {
  11.          UserCommandRun("DumpPostShareCmd", $shareName);
  12.          if ( $? && $Conf{UserCmdCheckStatus} ) {
  13. @@ -1207,7 +1210,6 @@
  14.          }
  15.      }
  16.  
  17. -    $stat{xferOK} = 0 if ( $stat{hostError} || $stat{hostAbort} );
  18.      if ( !$stat{xferOK} ) {
  19.          #
  20.          # kill off the transfer program, first nicely then forcefully
  21. @@ -1254,6 +1256,12 @@
  22.      $stat{xferOK} = 0;
  23.  }
  24.  
  25. +# Return error in logfile if XFer Errors were found
  26. +if ( $stat{xferErrCnt} > 0 ) {
  27. +  print(LOG $bpc->timeStamp,"Xfer errors found during backup\n");
  28. +  $stat{xferOK} = 0;
  29. +}
  30. +
  31.  $stat{xferOK} = 0 if ( $Abort );
  32.  
  33.  #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement